From f51d973e611ef433d8c7b361485b513c7fbc486c Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 28 Sep 2024 17:36:06 +0800 Subject: feat(warp-vpn): added warp-vpn module also removed "exec-if" as it will prob waste resource --- dot-config/waybar/modules.jsonc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/dot-config/waybar/modules.jsonc b/dot-config/waybar/modules.jsonc index 3555ff2e..673a67e1 100644 --- a/dot-config/waybar/modules.jsonc +++ b/dot-config/waybar/modules.jsonc @@ -16,6 +16,7 @@ "disable-scroll": false, "on-scroll-up": "hyprctl dispatch workspace -1", "on-scroll-down": "hyprctl dispatch workspace +1", + "on-click-middle": "hyprctl dispatch overview:toggle", "format": "{icon}", "on-click": "activate", "format-icons": { @@ -109,11 +110,11 @@ "custom/gpu": { "format": "󱓞 {}%", "format-alt": " {}°C", - "exec-if": "nvidia-smi", + // "exec-if": "nvidia-smi", "exec": "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits", "exec-alt": "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits", // "return-type": "json", - "tooltip": false, + // "tooltip": false, "interval": 3 }, "temperature": { @@ -122,6 +123,15 @@ "critical-threshold": 80, "interval": 1 }, + "custom/warp-vpn": { + "format": "{}", + "interval": "once", + "tooltip": false, + "exec": "$HOME/scripts/warp-vpn.sh status", + // "on-click": "warp-cli status | grep -q 'Connected' && $HOME/scripts/warp-vpn.sh connect || $HOME/scripts/warp-vpn.sh disconnect", + "on-click": "$HOME/scripts/warp-vpn.sh toggle", + "signal": 4 + }, // "custom/indicator": { // "format": "{}", // "exec": "$HOME/scripts/hyprindicator subscribe", @@ -173,7 +183,7 @@ // } // }, "group/small-utils": { - "modules": ["custom/gpu-screen-recorder", "custom/toggle-mic", "custom/toggle-cam", "custom/disable-sound", "tray"], + "modules": ["custom/gpu-screen-recorder", "custom/toggle-mic", "custom/toggle-cam", "custom/warp-vpn", "custom/disable-sound", "tray"], // "click-to-reveal": true, "orientation": "horizontal", "drawer": {} -- cgit v1.2.3