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 let
inherit (lib) singleton; inherit (lib) singleton;
@ -7,7 +7,6 @@ let
inherit (builtins) toJSON; inherit (builtins) toJSON;
mullvadScript = "ironbar/mullvad.fish"; mullvadScript = "ironbar/mullvad.fish";
mullvadNotification = "ironbar/mullvad-notification.fish";
volumeScript = "ironbar/volume.fish"; volumeScript = "ironbar/volume.fish";
volumeGet = "ironbar/volume-get.fish"; volumeGet = "ironbar/volume-get.fish";
in in
@ -29,7 +28,7 @@ in
} }
{ {
type = "script"; type = "script";
on_click_left = "~/.config/${mullvadNotification}"; on_click_left = "mullvad relay set location any && mullvad relay set location us";
cmd = "~/.config/${mullvadScript}"; cmd = "~/.config/${mullvadScript}";
mode = "watch"; 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} = { xdg.configFile.${mullvadScript} = {
executable = true; executable = true;
text = /* fish */ '' text = /* fish */ ''