From 76f2982167024cd7307fcb7565beca0230938f4e Mon Sep 17 00:00:00 2001 From: Hadi Date: Thu, 4 Jun 2026 16:35:15 +0200 Subject: [PATCH] run in background Signed-off-by: Hadi --- home/system/caelestia-shell/default.nix | 8 +++++++- home/system/caelestia-shell/launcher.nix | 15 +++++++++++++++ home/system/hyprland/default.nix | 4 ++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/home/system/caelestia-shell/default.nix b/home/system/caelestia-shell/default.nix index bb97cd6..b7c4e94 100644 --- a/home/system/caelestia-shell/default.nix +++ b/home/system/caelestia-shell/default.nix @@ -58,7 +58,13 @@ ]; # shell.json is managed by home-manager (read-only symlink) but caelestia - # needs to write to it at runtime: replace the symlink with a mutable copy + # needs to write to it at runtime: replace the symlink with a mutable copy. + # The stale .hm-backup must be removed before linkGeneration so HM can + # back up the runtime-modified shell.json without hitting a conflict. + home.activation.caelestiaCleanBackup = lib.hm.dag.entryBefore ["linkGeneration"] '' + $DRY_RUN_CMD rm -f "$HOME/.config/caelestia/shell.json.hm-backup" + ''; + home.activation.caelestiaWritableShellConfig = lib.hm.dag.entryAfter ["linkGeneration"] '' if [ -L "$HOME/.config/caelestia/shell.json" ]; then $DRY_RUN_CMD cp --remove-destination \ diff --git a/home/system/caelestia-shell/launcher.nix b/home/system/caelestia-shell/launcher.nix index c8047a1..cf90a48 100644 --- a/home/system/caelestia-shell/launcher.nix +++ b/home/system/caelestia-shell/launcher.nix @@ -154,6 +154,21 @@ enabled = true; dangerous = false; } + { + name = "Run in background"; + icon = "play_circle"; + description = "Type and run any shell command in the background"; + command = [ + "ghostty" + "--title=run-bg" + "-e" + "bash" + "-c" + "printf 'Run: '; read -r cmd; [ -n \"$cmd\" ] && hyprctl dispatch exec \"$cmd\"" + ]; + enabled = true; + dangerous = false; + } ]; dragThreshold = 50; enableDangerousActions = false; diff --git a/home/system/hyprland/default.nix b/home/system/hyprland/default.nix index 672fd35..aa158bb 100644 --- a/home/system/hyprland/default.nix +++ b/home/system/hyprland/default.nix @@ -134,6 +134,10 @@ in { "match:class protonvpn-app, float on" "match:class protonvpn-app, center on" "match:class protonvpn-app, size 500 400" + + "match:title run-bg, float on" + "match:title run-bg, center on" + "match:title run-bg, size 700 80" ]; misc = {