aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/autostart/README.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-17 09:54:18 +0200
committerDanilo M. <danix@danix.xyz>2026-10-17 09:54:18 +0200
commit66049c965139d821747ea76960b1e91316f8110a (patch)
tree45ac7a387ea02c1cc8d26e104f6e69a96d3880ed /desktop/modules/autostart/README.md
parent4513a506fc575f880db80f05bb3a9cdf7dc100e0 (diff)
downloadquickshell-66049c965139d821747ea76960b1e91316f8110a.tar.gz
quickshell-66049c965139d821747ea76960b1e91316f8110a.zip
desktop: a settings window, and autostart as its first page
The drawer's tiles were turning into a full settings app. The drawer stays the quick area, live state and things toggled often; pages set once and left alone go to a settings window, a normal Hyprland toplevel listing them down the left. A module joins with settings: true, which also drops its tile. A gear tile and ipc call settings open|toggle reach it. Autostart edits hypr-theme's autostart.lua directly, line by line: an hl.exec_cmd line is an entry, behind -- it is disabled, everything else passes through. Edits refuse when their line moved since the parse, and writes are atomic because Hyprland reloads on every change. A wrong entry only shows at the next login, so adding is guided rather than a free text field: pick an installed app or type a command whose program must resolve on PATH before Add enables, then a workspace and silent, composed into a [workspace X silent] rule. Try runs the line through hyprctl dispatch so the rule applies as at login. Existing rows get no Try: they ran at login, and a second start stacks an instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/autostart/README.md')
-rw-r--r--desktop/modules/autostart/README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/desktop/modules/autostart/README.md b/desktop/modules/autostart/README.md
new file mode 100644
index 0000000..eea0c53
--- /dev/null
+++ b/desktop/modules/autostart/README.md
@@ -0,0 +1,39 @@
+# autostart
+
+What Hyprland launches at login: hypr-theme's `sections/autostart.lua`, which
+this page owns. It lives in the settings window, not the drawer, because it is
+set once and left alone.
+
+Adding is guided, because a wrong entry only shows at the next login. Pick
+an installed app (the launcher's `.desktop` entries, Exec line minus its
+`%U`-style field codes; terminal apps are left out and go through Command), or
+type a command. Either way the program is looked up on PATH as it changes, past
+`VAR=value`, `env`, `exec` and into `sh -c '...'`, and Add stays disabled until
+it resolves. A workspace (the scratchpad, 1 to 8, or any name in use) and
+silent become a `[workspace <name> silent]` rule. Try starts the composed line
+through `hyprctl dispatch hl.dsp.exec_cmd(...)`, so the rule applies as at
+login. Existing rows show their rule and a red mark when their program is no
+longer found. They have no Try: they already ran at login, and a second start
+stacks a second instance. Arguments are not checked, only the program.
+
+The file is walked line by line. A line that is exactly `hl.exec_cmd("...")`
+is an entry, the same line behind `-- ` is a disabled entry, and every other
+line passes through untouched. The switch comments a line in and out, Remove
+asks once and deletes it, and the field at the bottom adds an enabled line
+before the hook's closing `end)`. The file therefore carries no comments,
+since deleting an entry would orphan the one above it; the reason behind each
+line lives in the launched project's own docs.
+
+Every edit is made on the text as last read and refused if its line is no
+longer what was parsed, so an edit in an editor meanwhile is never
+overwritten blind: the page reloads and asks to try again. Writes are atomic,
+because Hyprland reloads its config on every change and must never see a
+half-written file.
+
+`hyprland.start` fires once per session, so a change applies at next login.
+
+Not handled: a command spread over several lines or written as a `[[...]]`
+long string is not an entry and is left alone, and only the `\"` and `\\`
+escapes are decoded.
+
+Check: `node desktop/modules/autostart/test_autostart.js`.