Browse Source

Update waybar VPN modules

Add wg0 in addition to tun0. Hide either when disabled.
master
John Mertz 1 year ago
parent
commit
9dca8ce0ec
2 changed files with 11 additions and 5 deletions
  1. +10
    -5
      waybar/config.template
  2. +1
    -0
      waybar/style.css

+ 10
- 5
waybar/config.template View File

@@ -12,7 +12,7 @@
// Choose the order of the modules
"modules-left": ["custom/launcher", "sway/mode", "sway/workspaces"],
"modules-center": ["sway/window"],
"modules-right": ["network", "network#openvpn", "cpu", "memory", "temperature", "backlight", "custom/disk", "pulseaudio", "battery", "custom/clock", "tray", "idle_inhibitor", "custom/power"],
"modules-right": ["network", "network#wireguard", "network#openvpn", "cpu", "memory", "temperature", "backlight", "custom/disk", "pulseaudio", "battery", "custom/clock", "tray", "idle_inhibitor", "custom/power"],
// Modules configuration
"sway/workspaces": {
// "disable-scroll": true,
@@ -104,14 +104,19 @@
"interface": "wlp58s0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr} ",
"format-disconnected": "Disconnected ⚠",
"format-disconnected": " Disconnected ⚠ ",
"on-click": "if [ $(sudo pgrep -c nmtui) -gt 0 ]; then sudo pkill nmtui; else /usr/bin/uxterm -e 'sudo /usr/bin/nmtui'; fi"
},
"network#wireguard": {
"interface": "wg0", // (Optional) To force the use of this interface
"format": "{ipaddr} ",
"format-disconnected": "",
"on-click": "if [ $(sudo pgrep -c rofi) -gt 0 ]; then pkill rofi; else /home/jpm/scripts/rofi/rofi-openvpn.sh; fi"
},
"network#openvpn": {
"interface": "tun0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr} ",
"format-disconnected": "No VPN ⚠",
"format": "{ipaddr} ",
"format-disconnected": "",
"on-click": "if [ $(sudo pgrep -c rofi) -gt 0 ]; then pkill rofi; else /home/jpm/scripts/rofi/rofi-openvpn.sh; fi"
},
"custom/disk": {


+ 1
- 0
waybar/style.css View File

@@ -95,6 +95,7 @@ window#waybar {

#network.disconnected {
background: #800;
padding: 0px;
}

/* Resources */


Loading…
Cancel
Save