add wg support
This commit is contained in:
parent
14ec1eca2e
commit
b3a36d9dbe
5 changed files with 106 additions and 12 deletions
|
|
@ -1,8 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, repoRoot, ... }:
|
||||
let
|
||||
commands = import ../../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) uwsm term;
|
||||
height = 20;
|
||||
wireguardToggle = "${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_wg.xsh";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -37,6 +38,7 @@ in
|
|||
"clock"
|
||||
"sway/language"
|
||||
"network"
|
||||
"custom/wireguard"
|
||||
"bluetooth"
|
||||
"pulseaudio"
|
||||
"idle_inhibitor"
|
||||
|
|
@ -53,7 +55,7 @@ in
|
|||
spacing = 8;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "| {icon}";
|
||||
format = "| {icon} ";
|
||||
start-activated = true;
|
||||
format-icons = {
|
||||
activated = "🫨";
|
||||
|
|
@ -61,7 +63,7 @@ in
|
|||
};
|
||||
};
|
||||
"sway/language" = {
|
||||
format = "| {short}";
|
||||
format = "| {short} ";
|
||||
tooltip-format = "{long}";
|
||||
};
|
||||
clock = {
|
||||
|
|
@ -72,29 +74,36 @@ in
|
|||
};
|
||||
battery = {
|
||||
interval = 60;
|
||||
format = "| {capacity}%";
|
||||
format = "| {capacity}% ";
|
||||
format-charging = "| ch:{capacity}%";
|
||||
};
|
||||
network = {
|
||||
tooltip-format = "{ifname} = {ipaddr}/{cidr}";
|
||||
format-wifi = "| w:{ipaddr}";
|
||||
format-ethernet = "| e:{ipaddr}";
|
||||
format-linked = "| l:{ipaddr}";
|
||||
format-disconnected = "| d";
|
||||
format-wifi = "| w:{essid} ";
|
||||
format-ethernet = "| e:{ipaddr} ";
|
||||
format-linked = "| l:{ipaddr} ";
|
||||
format-disconnected = "| d ";
|
||||
interval = 15;
|
||||
on-click = "${uwsm} ${term} -e nmtui";
|
||||
};
|
||||
"custom/wireguard" = {
|
||||
exec = "${wireguardToggle} status";
|
||||
on-click = "${wireguardToggle} toggle";
|
||||
format = "| wg:{text} ";
|
||||
interval = 15;
|
||||
tooltip = false;
|
||||
};
|
||||
bluetooth = {
|
||||
format = "| bt:{num_connections}";
|
||||
format = "| bt:{num_connections} ";
|
||||
format-disabled = "";
|
||||
format-no-controller = "";
|
||||
interval = 15;
|
||||
on-click = "${uwsm} ${term} -e bluetui";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "| snd{volume}%";
|
||||
format-muted = "| snd:-";
|
||||
format-bluetooth = "| snd(bt):{volume}%";
|
||||
format = "| snd{volume}% ";
|
||||
format-muted = "| snd:- ";
|
||||
format-bluetooth = "| snd(bt):{volume}% ";
|
||||
on-click = "${uwsm} pavucontrol";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue