Compare commits
2 commits
0b97f65691
...
c044b636e9
| Author | SHA1 | Date | |
|---|---|---|---|
| c044b636e9 | |||
| d6c2948135 |
2 changed files with 13 additions and 3 deletions
|
|
@ -25,6 +25,12 @@
|
|||
zsh = {
|
||||
notify = {
|
||||
enable = true;
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
|
||||
useOsc777 = false; # notify-send is proxied to the ChromeOS layer
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,7 +19,11 @@ in
|
|||
notify = {
|
||||
enable = mkEnableOption "zsh-done notification";
|
||||
|
||||
enableSsh = mkEnableOption "notify through SSH connections";
|
||||
ssh = {
|
||||
enable = mkEnableOption "notify through SSH/non-graphical connections";
|
||||
|
||||
useOsc777 = lib.my.mkDisableOption "use OSC-777 for notifications";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -114,11 +118,11 @@ in
|
|||
# don't use `mkIf`
|
||||
localVariables = { }
|
||||
# Enable `zsh-done` through SSH, if configured
|
||||
// lib.optionalAttrs cfg.notify.enableSsh { DONE_ALLOW_NONGRAPHICAL = 1; }
|
||||
// lib.optionalAttrs cfg.notify.ssh.enable { DONE_ALLOW_NONGRAPHICAL = 1; }
|
||||
;
|
||||
|
||||
# Use OSC-777 to send the notification through SSH
|
||||
initExtra = lib.mkIf cfg.notify.enableSsh ''
|
||||
initExtra = lib.mkIf cfg.notify.ssh.useOsc777 ''
|
||||
done_send_notification() {
|
||||
local exit_status="$1"
|
||||
local title="$2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue