Skip to content

Commit

Permalink
Rebrand as bond-wm
Browse files Browse the repository at this point in the history
  • Loading branch information
wnayes committed Jan 6, 2024
1 parent df6c89e commit 658cda3
Show file tree
Hide file tree
Showing 111 changed files with 5,658 additions and 4,252 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# electron-wm
<p align="center">
<a href="https://wnayes.github.io/bond-wm/" target="_blank" rel="noopener noreferrer">
<img src="/assets/logo.svg" height="110px" alt="bond-wm logo">
</a>
</p>

<img align="right" src="/assets/logo.svg" height="110px" alt="electron-wm logo">
# bond-wm

An X Window Manager built on web technologies, including Electron and React.
An X Window Manager built on web technologies.

See the [docs site](https://wnayes.github.io/electron-wm/)
See the [docs site](https://wnayes.github.io/bond-wm/)
for details on how to install and configure the window manager.

<br /><br /><br />

## Screenshot

![electron-wm screenshot](assets/screenshots/1.png?raw=true)
![bond-wm screenshot](assets/screenshots/1.png?raw=true)

## Development

Expand Down
4 changes: 2 additions & 2 deletions apps/wm/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# electron-wm
# bond-wm

See the [main electron-wm repository README](https://github.com/wnayes/electron-wm#electron-wm) for details.
See the [main bond-wm repository README](https://github.com/wnayes/bond-wm#bond-wm) for details.
2 changes: 1 addition & 1 deletion apps/wm/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const argv = yargs(hideBin(process.argv))
describe: "Enable logging output to a file",
})
.usage(
`electron-wm window manager
`bond-wm window manager
Usage: $0 [options]`
)
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions apps/wm/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync } from "node:fs";
import { dirname, join, resolve, sep } from "node:path";
import { log } from "./log";
import { setConfigPath, setConfigPathAction } from "@electron-wm/shared";
import { setConfigPath, setConfigPathAction } from "@bond-wm/shared";
import { ServerStore } from "./configureStore";
import { getArgs } from "./args";
import { getXDGConfigHome } from "./xdg";
Expand All @@ -21,7 +21,7 @@ export async function determineConfigPath(store: ServerStore): Promise<string> {
const XDG_CONFIG_HOME = getXDGConfigHome();
log("XDG_CONFIG_HOME", XDG_CONFIG_HOME);

configPath = join(XDG_CONFIG_HOME, "electron-wm-config", "index.ts");
configPath = join(XDG_CONFIG_HOME, "bond-wm-config", "index.ts");
if (!existsSync(configPath)) {
throw new Error("No --config path was specified, and no default config locations existed.");
}
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/configureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
screenReducer,
trayReducer,
windowReducer,
} from "@electron-wm/shared";
} from "@bond-wm/shared";

export type ServerStore = ReturnType<typeof configureWMStore>;
export type ServerRootState = ReturnType<ServerStore["getState"]>;
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/customize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IWindow, WindowPosition } from "@electron-wm/shared";
import { IWindow, WindowPosition } from "@bond-wm/shared";

/**
* This is basically my personal customization.
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/desktopEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { readFile, readdir } from "node:fs/promises";
import { extname, isAbsolute, join } from "node:path";
import { XWMContext } from "./wm";
import { UserDirectoryKind, getXDGUserDirectory } from "./xdg";
import { DesktopEntry, DesktopEntryKind, DesktopEntryMap, setDesktopEntries } from "@electron-wm/shared";
import { DesktopEntry, DesktopEntryKind, DesktopEntryMap, setDesktopEntries } from "@bond-wm/shared";
import { encodeArrayBufferToBase64 } from "./base64";
import { log, logError } from "./log";
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
14 changes: 7 additions & 7 deletions apps/wm/drag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import {
setWindowIntoScreenAction,
startDragAction,
XWMWindowType,
} from "@electron-wm/shared";
import { IScreen } from "@electron-wm/shared";
import { selectWindowMaximizeCanTakeEffect } from "@electron-wm/shared";
import { Coords, IGeometry } from "@electron-wm/shared";
import { geometryArea, geometryIntersect } from "@electron-wm/shared";
} from "@bond-wm/shared";
import { IScreen } from "@bond-wm/shared";
import { selectWindowMaximizeCanTakeEffect } from "@bond-wm/shared";
import { Coords, IGeometry } from "@bond-wm/shared";
import { geometryArea, geometryIntersect } from "@bond-wm/shared";
import {
getAbsoluteWindowGeometry,
IWindow,
newHeightForWindow,
newWidthForWindow,
ResizeDirection,
} from "@electron-wm/shared";
import { XCB_CURRENT_TIME, XCB_GRAB_MODE_ASYNC, XEventMask } from "@electron-wm/shared";
} from "@bond-wm/shared";
import { XCB_CURRENT_TIME, XCB_GRAB_MODE_ASYNC, XEventMask } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";

Expand Down
12 changes: 6 additions & 6 deletions apps/wm/ewmh.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { XWMWindowType, setWindowFullscreenAction, setWindowUrgentAction } from "@electron-wm/shared";
import { numsToBuffer } from "@electron-wm/shared";
import { Atom, XCB_COPY_FROM_PARENT, XPropMode } from "@electron-wm/shared";
import { XWMWindowType, setWindowFullscreenAction, setWindowUrgentAction } from "@bond-wm/shared";
import { numsToBuffer } from "@bond-wm/shared";
import { Atom, XCB_COPY_FROM_PARENT, XPropMode } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
import { getRawPropertyValue, internAtomAsync } from "./xutils";
import { pid } from "process";
import { DragModule } from "./drag";
import { Coords } from "@electron-wm/shared";
import { IIconInfo, ResizeDirection } from "@electron-wm/shared";
import { Coords } from "@bond-wm/shared";
import { IIconInfo, ResizeDirection } from "@bond-wm/shared";

enum NetWmStateAction {
_NET_WM_STATE_REMOVE = 0,
Expand Down Expand Up @@ -213,7 +213,7 @@ export async function createEWMHEventConsumer(
const widBuffer = numsToBuffer([wid]);
X.ChangeProperty(XPropMode.Replace, root, atoms._NET_SUPPORTING_WM_CHECK, X.atoms.WINDOW, 32, widBuffer);
X.ChangeProperty(XPropMode.Replace, wid, atoms._NET_SUPPORTING_WM_CHECK, X.atoms.WINDOW, 32, widBuffer);
X.ChangeProperty(XPropMode.Replace, wid, atoms._NET_WM_NAME, atoms.UTF8_STRING, 8, "electron-wm");
X.ChangeProperty(XPropMode.Replace, wid, atoms._NET_WM_NAME, atoms.UTF8_STRING, 8, "bond-wm");
X.ChangeProperty(XPropMode.Replace, wid, atoms._NET_WM_PID, X.atoms.CARDINAL, 32, numsToBuffer([pid]));
},

Expand Down
2 changes: 1 addition & 1 deletion apps/wm/icccm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IXClient, WMHints, WMSizeHints, XPropMode, XWMWindowType } from "@electron-wm/shared";
import { IXClient, WMHints, WMSizeHints, XPropMode, XWMWindowType } from "@bond-wm/shared";
import { log } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
import { getPropertyValue, getRawPropertyValue, internAtomAsync } from "./xutils";
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dialog.showErrorBox = function (title, content) {
console.error(`${title}\n${content}`);
};

log("electron-wm main");
log("bond-wm main");
log("user data path: ", app.getPath("userData"));

if (loggingEnabled()) {
Expand Down
4 changes: 2 additions & 2 deletions apps/wm/menus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { app, BrowserWindow, IpcMainEvent, Menu } from "electron";
import { ContextMenuKind } from "@electron-wm/shared";
import { ContextMenuKind } from "@bond-wm/shared";
import { log } from "./log";

export function showContextMenu(event: IpcMainEvent, kind: ContextMenuKind, version: string | undefined): void {
Expand All @@ -24,7 +24,7 @@ function showDesktopMenu(event: IpcMainEvent, version: string | undefined) {

const desktopMenu = Menu.buildFromTemplate([
{
label: "electron-wm" + (version ? ` — ${version}` : ""),
label: "bond-wm" + (version ? ` — ${version}` : ""),
enabled: false,
},
{
Expand Down
16 changes: 8 additions & 8 deletions apps/wm/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "electron-wm",
"name": "bond-wm",
"version": "0.2.1",
"description": "An X Window Manager built on web technologies, including Electron and React.",
"description": "An X Window Manager built on web technologies.",
"main": "./dist/index.mjs",
"exports": {
".": "./dist/index.mjs",
"./index.mjs": "./dist/index.mjs",
"./preload.js": "./dist/preload.js",
"./version.json": "./dist/version.json",
"./bin/electron-wm": "./bin/electron-wm"
"./bin/bond-wm": "./bin/bond-wm"
},
"repository": "https://github.com/wnayes/electron-wm",
"repository": "https://github.com/wnayes/bond-wm",
"keywords": [
"X11",
"window manager"
],
"author": "Will Nayes",
"license": "MIT",
"bin": {
"electron-wm": "./bin/electron-wm"
"bond-wm": "./bin/bond-wm"
},
"scripts": {
"start": "DISPLAY=:1 electron .",
Expand All @@ -32,9 +32,9 @@
"clean": "rm -rf ./dist ./node_modules"
},
"dependencies": {
"@electron-wm/keysym": "workspace:^",
"@electron-wm/shared": "workspace:^",
"@electron-wm/tsconfig": "workspace:^",
"@bond-wm/keysym": "workspace:^",
"@bond-wm/shared": "workspace:^",
"@bond-wm/tsconfig": "workspace:^",
"@reduxjs/toolkit": "^2.0.0",
"electron": "^28.0.0",
"electron-redux": "2.0.0-alpha.9",
Expand Down
4 changes: 2 additions & 2 deletions apps/wm/pointer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { geometryContains } from "@electron-wm/shared";
import { IXClient, XQueryPointerResult } from "@electron-wm/shared";
import { geometryContains } from "@bond-wm/shared";
import { IXClient, XQueryPointerResult } from "@bond-wm/shared";
import { XWMContext } from "./wm";

export function queryPointer(X: IXClient, relativeWid: number): Promise<XQueryPointerResult> {
Expand Down
4 changes: 2 additions & 2 deletions apps/wm/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import type {
ElectronWMIPCInterface,
CompletionOptionsCallback,
ISetupIPCCallbacks,
} from "@electron-wm/shared";
import { IPCMessages } from "@electron-wm/shared";
} from "@bond-wm/shared";
import { IPCMessages } from "@bond-wm/shared";

let _onCompletionOptionsResult: CompletionOptionsCallback | undefined;

Expand Down
4 changes: 2 additions & 2 deletions apps/wm/shortcuts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IXDisplay, KeyRegistrationMap, X11_KEY_MODIFIER, XWMEventConsumerKeyPressArgs } from "@electron-wm/shared";
import { IXDisplay, KeyRegistrationMap, X11_KEY_MODIFIER, XWMEventConsumerKeyPressArgs } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
import * as nodeKeySym from "@electron-wm/keysym";
import * as nodeKeySym from "@bond-wm/keysym";

interface KeyRegistrationInfo {
originalKeyString: string;
Expand Down
8 changes: 4 additions & 4 deletions apps/wm/systray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
addTrayWindowAction,
configureTrayWindowAction,
removeTrayWindowAction,
} from "@electron-wm/shared";
import { IGeometry } from "@electron-wm/shared";
import { numsToBuffer } from "@electron-wm/shared";
import { IX11Mod, X11_EVENT_TYPE, XCB_COPY_FROM_PARENT, XPropMode } from "@electron-wm/shared";
} from "@bond-wm/shared";
import { IGeometry } from "@bond-wm/shared";
import { numsToBuffer } from "@bond-wm/shared";
import { IX11Mod, X11_EVENT_TYPE, XCB_COPY_FROM_PARENT, XPropMode } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
import { changeWindowEventMask, internAtomAsync } from "./xutils";
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@electron-wm/tsconfig/tsconfig.base.json",
"extends": "@bond-wm/tsconfig/tsconfig.base.json",
"include": ["**/*"],
"compilerOptions": {
"rootDir": "."
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { existsSync, readFileSync } from "node:fs";
import { join } from "node:path";
import { app } from "electron";
import { logError } from "./log";
import { setVersionAction } from "@electron-wm/shared";
import { setVersionAction } from "@bond-wm/shared";
import { ServerStore } from "./configureStore";

interface VersionJson {
Expand Down
18 changes: 9 additions & 9 deletions apps/wm/wm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
selectVisibleWindowsFromCurrentTags,
setConfig,
setConfigAction,
} from "@electron-wm/shared";
} from "@bond-wm/shared";
import { spawn } from "child_process";
import { AsyncReturnType, Writable } from "type-fest";
import { log, logDir, logError } from "./log";
Expand Down Expand Up @@ -52,20 +52,20 @@ import {
IXButtonReleaseEvent,
WMSizeHints,
WMHintsStates,
} from "@electron-wm/shared";
} from "@bond-wm/shared";
import { Action, Middleware, UnknownAction, isAction } from "redux";
import { ViteDevServer, createServer as createViteServer } from "vite";
import { ViteNodeServer } from "vite-node/server";
import { ViteNodeRunner } from "vite-node/client";
import { installSourcemapsSupport } from "vite-node/source-map";
import { anyIntersect, arraysEqual, fitGeometryWithinAnother, intersect } from "@electron-wm/shared";
import { anyIntersect, arraysEqual, fitGeometryWithinAnother, intersect } from "@bond-wm/shared";
import { requireExt as requireXinerama } from "./xinerama";
import { createEWMHEventConsumer } from "./ewmh";
import { changeWindowEventMask, getPropertyValue, internAtomAsync } from "./xutils";
import { getScreenIndexWithCursor, queryPointer } from "./pointer";
import { createICCCMEventConsumer, getNormalHints, getWMClass, getWMHints, getWMTransientFor } from "./icccm";
import { createMotifModule, hasMotifDecorations } from "./motif";
import { ContextMenuKind } from "@electron-wm/shared";
import { ContextMenuKind } from "@bond-wm/shared";
import { showContextMenu } from "./menus";
import {
addWindowAction,
Expand All @@ -80,12 +80,12 @@ import {
setWindowTagsAction,
setWindowTitleAction,
setWindowVisibleAction,
} from "@electron-wm/shared";
import { addScreenAction, setScreenCurrentTagsAction, setScreenZoomLevelAction } from "@electron-wm/shared";
import { getWindowMinHeight, getWindowMinWidth, IWindow, windowAcceptsFocus } from "@electron-wm/shared";
import { IScreen } from "@electron-wm/shared";
} from "@bond-wm/shared";
import { addScreenAction, setScreenCurrentTagsAction, setScreenZoomLevelAction } from "@bond-wm/shared";
import { getWindowMinHeight, getWindowMinWidth, IWindow, windowAcceptsFocus } from "@bond-wm/shared";
import { IScreen } from "@bond-wm/shared";
import { setupAutocompleteListener } from "./autocomplete";
import { switchToNextLayout } from "@electron-wm/shared";
import { switchToNextLayout } from "@bond-wm/shared";
import { customizeWindow } from "./customize";
import { createDragModule } from "./drag";
import { loggingEnabled } from "./args";
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/xinerama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* If node-x11 adds Xinerama support, this could be removed.
*/

import { IXDisplay, XBuffer, XCbWithErr, XineramaScreenInfo, XXineramaExtension } from "@electron-wm/shared";
import { IXDisplay, XBuffer, XCbWithErr, XineramaScreenInfo, XXineramaExtension } from "@bond-wm/shared";

export function requireExt(display: IXDisplay, extCallback: XCbWithErr<[ext: XXineramaExtension | null]>) {
const X = display.client;
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/xutils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Atom, IXClient, XEventMask, XGetPropertyCallbackProps } from "@electron-wm/shared";
import { Atom, IXClient, XEventMask, XGetPropertyCallbackProps } from "@bond-wm/shared";
import { log, logError } from "./log";
import { ExtraAtoms } from "./wm";

Expand Down
Loading

0 comments on commit 658cda3

Please sign in to comment.