Compare commits

..

2 commits

Author SHA1 Message Date
0b97f65691 homes: bazin: enable zsh notifications
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2024-02-13 11:09:49 +00:00
7f005d1723 home: zsh: add 'zsh-done' 2024-02-13 11:09:49 +00:00
2 changed files with 3 additions and 13 deletions

View file

@ -25,12 +25,6 @@
zsh = {
notify = {
enable = true;
ssh = {
enable = true;
useOsc777 = false; # notify-send is proxied to the ChromeOS layer
};
};
};
};

View file

@ -19,11 +19,7 @@ in
notify = {
enable = mkEnableOption "zsh-done notification";
ssh = {
enable = mkEnableOption "notify through SSH/non-graphical connections";
useOsc777 = lib.my.mkDisableOption "use OSC-777 for notifications";
};
enableSsh = mkEnableOption "notify through SSH connections";
};
};
@ -118,11 +114,11 @@ in
# don't use `mkIf`
localVariables = { }
# Enable `zsh-done` through SSH, if configured
// lib.optionalAttrs cfg.notify.ssh.enable { DONE_ALLOW_NONGRAPHICAL = 1; }
// lib.optionalAttrs cfg.notify.enableSsh { DONE_ALLOW_NONGRAPHICAL = 1; }
;
# Use OSC-777 to send the notification through SSH
initExtra = lib.mkIf cfg.notify.ssh.useOsc777 ''
initExtra = lib.mkIf cfg.notify.enableSsh ''
done_send_notification() {
local exit_status="$1"
local title="$2"