Compare commits

..

2 commits

Author SHA1 Message Date
bfe9645bc2
feat: zellij use systemd-run 2025-05-31 12:56:33 -04:00
a3246d5297
feat: set more ghostty options 2025-05-31 12:50:58 -04:00
2 changed files with 16 additions and 5 deletions

View file

@ -12,9 +12,7 @@ let
if builtins.isString v then if builtins.isString v then
''${k} = "${toString v}"'' ''${k} = "${toString v}"''
else else
''${k} = ${ ''${k} = ${if builtins.isBool v then if v then "true" else "false" else toString v}'';
if builtins.isBool v then if v then "true" else "false" else toString v
}'';
}; };
configFile = format.generate "ghostty-config" cfg.settings; configFile = format.generate "ghostty-config" cfg.settings;
in in
@ -62,6 +60,9 @@ in
"14=#85dc85" "14=#85dc85"
"15=#e2637f" "15=#e2637f"
]; ];
mouse-hide-while-typing = true;
app-notifications = "no-clipboard-copy";
copy-on-select = false; copy-on-select = false;
clipboard-read = "allow"; clipboard-read = "allow";
clipboard-write = "allow"; clipboard-write = "allow";
@ -72,6 +73,8 @@ in
]; ];
auto-update = "off"; auto-update = "off";
confirm-close-surface = false;
shell-integration = "detect";
} }
); );

View file

@ -24,12 +24,20 @@
}; };
in 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 [[ -z "$ZELLIJ" ]]; then
if [[ -n "$SSH_TTY" ]]; then if [[ -n "$SSH_TTY" ]]; then
zellij attach -c "SSH@$USER" run_zellij "$SSH@$USER" ""
else else
MONITOR="$(${monitorScript} || true)" MONITOR="$(${monitorScript} || true)"
zellij attach -c "''${MONITOR:+"$MONITOR@"}$USER" run_zellij "''${MONITOR:+"$MONITOR@"}$USER" "-''${MONITOR:+"$MONITOR"}"
fi fi
fi fi
''; '';