Compare commits

...

2 Commits

Author SHA1 Message Date
Brieuc Dubois 7698c11163 Fix Onlyoffice tiling 2024-02-17 21:40:06 +01:00
Brieuc Dubois 0bc85afca0 VPN status 2024-02-17 14:31:00 +01:00
3 changed files with 20 additions and 1 deletions

View File

@ -181,3 +181,4 @@ bindl = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , PRINT, exec, hyprshot -m region bind = , PRINT, exec, hyprshot -m region
windowrulev2 = idleinhibit fullscreen, fullscreen:1 windowrulev2 = idleinhibit fullscreen, fullscreen:1
windowrulev2 = tile, class:^(ONLYOFFICE Desktop Editors)$

View File

@ -6,7 +6,7 @@
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["hyprland/workspaces"], "modules-left": ["hyprland/workspaces"],
"modules-center": ["hyprland/window"], "modules-center": ["hyprland/window"],
"modules-right": ["pulseaudio", "network", "custom/bandwidth", "cpu", "memory", "battery", "tray", "clock"], "modules-right": ["pulseaudio", "custom/VPN", "network", "custom/bandwidth", "cpu", "memory", "battery", "tray", "clock"],
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,
"all-outputs": false, "all-outputs": false,
@ -56,6 +56,12 @@
"custom/bandwidth": { "custom/bandwidth": {
"exec": "$HOME/.config/waybar/scripts/bandwidth" "exec": "$HOME/.config/waybar/scripts/bandwidth"
}, },
"custom/VPN": {
"format": "{}",
"interval": 5,
"max-length": 20,
"exec": "$HOME/.config/waybar/scripts/vpn"
},
"pulseaudio": { "pulseaudio": {
//"scroll-step": 1, //"scroll-step": 1,
"format": "{volume}% {icon}", "format": "{volume}% {icon}",

View File

@ -0,0 +1,12 @@
#!/usr/bin/env sh
# Check if wireguard VPN is active
if nmcli c show --active | grep -q wireguard; then
echo ""
# If not, check if the connection named "YapiBiche" is active
elif nmcli c show --active | grep -q "YapiBiche"; then
echo ""
# If neither is active, return "NO"
else
echo ""
fi