diff --git a/nixosModules/ghostty.nix b/nixosModules/ghostty.nix index 4e5e5ec..7b1165b 100644 --- a/nixosModules/ghostty.nix +++ b/nixosModules/ghostty.nix @@ -12,9 +12,7 @@ let if builtins.isString v then ''${k} = "${toString v}"'' else - ''${k} = ${ - if builtins.isBool v then if v then "true" else "false" else toString v - }''; + ''${k} = ${if builtins.isBool v then if v then "true" else "false" else toString v}''; }; configFile = format.generate "ghostty-config" cfg.settings; in @@ -62,6 +60,9 @@ in "14=#85dc85" "15=#e2637f" ]; + mouse-hide-while-typing = true; + app-notifications = "no-clipboard-copy"; + copy-on-select = false; clipboard-read = "allow"; clipboard-write = "allow"; @@ -72,6 +73,8 @@ in ]; auto-update = "off"; + confirm-close-surface = false; + shell-integration = "detect"; } ); diff --git a/nixosModules/zellij/default.nix b/nixosModules/zellij/default.nix index 8c10624..8983709 100644 --- a/nixosModules/zellij/default.nix +++ b/nixosModules/zellij/default.nix @@ -24,12 +24,20 @@ }; in '' + + run_zellij () { + if ! systemctl is-active --quiet --user "zellij$2.scope"; then + systemd-run --scope --unit="zellij$2" --user zellij attach -b "$1" + fi + zellij attach "$1" + } + if [[ -z "$ZELLIJ" ]]; then if [[ -n "$SSH_TTY" ]]; then - zellij attach -c "SSH@$USER" + run_zellij "$SSH@$USER" "" else MONITOR="$(${monitorScript} || true)" - zellij attach -c "''${MONITOR:+"$MONITOR@"}$USER" + run_zellij "''${MONITOR:+"$MONITOR@"}$USER" "-''${MONITOR:+"$MONITOR"}" fi fi '';