ironbar: Let mullvad handle notifications

Simplifies things a bit.
This commit is contained in:
Donovan Glover 2024-07-15 18:12:15 -04:00
parent 61b5a5dd31
commit 3a8f3bcd32
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, vars, ... }:
{ config, lib, pkgs, ... }:
let
inherit (lib) singleton;
@ -7,7 +7,6 @@ let
inherit (builtins) toJSON;
mullvadScript = "ironbar/mullvad.fish";
mullvadNotification = "ironbar/mullvad-notification.fish";
volumeScript = "ironbar/volume.fish";
volumeGet = "ironbar/volume-get.fish";
in
@ -29,7 +28,7 @@ in
}
{
type = "script";
on_click_left = "~/.config/${mullvadNotification}";
on_click_left = "mullvad relay set location any && mullvad relay set location us";
cmd = "~/.config/${mullvadScript}";
mode = "watch";
}
@ -166,20 +165,6 @@ in
}
'';
xdg.configFile.${mullvadNotification} = {
executable = true;
text = /* fish */ ''
#!/usr/bin/env fish
mullvad relay set location any
mullvad relay set location us
sleep 0.2
${vars.notifySend} "Mullvad" "$(mullvad status | choose 2)"
'';
};
xdg.configFile.${mullvadScript} = {
executable = true;
text = /* fish */ ''