mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-24 17:23:09 +01:00
ironbar: Let mullvad handle notifications
Simplifies things a bit.
This commit is contained in:
parent
61b5a5dd31
commit
3a8f3bcd32
@ -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 */ ''
|
||||
|
Loading…
Reference in New Issue
Block a user