diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 09:21:35 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 09:21:35 +0200 |
| commit | 9870cc985dd0b2cde2ebd2234579c03abfa86416 (patch) | |
| tree | 8cb2fa870171480280b78da40a58ef1b894153bc | |
| parent | 8b7cba33ebbcd9e4227f1a5e8b41ca9f291185e9 (diff) | |
| download | unified-desktop-theme-9870cc985dd0b2cde2ebd2234579c03abfa86416.tar.gz unified-desktop-theme-9870cc985dd0b2cde2ebd2234579c03abfa86416.zip | |
feat: link the conky bin dir, and restart conky silently
bin/ holds the weather fetch script that conky.text runs on an execi, so
it needs the same symlink treatment as lib/ and widgets/.
The restart now goes through hyprctl with `[workspace special:dash
silent]`. The dashboard's window rule puts it on that workspace but
cannot suppress the switch to it, so before this every reinstall threw
the dashboard up over whatever was on screen. Guarded by a check for a
running Hyprland, falling back to a plain exec elsewhere, since the
workspace rule is the only reason hyprctl is involved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| -rwxr-xr-x | install.sh | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -187,6 +187,8 @@ ln -sfn "$conky_repo/conky.conf" "$HOME/.config/conky/conky.conf" ln -sfn "$conky_repo/dashboard.lua" "$HOME/.config/conky/dashboard.lua" ln -sfn "$conky_repo/lib" "$HOME/.config/conky/lib" ln -sfn "$conky_repo/widgets" "$HOME/.config/conky/widgets" +# bin/ holds the weather fetch script, which conky.text runs on an execi. +ln -sfn "$conky_repo/bin" "$HOME/.config/conky/bin" # Reload what is running. Writing the configs is not enough: waybar, kitty and # Hyprland reread on a signal, conky only on a restart, and rofi @@ -213,7 +215,18 @@ if pgrep -x conky >/dev/null 2>&1; then # It resolves to the same file, but the dashboard's own docs tell the user # to launch it this way from autostart.lua, and two launch paths that # disagree in form are how they later drift apart in effect. - (conky -c "$HOME/.config/conky/conky.conf" -d >/dev/null 2>&1 &) + # `[workspace special:dash silent]`: without it the dashboard's own window + # rule puts it on that workspace but cannot suppress the switch, so every + # reinstall pops the dashboard open over whatever is on screen. Matches + # how hypr-theme's autostart launches it. + # Launched THROUGH hyprctl so the workspace rule applies; falls back to a + # plain exec where Hyprland is not running, since conky itself does not + # need it. + if command -v hyprctl >/dev/null 2>&1 && [ -n "${HYPRLAND_INSTANCE_SIGNATURE:-}" ]; then + hyprctl dispatch 'hl.dsp.exec_cmd("[workspace special:dash silent] conky -c ~/.config/conky/conky.conf -d")' >/dev/null 2>&1 + else + (conky -c "$HOME/.config/conky/conky.conf" -d >/dev/null 2>&1 &) + fi reloaded="$reloaded conky" fi |
