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
|
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 */ ''
|
||||||
|
Loading…
Reference in New Issue
Block a user