Drop the systemd running on advice from outfoxxed

This commit is contained in:
David Heinemeier Hansson
2026-05-19 11:20:29 +02:00
parent 2896fc5c98
commit c6d7aa9494
11 changed files with 32 additions and 60 deletions
+5 -5
View File
@@ -107,9 +107,9 @@ When testing layer-shell UI, capture the reference and candidate states as separ
# Omarchy shell # Omarchy shell
The Quickshell desktop runs as a single long-running process out of The Quickshell desktop runs as a single long-running process out of
`shell/`. The `omarchy-shell.service` user unit `shell/`. Hyprland autostart launches it directly with `quickshell -p`; do
keeps it running for the graphical session; do not start additional not start additional standalone `quickshell -p` instances for individual
standalone `quickshell -p` instances for individual components. components.
Run `omarchy-restart-shell` after making changes to QML files. Run `omarchy-restart-shell` after making changes to QML files.
@@ -130,8 +130,8 @@ Plugin contract:
IPC: IPC:
- `bin/omarchy-shell` is the canonical IPC entry point. It forwards to - `bin/omarchy-shell` is the canonical IPC entry point. It forwards to
the running shell service and does not start it. Prefer it over the running shell and does not start it. Prefer it over re-implementing
re-implementing direct Quickshell socket calls in every CLI. direct Quickshell socket calls in every CLI.
- The `shell` IPC target exposes `ping`, `summon`, `hide`, `toggle`, - The `shell` IPC target exposes `ping`, `summon`, `hide`, `toggle`,
`rescanPlugins`, `setPluginEnabled`, and `listPlugins`. Individual `rescanPlugins`, `setPluginEnabled`, and `listPlugins`. Individual
plugins can register additional IPC targets (the bar registers `bar`, plugins can register additional IPC targets (the bar registers `bar`,
-1
View File
@@ -12,7 +12,6 @@ if [[ -f $FIRST_RUN_MODE ]]; then
bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh" bash "$OMARCHY_PATH/install/first-run/battery-monitor.sh"
bash "$OMARCHY_PATH/install/first-run/recover-internal-monitor.sh" bash "$OMARCHY_PATH/install/first-run/recover-internal-monitor.sh"
bash "$OMARCHY_PATH/install/first-run/omarchy-shell.sh"
bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh" bash "$OMARCHY_PATH/install/first-run/cleanup-reboot-sudoers.sh"
bash "$OMARCHY_PATH/install/first-run/firewall.sh" bash "$OMARCHY_PATH/install/first-run/firewall.sh"
bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh" bash "$OMARCHY_PATH/install/first-run/dns-resolver.sh"
+5 -2
View File
@@ -3,5 +3,8 @@
# omarchy:summary=Restart the Omarchy shell # omarchy:summary=Restart the Omarchy shell
# omarchy:examples=omarchy restart shell # omarchy:examples=omarchy restart shell
systemctl --user enable omarchy-shell.service >/dev/null CONFIG_DIR="$OMARCHY_PATH/shell"
systemctl --user restart omarchy-shell.service
if ! quickshell reload -p "$CONFIG_DIR" >/dev/null 2>&1; then
setsid quickshell -n -p "$CONFIG_DIR" >/dev/null 2>&1 &
fi
+2 -2
View File
@@ -8,8 +8,8 @@ if [[ $# -eq 0 || $1 == "-h" || $1 == "--help" ]]; then
cat <<USAGE cat <<USAGE
Usage: omarchy-shell <target> <method> [args...] Usage: omarchy-shell <target> <method> [args...]
Forwards an IPC call to the supervised omarchy-shell service. The shell is Forwards an IPC call to the running Omarchy shell. The shell is expected
expected to already be running; this command does not start it. to already be running; this command does not start it.
Examples: Examples:
omarchy-shell shell ping omarchy-shell shell ping
-17
View File
@@ -1,17 +0,0 @@
[Unit]
Description=Omarchy Shell
PartOf=graphical-session.target
After=graphical-session.target
StartLimitIntervalSec=30
StartLimitBurst=5
[Service]
Type=exec
Environment=OMARCHY_PATH=%h/.local/share/omarchy
ExecStart=/usr/bin/quickshell -p %h/.local/share/omarchy/shell
Restart=always
RestartSec=2
Slice=session-graphical.slice
[Install]
WantedBy=graphical-session.target
+1 -1
View File
@@ -3,7 +3,7 @@ hl.on("hyprland.start", function()
hl.exec_cmd("systemctl --user import-environment $(env | cut -d'=' -f 1)") hl.exec_cmd("systemctl --user import-environment $(env | cut -d'=' -f 1)")
hl.exec_cmd("dbus-update-activation-environment --systemd --all") hl.exec_cmd("dbus-update-activation-environment --systemd --all")
hl.exec_cmd("systemctl --user start omarchy-shell.service") hl.exec_cmd("quickshell -n -p $HOME/.local/share/omarchy/shell")
hl.exec_cmd("uwsm-app -- hypridle") hl.exec_cmd("uwsm-app -- hypridle")
hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem") hl.exec_cmd("uwsm-app -- fcitx5 --disable notificationitem")
hl.exec_cmd("omarchy-first-run") hl.exec_cmd("omarchy-first-run")
-4
View File
@@ -1,4 +0,0 @@
mkdir -p ~/.config/systemd/user
cp "$OMARCHY_PATH/config/systemd/user/omarchy-shell.service" ~/.config/systemd/user/omarchy-shell.service
systemctl --user daemon-reload
systemctl --user enable --now omarchy-shell.service
+2 -11
View File
@@ -1,17 +1,8 @@
echo "Run omarchy-shell as a supervised user service" echo "Use omarchy-shell as the Quickshell IPC entry point"
mkdir -p ~/.config/systemd/user
cp "$OMARCHY_PATH/config/systemd/user/omarchy-shell.service" ~/.config/systemd/user/omarchy-shell.service
systemctl --user daemon-reload
for file in ~/.config/hypr/bindings.lua ~/.config/hypr/bindings/*.lua; do for file in ~/.config/hypr/bindings.lua ~/.config/hypr/bindings/*.lua; do
[[ -f $file ]] || continue [[ -f $file ]] || continue
sed -i 's/omarchy-shell-ipc-fast/omarchy-shell/g; s/omarchy-shell-ipc/omarchy-shell/g; s/omarchy-shell[[:space:]]\+--if-running/omarchy-shell/g' "$file" sed -i 's/omarchy-shell-ipc-fast/omarchy-shell/g; s/omarchy-shell-ipc/omarchy-shell/g; s/omarchy-shell[[:space:]]\+--if-running/omarchy-shell/g' "$file"
done done
if ! systemctl --user is-active --quiet omarchy-shell.service && omarchy-cmd-present quickshell; then omarchy-restart-shell
quickshell kill -p "$OMARCHY_PATH/shell" >/dev/null 2>&1 || true
quickshell kill -p "$OMARCHY_PATH/default/quickshell"/omarchy-shell >/dev/null 2>&1 || true
fi
systemctl --user enable --now omarchy-shell.service || true
+1 -7
View File
@@ -1,13 +1,7 @@
echo "Move omarchy-shell to the top-level shell directory" echo "Move omarchy-shell to the top-level shell directory"
mkdir -p ~/.config/systemd/user
cp "$OMARCHY_PATH/config/systemd/user/omarchy-shell.service" ~/.config/systemd/user/omarchy-shell.service
systemctl --user daemon-reload
if omarchy-cmd-present quickshell; then if omarchy-cmd-present quickshell; then
quickshell kill -p "$OMARCHY_PATH/default/quickshell"/omarchy-shell >/dev/null 2>&1 || true quickshell kill -p "$OMARCHY_PATH/default/quickshell"/omarchy-shell >/dev/null 2>&1 || true
fi fi
if systemctl --user is-enabled --quiet omarchy-shell.service || systemctl --user is-active --quiet omarchy-shell.service; then omarchy-restart-shell
systemctl --user restart omarchy-shell.service || true
fi
+7
View File
@@ -0,0 +1,7 @@
echo "Remove the omarchy-shell user service"
systemctl --user disable --now omarchy-shell.service >/dev/null 2>&1 || true
rm -f ~/.config/systemd/user/omarchy-shell.service
systemctl --user daemon-reload >/dev/null 2>&1 || true
omarchy-restart-shell
+9 -10
View File
@@ -1,10 +1,10 @@
# Omarchy shell # Omarchy shell
`omarchy-shell` is a single long-running [Quickshell](https://quickshell.org/) `omarchy-shell` is a single long-running [Quickshell](https://quickshell.org/)
instance that hosts the Omarchy desktop. A supervised user systemd service instance that hosts the Omarchy desktop. Hyprland autostart launches one shell
keeps one shell running per graphical session; everything else — the bar, per graphical session; everything else — the bar, the bar settings UI, the
the bar settings UI, the background switcher, future panels and overlays — background switcher, future panels and overlays — runs **inside** the shell as
runs **inside** the shell as a plugin. a plugin.
Hosting everything inside one shell means: Hosting everything inside one shell means:
@@ -119,13 +119,12 @@ Direct invocation:
quickshell ipc -p $OMARCHY_PATH/shell call shell ping quickshell ipc -p $OMARCHY_PATH/shell call shell ping
``` ```
The `omarchy-shell.service` user unit starts the shell for the graphical Hyprland autostart launches the shell directly with `quickshell -p
session and restarts it if it exits. Use `omarchy-restart-shell` to reload $OMARCHY_PATH/shell`. Use `omarchy-restart-shell` (`quickshell reload`) to
the long-running shell process. reload the long-running shell process.
A convenience wrapper, [`omarchy-shell`](../bin/omarchy-shell), A convenience wrapper, [`omarchy-shell`](../bin/omarchy-shell), forwards IPC
forwards IPC calls to the running service. It does not start the shell; the calls to the running shell. It does not start the shell.
systemd unit owns the shell lifecycle.
``` ```
omarchy-shell shell ping omarchy-shell shell ping