website-xp-phone 2.2.12 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +2 -2
- package/README.md +17 -3
- package/build/blogDirsPlugin.ts +100 -0
- package/build/env.ts +4 -1
- package/build/routeSkeletonsPlugin.ts +44 -2
- package/package.json +14 -10
- package/public/blog/archive/eighth-post-lost-in-the-sauce.json +36 -0
- package/public/blog/archive/noise/eleventh-post-discussion-java-gist.md +5 -0
- package/public/blog/archive/noise/fifteenth-post-very-rare-windows-funny.md +8 -0
- package/public/blog/archive/noise/fourth-post-meta-blog.md +3 -0
- package/public/blog/archive/noise/sixteenth-post-meta-fantasy-blog.md +4 -0
- package/public/blog/archive/noise/tenth-post-meta-funny-redacted-and-timetravelled.md +3 -0
- package/public/blog/archive/noise/twelfth-post-mixing-phase-technique-audio-music.md +48 -0
- package/public/blog/archive/noise/welcome-back-ramble-meta.md +6 -0
- package/public/blog/archive/noise/welcome-to-my-blog-meta-blog-welcome-to-my-website.md +7 -0
- package/public/blog/archive/seventh-post-lie-theory-na2000.json +22 -0
- package/public/blog/archive/sophus-lie.json +36 -0
- package/public/blog/hlwm_and_herbstutil.md +11 -0
- package/public/blog/random/hlwm.md +8 -0
- package/public/blog/writing/hot-action-under-a-cold-moon.json +9 -0
- package/public/checksums.txt +91 -66
- package/public/documents/drift-report.json +42 -28
- package/render.yaml +11 -1
- package/scripts/mutable-assets.mjs +13 -22
- package/scripts/refresh-content.mjs +53 -32
- package/scripts/refresh-soundcloud.mjs +221 -136
- package/scripts/write-dist-checksums.mjs +48 -4
- package/src/content/blog.json +16 -363
- package/src/content/blogDirs.ts +196 -0
- package/src/content/configs.json +1 -1
- package/src/content/contacts.json +2 -2
- package/src/content/includes/make-recipes.md +18 -0
- package/src/content/index.ts +156 -57
- package/src/content/music-ext.json +1 -1
- package/src/content/projects/doftiles.json +88 -4
- package/src/content/projects/herbctl.json +58 -0
- package/src/content/projects/herbstutil.json +50 -20
- package/src/content/projects/on-deploy.json +57 -0
- package/src/content/projects/polyframes.json +83 -0
- package/src/content/schema.ts +7 -4
- package/src/content/sections.json +11 -10
- package/src/content/soundcloud.json +95 -47
- package/src/lib/clippy.ts +29 -8
- package/src/lib/embeds.ts +43 -24
- package/src/lib/history.ts +152 -0
- package/src/lib/markdown.tsx +19 -22
- package/src/lib/rehypeYoutubeEmbed.ts +65 -0
- package/src/lib/sanitizeSchema.ts +32 -0
- package/src/lib/scrollTo.ts +45 -0
- package/src/lib/signals.tsx +271 -0
- package/src/main.tsx +20 -4
- package/src/pages/BlogDirPage.tsx +36 -0
- package/src/pages/BlogPostPage.tsx +76 -3
- package/src/pages/ProjectPage.tsx +9 -3
- package/src/pages/WowPage.tsx +8 -3
- package/src/pages/index.ts +2 -0
- package/src/shell/App.tsx +14 -8
- package/src/shell/Clippy.tsx +13 -3
- package/src/shell/MenuBar.tsx +7 -4
- package/src/shell/resolveRoute.ts +41 -2
- package/src/shell/routerSignals.ts +34 -0
- package/src/styles/extras.css +27 -0
- package/src/styles/layout.css +2 -2
- package/src/styles/menu.css +1 -1
- package/src/styles/window.css +19 -9
- package/src/themes/pageSlide/index.ts +120 -42
- package/src/themes/pageSlide/pageSlide.css +20 -9
- package/src/virtual.d.ts +14 -0
- package/src/window/MaximizedWindow.tsx +97 -64
- package/src/window/OkButton.tsx +42 -25
- package/src/window/PageWindows.tsx +7 -0
- package/src/window/TitleBar.tsx +3 -1
- package/src/window/Window.tsx +132 -87
- package/src/window/closeSounds.ts +27 -0
- package/src/window/model.ts +11 -0
- package/src/window/state.tsx +290 -50
- package/src/window/themes.ts +23 -2
- package/test/content.test.js +15 -10
- package/test/deploy-pipeline.test.js +73 -0
- package/test/embeds.test.js +89 -0
- package/test/markdown-tables.test.js +96 -0
- package/test/mutable-assets.test.js +16 -4
- package/test/route-skeletons.test.js +38 -0
- package/test/soundcloud-refresh.test.js +68 -0
- package/test/youtubeEmbed.test.js +157 -0
- package/tsconfig.node.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +7 -1
- package/.opencode/cache/index.akinevz.html +0 -54
- package/public/blog/4th.md +0 -28
- package/public/blog/wsl.1.md +0 -40
- package/src/window/hidden.ts +0 -22
- /package/public/blog/{ → archive/noise/}/321/200/321/203/320/275/320/270/321/201/321/207-/320/263/320/273/320/276/321/201/321/201/320/260/321/200/320/270/320/271.md" +0 -0
- /package/src/content/{characters.json → includes/characters.json} +0 -0
package/src/content/index.ts
CHANGED
|
@@ -4,13 +4,159 @@ import sectionsJson from "./sections.json";
|
|
|
4
4
|
import contactsJson from "./contacts.json";
|
|
5
5
|
import addonsJson from "./addons.json";
|
|
6
6
|
import configsJson from "./configs.json";
|
|
7
|
-
import charactersJson from "./characters.json";
|
|
7
|
+
import charactersJson from "./includes/characters.json";
|
|
8
8
|
import blogJson from "./blog.json";
|
|
9
9
|
import soundcloudJson from "./soundcloud.json";
|
|
10
10
|
import musicExtJson from "./music-ext.json";
|
|
11
11
|
|
|
12
12
|
export * from "./schema";
|
|
13
13
|
|
|
14
|
+
/* ------------------------------------------------------------------ includes
|
|
15
|
+
* A content file can embed another content file's window tree with an
|
|
16
|
+
* include directive instead of duplicating it:
|
|
17
|
+
*
|
|
18
|
+
* { "include": "make-recipes.md" } → the markdown file, wrapped as a Section
|
|
19
|
+
* { "include": "characters.json" } → the Section of includes/characters.json
|
|
20
|
+
*
|
|
21
|
+
* ANY file under src/content/includes/ is includable — no registration,
|
|
22
|
+
* and the directive carries the FULL FILE NAME (extension included):
|
|
23
|
+
* - `.json`: must hold a Section (the window-tree shape of a content file).
|
|
24
|
+
* - `.md`: author-written markdown (literal newlines), imported raw and
|
|
25
|
+
* wrapped as `{ heading, anchor: <stem>, theme: "open", content: <md> }`.
|
|
26
|
+
* An optional leading `# Heading` line names the window; otherwise the
|
|
27
|
+
* humanized file stem does ("make-recipes" → "Make recipes").
|
|
28
|
+
* Directives are expanded at load time, recursively (an included tree may
|
|
29
|
+
* itself contain directives). Unknown or circular directives throw during
|
|
30
|
+
* module load, failing the build loudly instead of rendering an opaque
|
|
31
|
+
* object. Each file may be included multiple times across sibling items;
|
|
32
|
+
* cycles are broken by the seen-set, which tracks one inclusion chain.
|
|
33
|
+
* Target lookup goes through the vite glob maps — a directive never joins
|
|
34
|
+
* paths itself, so a hostile name cannot escape the includes/ directory.
|
|
35
|
+
*
|
|
36
|
+
* Everything here precedes its first use: exports below expand their
|
|
37
|
+
* trees at module evaluation, so this scaffolding must be initialized
|
|
38
|
+
* by then (const declarations do not hoist).
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/** Every includable .json Section, keyed by file name ("characters.json"). */
|
|
42
|
+
const sectionModules = import.meta.glob<Section>("./includes/*.json", {
|
|
43
|
+
eager: true,
|
|
44
|
+
import: "default",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** Every includable .md document, keyed by file name — imported raw. */
|
|
48
|
+
const mdModules = import.meta.glob<string>("./includes/*.md", {
|
|
49
|
+
eager: true,
|
|
50
|
+
import: "default",
|
|
51
|
+
query: "?raw",
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const stemOf = (path: string): string =>
|
|
55
|
+
path
|
|
56
|
+
.split("/")
|
|
57
|
+
.pop()!
|
|
58
|
+
.replace(/\.json$|\.md$/, "");
|
|
59
|
+
|
|
60
|
+
/** "make-recipes" → "Make recipes". */
|
|
61
|
+
const humanize = (stem: string): string =>
|
|
62
|
+
stem.replace(/-/g, " ").replace(/^./, (c) => c.toUpperCase());
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Wrap an include/ markdown file as a Section: `# Heading` first line
|
|
66
|
+
* names the window (default: humanized stem); the rest is the content.
|
|
67
|
+
*/
|
|
68
|
+
const mdSection = (stem: string, md: string): Section => {
|
|
69
|
+
const lines = md.replace(/\r\n/g, "\n").split("\n");
|
|
70
|
+
let heading: string | undefined;
|
|
71
|
+
while (heading === undefined && lines.length > 0) {
|
|
72
|
+
const line = lines[0] ?? "";
|
|
73
|
+
if (line.trim() === "") lines.shift();
|
|
74
|
+
else if (line.startsWith("# ")) {
|
|
75
|
+
heading = line.slice(2).trim();
|
|
76
|
+
lines.shift();
|
|
77
|
+
} else break;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
heading: heading ?? humanize(stem),
|
|
81
|
+
anchor: stem,
|
|
82
|
+
theme: "open",
|
|
83
|
+
content: lines.join("\n"),
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** Includable Sections, keyed by FULL file name ("make-recipes.md"). */
|
|
88
|
+
const includes: Record<string, Section> = {
|
|
89
|
+
...Object.fromEntries(
|
|
90
|
+
Object.entries(sectionModules).map(([path, section]) => [
|
|
91
|
+
path.split("/").pop()!,
|
|
92
|
+
section,
|
|
93
|
+
]),
|
|
94
|
+
),
|
|
95
|
+
...Object.fromEntries(
|
|
96
|
+
Object.entries(mdModules).map(([path, md]) => {
|
|
97
|
+
const stem = stemOf(path);
|
|
98
|
+
return [path.split("/").pop()!, mdSection(stem, md)];
|
|
99
|
+
}),
|
|
100
|
+
),
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** The include target a directive file name resolves to. The name must
|
|
104
|
+
* be a bare file name (no directories) with an includable extension;
|
|
105
|
+
* unknown names throw — the same loud failure the renderer would
|
|
106
|
+
* otherwise paper over. */
|
|
107
|
+
const includeTarget = (name: string): Section => {
|
|
108
|
+
if (!/^[a-z0-9][a-z0-9._-]*\.(json|md)$/i.test(name) || name.includes("/")) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
`Unknown include directive: ${name} ` +
|
|
111
|
+
"(targets are bare .json/.md file names under src/content/includes/)",
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
const target = includes[name];
|
|
115
|
+
if (!target) {
|
|
116
|
+
throw new Error(
|
|
117
|
+
`Unknown include directive: ${name} (targets live in src/content/includes/)`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
return target;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
function expandContent(
|
|
124
|
+
content: NonNullable<Section["content"]>,
|
|
125
|
+
ancestors: Set<string>,
|
|
126
|
+
): NonNullable<Section["content"]> {
|
|
127
|
+
if (typeof content === "string") return content;
|
|
128
|
+
const items = Array.isArray(content) ? content : [content];
|
|
129
|
+
return items.map((item) => {
|
|
130
|
+
if (typeof item !== "object" || item === null) return item;
|
|
131
|
+
if ("include" in item) {
|
|
132
|
+
const name = item.include;
|
|
133
|
+
if (typeof name !== "string") {
|
|
134
|
+
throw new Error(`Unknown include directive: ${String(name)}`);
|
|
135
|
+
}
|
|
136
|
+
if (ancestors.has(name)) {
|
|
137
|
+
throw new Error(`Circular include directive: ${name}`);
|
|
138
|
+
}
|
|
139
|
+
const chain = new Set(ancestors);
|
|
140
|
+
chain.add(name);
|
|
141
|
+
return expandSection(includeTarget(name), chain);
|
|
142
|
+
}
|
|
143
|
+
if ("banner" in item || "url" in item) return item;
|
|
144
|
+
return expandSection(item as Section, ancestors);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Expands a nested section, preserving the absence of content exactly. */
|
|
149
|
+
function expandSection(section: Section, ancestors: Set<string>): Section {
|
|
150
|
+
if (!section.content) return section;
|
|
151
|
+
return { ...section, content: expandContent(section.content, ancestors) };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** Expands every include directive in the tree rooted at `section`. */
|
|
155
|
+
function resolveIncludes(section: Section): Section {
|
|
156
|
+
if (!section.content) return section;
|
|
157
|
+
return { ...section, content: expandContent(section.content, new Set()) };
|
|
158
|
+
}
|
|
159
|
+
|
|
14
160
|
const projectModules = import.meta.glob<Project>("./projects/*.json", {
|
|
15
161
|
eager: true,
|
|
16
162
|
import: "default",
|
|
@@ -19,9 +165,14 @@ const projectModules = import.meta.glob<Project>("./projects/*.json", {
|
|
|
19
165
|
export const projectPath = (project: Project) =>
|
|
20
166
|
project.path ?? `/projects/${project.slug}`;
|
|
21
167
|
|
|
22
|
-
export const projects = Object.values(projectModules)
|
|
23
|
-
|
|
24
|
-
)
|
|
168
|
+
export const projects = Object.values(projectModules)
|
|
169
|
+
// Project pages can embed shared content the same way page trees can:
|
|
170
|
+
// expand include directives (e.g. the make-recipes table) at load time.
|
|
171
|
+
.map((project): Project => ({
|
|
172
|
+
...project,
|
|
173
|
+
content: resolveIncludes(project.content),
|
|
174
|
+
}))
|
|
175
|
+
.sort((a, b) => a.title.localeCompare(b.title));
|
|
25
176
|
|
|
26
177
|
/**
|
|
27
178
|
* Short-hand URL for a project: /<slug>. Redirects to the canonical
|
|
@@ -73,59 +224,6 @@ const projectRoutes: Route[] = projects.flatMap((project): Route[] => {
|
|
|
73
224
|
});
|
|
74
225
|
|
|
75
226
|
export const routes: Route[] = [...pageRoutes, ...projectRoutes];
|
|
76
|
-
/* ------------------------------------------------------------------ includes
|
|
77
|
-
* A content file can embed another content file's window tree with an
|
|
78
|
-
* include directive instead of duplicating it:
|
|
79
|
-
*
|
|
80
|
-
* { "include": "characters" } → the top-level Section of characters.json
|
|
81
|
-
*
|
|
82
|
-
* Directives are expanded at load time, recursively (an included tree may
|
|
83
|
-
* itself contain directives). Unknown or circular directives throw during
|
|
84
|
-
* module load, failing the build loudly instead of rendering an opaque
|
|
85
|
-
* object. Each file may be included multiple times across sibling items;
|
|
86
|
-
* cycles are broken by the seen-set, which tracks one inclusion chain.
|
|
87
|
-
*/
|
|
88
|
-
const includeRegistry: Record<string, Section> = {
|
|
89
|
-
characters: charactersJson as Section,
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
function expandContent(
|
|
93
|
-
content: NonNullable<Section["content"]>,
|
|
94
|
-
ancestors: Set<string>,
|
|
95
|
-
): NonNullable<Section["content"]> {
|
|
96
|
-
if (typeof content === "string") return content;
|
|
97
|
-
const items = Array.isArray(content) ? content : [content];
|
|
98
|
-
return items.map((item) => {
|
|
99
|
-
if (typeof item !== "object" || item === null) return item;
|
|
100
|
-
if ("include" in item) {
|
|
101
|
-
const name = item.include;
|
|
102
|
-
if (typeof name !== "string" || !includeRegistry[name]) {
|
|
103
|
-
throw new Error(`Unknown include directive: ${String(name)}`);
|
|
104
|
-
}
|
|
105
|
-
if (ancestors.has(name)) {
|
|
106
|
-
throw new Error(`Circular include directive: ${name}`);
|
|
107
|
-
}
|
|
108
|
-
const target = includeRegistry[name];
|
|
109
|
-
const chain = new Set(ancestors);
|
|
110
|
-
chain.add(name);
|
|
111
|
-
return expandSection(target, chain);
|
|
112
|
-
}
|
|
113
|
-
if ("banner" in item || "url" in item) return item;
|
|
114
|
-
return expandSection(item as Section, ancestors);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** Expands a nested section, preserving the absence of content exactly. */
|
|
119
|
-
function expandSection(section: Section, ancestors: Set<string>): Section {
|
|
120
|
-
if (!section.content) return section;
|
|
121
|
-
return { ...section, content: expandContent(section.content, ancestors) };
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/** Expands every include directive in the tree rooted at `section`. */
|
|
125
|
-
const resolveIncludes = (section: Section): Section => {
|
|
126
|
-
if (!section.content) return section;
|
|
127
|
-
return { ...section, content: expandContent(section.content, new Set()) };
|
|
128
|
-
};
|
|
129
227
|
|
|
130
228
|
export const sections = resolveIncludes(sectionsJson as Section);
|
|
131
229
|
export const contacts = resolveIncludes(contactsJson as Section);
|
|
@@ -135,3 +233,4 @@ export const characters = resolveIncludes(charactersJson as Section);
|
|
|
135
233
|
export const blog = resolveIncludes(blogJson as Section);
|
|
136
234
|
export const soundcloud = soundcloudJson as SoundCloudData;
|
|
137
235
|
export const musicExt = musicExtJson;
|
|
236
|
+
export * from "./blogDirs";
|
|
@@ -1,19 +1,103 @@
|
|
|
1
1
|
{
|
|
2
2
|
"slug": "doftiles",
|
|
3
3
|
"title": "doftiles",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Personal dotfiles: GNU Stow packages, Makefile deployment with hooks, herbstluftwm on WSL2.",
|
|
5
5
|
"github": "https://github.com/akinevz2/doftiles",
|
|
6
6
|
"content": {
|
|
7
7
|
"heading": "doftiles",
|
|
8
8
|
"content": [
|
|
9
|
-
"
|
|
9
|
+
"dots - herbstluftwm on WSL2, deployed with GNU Stow and Make.",
|
|
10
10
|
"[https://github.com/akinevz2/doftiles](https://github.com/akinevz2/doftiles)",
|
|
11
11
|
{
|
|
12
12
|
"heading": "From the README",
|
|
13
13
|
"theme": "open",
|
|
14
14
|
"content": [
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"Every top-level directory is a stow package whose contents mirror `$HOME`; recipes link them with `stow -R -t $HOME <package>`. Deploy through make, never bare stow.",
|
|
16
|
+
"```sh\ncd ~/dots\ngit submodule update --init --recursive",
|
|
17
|
+
"WSL2 needs VcXsrv on the Windows side",
|
|
18
|
+
"use `DISPLAY=localhost:0.0`."
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"heading": "Packages provided",
|
|
23
|
+
"theme": "open",
|
|
24
|
+
"content": [
|
|
25
|
+
"14 stow packages:",
|
|
26
|
+
{
|
|
27
|
+
"heading": "Shell and tooling",
|
|
28
|
+
"theme": "open",
|
|
29
|
+
"content": [
|
|
30
|
+
"shell - `.bashrcx`, `.profile`, aliases, exports; firefox -> Windows Firefox; `check-wsl`",
|
|
31
|
+
"git - `~/.my-credentials`, `load-credentials` hook, `dekineify`, home `~/Makefile`",
|
|
32
|
+
"llms - OpenCode + poolside config, SonarQube/MCP tooling",
|
|
33
|
+
"task - Taskwarrior config",
|
|
34
|
+
"vim - Vim config",
|
|
35
|
+
"zshell - Oh My Zsh config"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"heading": "Window manager stack",
|
|
40
|
+
"theme": "open",
|
|
41
|
+
"content": [
|
|
42
|
+
"herbst - autostart, keybinds, ~40 scripts (`hc_*`, `rofi_*`, `polyctl`, `winbarctl`)",
|
|
43
|
+
"polybar - `config.ini`, `polywins` (submodule), [polyframes](/projects/polyframes) (the renderer binary, now its own project), `ewmh_labels`",
|
|
44
|
+
"compton - compositor config, rofi context-menu helpers",
|
|
45
|
+
"rofi - themes, applets, ~40 `bin/` helpers",
|
|
46
|
+
"dunst - notification config, mail scripts",
|
|
47
|
+
"alacritty - terminal config"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"heading": "Services and maintenance",
|
|
52
|
+
"theme": "open",
|
|
53
|
+
"content": [
|
|
54
|
+
"services - systemd units: `herbst`, `compton`, `dunst` (+ disabled `xvfb`/`x11vnc`/`novnc`)",
|
|
55
|
+
"maintenance - `check-msi-dirs` oneshot (dunst alert)"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"Caveat: `wm.packages` is stale - pre-rename `opencode`, omits `vim`/`zshell`/`maintenance`; stow those individually."
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"heading": "The polyframes renderer",
|
|
63
|
+
"theme": "open",
|
|
64
|
+
"content": [
|
|
65
|
+
"The bar's window-list renderer is a standalone native binary: [polyframes](/projects/polyframes) — a bunli/Bun TypeScript CLI compiled with `bun build --compile` (its own repo; the dots tree carries none of it).",
|
|
66
|
+
"It renders the center module (one label per frame+class group, state-decorated, click/scroll actions) and hosts the helpers that used to live here: the rofi menus (`tags`, `hidden`, `windows`, `launch`), `hc_tile`/`hc_center`/`hc_resize` equivalents, `hc_fit_to`-style constraint passes, one-shot `rule once` spawns, and `hc_unmaximize`'s janitor daemon trigger.",
|
|
67
|
+
"Why a binary: polybar's spawn environment has no nvm PATH — the compiled executable embeds its runtime and re-executes ITSELF in the bar's click-action strings, so no shim and no node setup is needed.",
|
|
68
|
+
"`hc_center`/`hc_resize` remain here as two-line exec-shims delegating to the binary (dots-side callers keep their names). All WM reads go through [herbstutil](https://github.com/akinevz2/herbstutil) (typed JSON). Install: `make install` in the polyframes repo; bar wiring: `[module/polyframes]` in `config.ini`.",
|
|
69
|
+
{
|
|
70
|
+
"heading": "Links",
|
|
71
|
+
"content": [
|
|
72
|
+
{
|
|
73
|
+
"heading": "polyframes project page",
|
|
74
|
+
"link": "/projects/polyframes"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"heading": "polyframes on GitHub",
|
|
78
|
+
"link": "https://github.com/akinevz2/polyframes"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"heading": "Float registers: mod-f / mod-x / mod-ctrl-f",
|
|
86
|
+
"theme": "open",
|
|
87
|
+
"content": [
|
|
88
|
+
"The float registers are hlwm configuration wired to the [polyframes](/projects/polyframes) binary. The state machines live in `herbst/.local/bin` (`hc_focus`, `hc_floatx`, `hc_zoom`).",
|
|
89
|
+
"mod-f toggles the WINDOW's floating state: tiled to float (size preserved, decoration-aware center, fit pass, focus follows) and back. A single-float policy: when a visible float exists, the press focuses the floating layer instead of stacking a second float.",
|
|
90
|
+
"mod-x toggles the LAYER focus: float focused hands focus to the tiling layer (the float stays); tiling focus + visible float slurps the float into the frame (via hc_tile when the frame is populated and non-max); tiling focus + no floats yanks the focused window out (float + center in the monitor), and closes the vacated frame when the yanked window was its only client.",
|
|
91
|
+
"mod-ctrl-f zooms: the fresh float is stretched to the frame with its decoration outline flush to the frame's content rect (content = frame minus the theme's floating margins), then a fit pass keeps the full outline on-screen.",
|
|
92
|
+
"Geometry writes reconcile against hlwm's real content rect afterwards: float size hints can snap sizes, and the placement re-runs once from the read-back truth - verified against decoration_geometry reads, not the values we wrote."
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"heading": "Deployment via Make",
|
|
97
|
+
"theme": "open",
|
|
98
|
+
"content": [
|
|
99
|
+
"Each recipe's effect includes its prerequisite recipes (run first, in listed order).",
|
|
100
|
+
{ "include": "make-recipes.md" }
|
|
17
101
|
]
|
|
18
102
|
}
|
|
19
103
|
]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "herbctl",
|
|
3
|
+
"title": "herbctl",
|
|
4
|
+
"description": "The herbstluftwm keybind imperatives: every composite mod- binding as a get-* verb - the float-layer state machines, the zoom register, the navigation chains - compiled to a standalone bunli binary.",
|
|
5
|
+
"github": "https://github.com/akinevz2/herbctl",
|
|
6
|
+
"content": {
|
|
7
|
+
"heading": "herbctl - the keybind imperatives, as a native binary",
|
|
8
|
+
"content": [
|
|
9
|
+
"herbctl owns what the keybinds used to express as inline herbstluftwm chains: one verb per mod-key binding, each a faithful port of the tuned chain (or state machine) it replaces - compiled to a standalone executable with Bun and bunli, so the keybinds spawn binaries, not scripts.",
|
|
10
|
+
"[https://github.com/akinevz2/herbctl](https://github.com/akinevz2/herbctl)",
|
|
11
|
+
{
|
|
12
|
+
"heading": "The verbs",
|
|
13
|
+
"theme": "open",
|
|
14
|
+
"content": [
|
|
15
|
+
"Named for what they fetch, not for the key that triggers them:",
|
|
16
|
+
"get-south (mod-s) - the zoom/peek grid: urgent first (gated on the tag's urgent count), frame-down focus, the floating-layer branch (focus the layer and un-float via the tag's focused_client - the alias resolves stale mid-chain), cycle and pseudotile fallbacks.",
|
|
17
|
+
"get-forward (mod-w), get-shuffle (mod-shift-w) - leave-float and cycle-up; the shift ladder ends in a frame-tree rotate.",
|
|
18
|
+
"get-deck (mod-d), get-dedeck (mod-shift-d) - layout cyclers gated on frame occupancy; dedeck collapses to remove.",
|
|
19
|
+
"get-explore (mod-e), get-advice (mod-a) - explode/cycle and frame-focus-or-split pairs.",
|
|
20
|
+
"get-below (mod-shift-b), get-dive (mod-ctrl-a), get-toss (mod-ctrl-e) - split+shift directions.",
|
|
21
|
+
"get-quiet (mod-q), get-hold (mod-shift-q), get-wrench (mod-ctrl-q) - the close/quit family: floats only un-float, empty frames collapse, xkill for the stubborn.",
|
|
22
|
+
"get-tuck (mod-shift-t) - the frame half of split-auto: the dots keybind chains it with the terminal spawn so the split only happens for a window that actually arrives.",
|
|
23
|
+
"get-vex/get-bend (mod-v/mod-b) and get-vexi/get-bendi (mod-ctrl-v/mod-ctrl-b) - the split-into-direction family.",
|
|
24
|
+
"get-hush (mod-shift-f) - fullscreen toggle; get-nap (mod-shift-z) - minimize toggle."
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"heading": "The state machines",
|
|
29
|
+
"theme": "open",
|
|
30
|
+
"content": [
|
|
31
|
+
"Three bindings carry whole register machines, ported branch for branch with the dots scripts as the contract:",
|
|
32
|
+
"get-zoom (mod-ctrl-f, the hc_zoom port) - press-count register: tile the float, maximize onto a dedicated <tag>-max tag (state recorded in hlwm env, a per-tag janitor daemon tidies up), restore.",
|
|
33
|
+
"get-extracted (mod-x, the hc_floatx port) - the layer-yank machine: focus a float and un-float it, yank the focused window into the float session (the vacated frame is never closed), defer to the tiling layer, drop a float back into an empty frame, and the no-floats tidying branch.",
|
|
34
|
+
"get-focus (mod-f, the hc_focus port) - the quick float toggle: no focus chasing, the register handled by hlwm itself.",
|
|
35
|
+
"Every branch is pinned by tests that mock the herbstclient binary and assert the exact command argv - no live WM is ever touched by the suite."
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"heading": "Links",
|
|
40
|
+
"theme": "open",
|
|
41
|
+
"content": [
|
|
42
|
+
{
|
|
43
|
+
"heading": "GitHub repository",
|
|
44
|
+
"link": "https://github.com/akinevz2/herbctl"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"heading": "herbstutil (the primitives underneath)",
|
|
48
|
+
"link": "https://github.com/akinevz2/herbstutil"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"heading": "doftiles (the keybinds that spawn it)",
|
|
52
|
+
"link": "https://github.com/akinevz2/doftiles"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"slug": "herbstutil",
|
|
3
3
|
"title": "herbstutil",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "The herbstluftwm compatibility layer: herbstclient attr output as clean typed JSON, shell completion mirroring herbstclient's own, and the parse/attr primitives every sibling tool builds on.",
|
|
5
5
|
"github": "https://github.com/akinevz2/herbstutil",
|
|
6
6
|
"content": {
|
|
7
7
|
"heading": "herbstutil - JSON bridge to herbstluftwm",
|
|
8
8
|
"content": [
|
|
9
|
-
"herbstutil is a small command-line
|
|
9
|
+
"herbstutil is a small command-line tool that turns the output of `herbstclient attr` into clean, typed JSON - so the state of the herbstluftwm window manager can be consumed wherever JSON is spoken. It can run herbstclient itself (`herbstutil attr ...`) or parse piped output like a unix filter.",
|
|
10
10
|
"[https://github.com/akinevz2/herbstutil](https://github.com/akinevz2/herbstutil)",
|
|
11
11
|
{
|
|
12
12
|
"heading": "herbstluftwm in a nutshell",
|
|
13
|
-
"anchor": "herbstluftwm",
|
|
14
13
|
"theme": "open",
|
|
15
14
|
"content": [
|
|
16
15
|
"herbstluftwm is a manual tiling window manager for Linux. Its core idea: the whole desktop is one global object tree - monitors, tags, clients (windows), settings - queried and modified over IPC with the companion tool herbstclient.",
|
|
@@ -21,39 +20,51 @@
|
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
"heading": "What herbstutil does",
|
|
24
|
-
"
|
|
25
|
-
"status": "early release",
|
|
23
|
+
"status": "v0.3.x - the compatibility layer",
|
|
26
24
|
"theme": "open",
|
|
27
25
|
"content": [
|
|
28
|
-
"herbstutil
|
|
29
|
-
"value - the node's description; children - the names of the child nodes; attributes - every attribute as a name-value pair.",
|
|
26
|
+
"herbstutil rebuilds `herbstclient attr` output as JSON, preserving the node's shape: value - the node's description; children - the names of the child nodes; attributes - every attribute as a name-value pair.",
|
|
30
27
|
"Where herbstclient speaks humans, herbstutil speaks machine.",
|
|
28
|
+
"It does not stop at unquoting: herbstclient annotates every attribute with a type hint in the first column of its listing, and herbstutil uses that hint to emit properly typed JSON.",
|
|
29
|
+
{
|
|
30
|
+
"heading": "Value typing",
|
|
31
|
+
"theme": "open",
|
|
32
|
+
"content": [
|
|
33
|
+
"s (string) - JSON string, outer quotes stripped",
|
|
34
|
+
"b (bool) - JSON boolean",
|
|
35
|
+
"i, u (int, uint) - JSON number",
|
|
36
|
+
"R (rectangle) - `WIDTHxHEIGHT+X+Y` becomes an object { x, y, width, height }",
|
|
37
|
+
"p (point) - `XxY` becomes an object { x, y }",
|
|
38
|
+
"c, r, n, f (color, regex, named value, font) - string",
|
|
39
|
+
"Leaf values (a single attribute) print no type hint, so a heuristic decides there: true/false become booleans, integers and decimals become numbers, everything else stays a string."
|
|
40
|
+
]
|
|
41
|
+
},
|
|
31
42
|
{
|
|
32
43
|
"heading": "Usage",
|
|
33
44
|
"theme": "open",
|
|
34
45
|
"content": [
|
|
35
|
-
"herbstutil
|
|
36
|
-
"```sh\n$ herbstclient attr clients. | herbstutil\n$ herbstclient attr clients.
|
|
46
|
+
"Two ways to the same JSON: let herbstutil run herbstclient for you, or pipe herbstclient through the parse filter (the default command). Built with Bun and bunli, packaged as a single executable:",
|
|
47
|
+
"```sh\n$ herbstutil attr clients.focus. # runs herbstclient attr and parses it\n$ herbstclient attr clients. | herbstutil parse\n$ herbstclient attr clients. | herbstutil # parse is the default command\n```",
|
|
37
48
|
"s, --space <n> - pretty-print with `n` spaces of indentation (default 4)",
|
|
38
|
-
"
|
|
49
|
+
"e, --escape - skip all type conversion and keep every value exactly as herbstclient printed it: strings keep their literal quotes, escaped inside the JSON string",
|
|
50
|
+
"`parse` refuses to run attached to a terminal: as a filter it always reads from stdin."
|
|
39
51
|
]
|
|
40
52
|
}
|
|
41
53
|
]
|
|
42
54
|
},
|
|
43
55
|
{
|
|
44
56
|
"heading": "Examples",
|
|
45
|
-
"anchor": "examples",
|
|
46
57
|
"theme": "open",
|
|
47
58
|
"content": [
|
|
48
|
-
"The same
|
|
59
|
+
"The same nodes, before and after herbstutil.",
|
|
49
60
|
{
|
|
50
61
|
"heading": "Root node: herbstclient attr clients.",
|
|
51
62
|
"theme": "open",
|
|
52
63
|
"content": [
|
|
53
64
|
"Raw:",
|
|
54
|
-
"```text\n$ herbstclient attr clients.\nThe managed windows. For every (managed) window id there is an entry here.\n\
|
|
55
|
-
"
|
|
56
|
-
"```json\n{\n \"value\": \"The managed windows. For every (managed) window id there is an entry here.\",\n \"children\": [\n \"
|
|
65
|
+
"```text\n$ herbstclient attr clients.\nThe managed windows. For every (managed) window id there is an entry here.\n\n4 children:\n 0x280003.\n 0x680004.\n 0x900003.\n focus.\n0 attributes.\n .---- type\n | .-- writable\n | | .-- hookable\n V V V\n```",
|
|
66
|
+
"Through herbstutil:",
|
|
67
|
+
"```json\n{\n \"value\": \"The managed windows. For every (managed) window id there is an entry here.\",\n \"children\": [\n \"0x280003.\",\n \"0x680004.\",\n \"0x900003.\",\n \"focus.\"\n ],\n \"attributes\": {}\n}\n```"
|
|
57
68
|
]
|
|
58
69
|
},
|
|
59
70
|
{
|
|
@@ -61,10 +72,10 @@
|
|
|
61
72
|
"theme": "open",
|
|
62
73
|
"content": [
|
|
63
74
|
"Raw (excerpt):",
|
|
64
|
-
"```text\n$ herbstclient attr clients.focus.\na managed window\n\n1 child:\n parent_frame.\n24 attributes:\n s - - class = \"Alacritty\"\n
|
|
65
|
-
"
|
|
66
|
-
"```json\n{\n \"value\": \"a managed window\",\n \"children\": [\n \"parent_frame.\"\n ],\n \"attributes\": {\n \"class\": \"
|
|
67
|
-
"
|
|
75
|
+
"```text\n$ herbstclient attr clients.focus.\na managed window\n\n1 child:\n parent_frame.\n24 attributes:\n .---- type\n | .-- writable\n | | .-- hookable\n V V V\n s - - class = \"Alacritty\"\n R - h content_geometry = 1255x662+13+34\n s - - class = \"Alacritty\"\n R - h content_geometry = 1255x662+13+34\n b w h decorated = true\n i - h pid = 403112\n s - - tag = \"work\"\n s - h title = \"OC | herbstutil tag 0.1.1b discrepancy\"\n b - h visible = true\n s - h winid = \"0x280003\"\n```",
|
|
76
|
+
"Through herbstutil (excerpt - all 24 attributes arrive in the JSON):",
|
|
77
|
+
"```json\n{\n \"value\": \"a managed window\",\n \"children\": [\n \"parent_frame.\"\n ],\n \"attributes\": {\n \"class\": \"Alacritty\",\n \"content_geometry\": {\n \"x\": 13,\n \"y\": 34,\n \"width\": 1255,\n \"height\": 662\n },\n \"decorated\": true,\n \"pid\": 403112,\n \"tag\": \"work\",\n \"title\": \"OC | herbstutil tag 0.1.1b discrepancy\",\n \"visible\": true,\n \"winid\": \"0x280003\"\n }\n}\n```",
|
|
78
|
+
"Attribute values arrive typed: strings unquoted, booleans and numbers real, rectangles as objects - herbstclient's type hint drives the conversion. Pass `--escape` to keep the raw text instead."
|
|
68
79
|
]
|
|
69
80
|
},
|
|
70
81
|
{
|
|
@@ -73,12 +84,31 @@
|
|
|
73
84
|
"content": [
|
|
74
85
|
"Raw:",
|
|
75
86
|
"```text\n$ herbstclient attr clients.focus.tag\nwork\n```",
|
|
76
|
-
"
|
|
87
|
+
"Through herbstutil:",
|
|
77
88
|
"```json\n{\n \"value\": \"work\",\n \"children\": [],\n \"attributes\": {}\n}\n```"
|
|
78
89
|
]
|
|
79
90
|
}
|
|
80
91
|
]
|
|
81
92
|
},
|
|
93
|
+
{
|
|
94
|
+
"heading": "The pure layer (the v0.3 split)",
|
|
95
|
+
"theme": "open",
|
|
96
|
+
"content": [
|
|
97
|
+
"herbstutil stayed deliberately small: parse/attr primitives only. The keybind state machines that briefly lived here (the mod-s/w/d/e/a/q/f/x compositions and the float registers) moved out to herbctl - its own project, one floor down on this page.",
|
|
98
|
+
"Everything downstream (herbctl, polyframes) imports parseAttr directly, bundled at build time; the CLI verbs stay for scripts and humans."
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"heading": "Shell completion, mirroring herbstclient",
|
|
103
|
+
"theme": "open",
|
|
104
|
+
"content": [
|
|
105
|
+
"herbstclient's completion model: the binary does the thinking (complete_shell <pos> <words...>), the shell scripts just delegate. herbstutil mirrors it - the complete-shell verb, plus bash/zsh scripts that are byte-structure twins of hlwm's own.",
|
|
106
|
+
"The attr verb's positional completes LIVE hlwm object paths: the request is delegated to herbstclient -q complete_shell itself, so clients.0x…, tags.by-name. and every attribute name arrive straight from the running WM.",
|
|
107
|
+
"Install the completion with the package scripts:",
|
|
108
|
+
"```sh\n$ npm run completion:install # bash + zsh, user-level\n$ herbstutil attr clients.<TAB> # the live tree, in your shell\n```",
|
|
109
|
+
"Published on npm: `npm i -g herbstutil` gives the command (it runs through bun) - or install from source with bun run build."
|
|
110
|
+
]
|
|
111
|
+
},
|
|
82
112
|
{
|
|
83
113
|
"heading": "Links",
|
|
84
114
|
"theme": "open",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "on-deploy",
|
|
3
|
+
"title": "on-deploy",
|
|
4
|
+
"description": "The doftiles deployment orchestrator: verifies the WM-stack binaries, installs the missing ones through per-platform deploy scripts, and provisions the session stack from declarative profiles.",
|
|
5
|
+
"github": "https://github.com/akinevz2/on-deploy",
|
|
6
|
+
"content": {
|
|
7
|
+
"heading": "on-deploy - the deployment orchestrator",
|
|
8
|
+
"content": [
|
|
9
|
+
"on-deploy turns the dotfiles repo into a one-command deployment. It runs inside the doftiles checkout and reads two manifests: wm.requires (the required binaries; the last line names the platform - ubuntu, arch, ... - selecting the <target>.deploy resolver) and deploy.profile (how the graphical session starts).",
|
|
10
|
+
"[https://github.com/akinevz2/on-deploy](https://github.com/akinevz2/on-deploy)",
|
|
11
|
+
{
|
|
12
|
+
"heading": "The verbs",
|
|
13
|
+
"theme": "open",
|
|
14
|
+
"content": [
|
|
15
|
+
"check - report the requirement state; exit 1 when anything is missing (also --json).",
|
|
16
|
+
"deploy - install every missing binary: resolve the package, show the command, confirm (Enter = yes), run it, then re-verify - a binary still missing after its command fails the run. --yes for non-interactive runs; --dry-run to preview.",
|
|
17
|
+
"provision - platform services per profile: the X server set, the ~/.xinitrc session line, a greetd + tuigreet greeter, the nested stack packages.",
|
|
18
|
+
"snapshot - collect a machine's pre-existing config into doftiles' defaults/ (a stow-shaped package) BEFORE the first deploy overwrites it - the machine's prior state, versioned in git, restorable with one make target.",
|
|
19
|
+
"configure - edit the deploy target and the required-package list from an interactive menu (or --target/--add/--remove flags)."
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"heading": "The profiles",
|
|
24
|
+
"theme": "open",
|
|
25
|
+
"content": [
|
|
26
|
+
"Four session models, co-installable where it makes sense:",
|
|
27
|
+
"wsl - hlwm as a systemd user unit waiting for the Windows-side X server (VcXsrv); provision even checks the Windows partition for VcXsrv and offers a silent install from the SourceForge feed.",
|
|
28
|
+
"nested - hlwm inside an Xvfb framebuffer, shared over VNC and browser noVNC - the temporary profile, additive to a primary one.",
|
|
29
|
+
"xinit - startx runs ~/.xinitrc; no display manager.",
|
|
30
|
+
"greetd - greetd + tuigreet own the console.",
|
|
31
|
+
"A profile declares units (systemd user units, enabled additively) and env overrides (written to ~/.config/doftiles/env, read by the units via EnvironmentFile)."
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"heading": "Built to not hang, not lie",
|
|
36
|
+
"theme": "open",
|
|
37
|
+
"content": [
|
|
38
|
+
"Non-interactive runs abort cleanly demanding --yes instead of blocking on prompts; every install is re-verified; a failed install fails the run. The prompts ride a raw line reader (bun's readline wedges), and the menu works scripted or interactive."
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"heading": "Links",
|
|
43
|
+
"theme": "open",
|
|
44
|
+
"content": [
|
|
45
|
+
{
|
|
46
|
+
"heading": "GitHub repository",
|
|
47
|
+
"link": "https://github.com/akinevz2/on-deploy"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"heading": "doftiles (what it deploys)",
|
|
51
|
+
"link": "https://github.com/akinevz2/doftiles"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|