mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-25 01:33:17 +01:00
ironbar(mullvad): Show server identifier in notification
This commit is contained in:
parent
c62c7189a5
commit
a83409f8e6
@ -7,6 +7,7 @@ let
|
|||||||
inherit (pkgs) ironbar inotify-tools;
|
inherit (pkgs) ironbar inotify-tools;
|
||||||
|
|
||||||
mullvadScript = "ironbar/mullvad.fish";
|
mullvadScript = "ironbar/mullvad.fish";
|
||||||
|
mullvadNotification = "ironbar/mullvad-notification.fish";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ ironbar ];
|
home.packages = [ ironbar ];
|
||||||
@ -26,7 +27,7 @@ in
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
type = "script";
|
type = "script";
|
||||||
on_click_left = "notify-send -t 2000 \"Mullvad\" \"Changing location...\" && mullvad relay set location any && mullvad relay set location us";
|
on_click_left = "~/.config/${mullvadNotification}";
|
||||||
cmd = "~/.config/${mullvadScript}";
|
cmd = "~/.config/${mullvadScript}";
|
||||||
mode = "watch";
|
mode = "watch";
|
||||||
}
|
}
|
||||||
@ -160,6 +161,20 @@ 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
|
||||||
|
|
||||||
|
notify-send -t 2000 "Mullvad" "$(mullvad status | choose 2)"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile.${mullvadScript} = {
|
xdg.configFile.${mullvadScript} = {
|
||||||
executable = true;
|
executable = true;
|
||||||
text = /* fish */ ''
|
text = /* fish */ ''
|
||||||
|
Loading…
Reference in New Issue
Block a user