Update 1
This commit is contained in:
+17
-7
@@ -7,11 +7,13 @@
|
||||
"hyprland/workspaces",
|
||||
"pulseaudio",
|
||||
"custom/network",
|
||||
"battery",
|
||||
],
|
||||
|
||||
"clock": {
|
||||
"interval": 60,
|
||||
"format": "{:%H:%M}",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
@@ -32,8 +34,7 @@
|
||||
"default": "",
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
"DP-1": ["1", "2", "3", "4", "5"],
|
||||
"DP-2": ["6", "7", "8", "9", "10"],
|
||||
"eDP-1": ["1", "2", "3", "4", "5"],
|
||||
},
|
||||
"on-click": "activate",
|
||||
"on-scroll-down": "hyprctl dispatch workspace e+1",
|
||||
@@ -43,7 +44,7 @@
|
||||
"pulseaudio": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-bluetooth": "{volume}% {icon}",
|
||||
"format-muted": "",
|
||||
"format-muted": "Muted ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
@@ -52,7 +53,7 @@
|
||||
"phone-muted": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", ""],
|
||||
"default": ["", "", ""],
|
||||
},
|
||||
"scroll-step": 1,
|
||||
"on-click": "pavucontrol",
|
||||
@@ -62,11 +63,20 @@
|
||||
"custom/network": {
|
||||
"exec": "~/.config/waybar/scripts/network.sh",
|
||||
"return-type": "json",
|
||||
"interval": 10,
|
||||
"interval": 1,
|
||||
"format": "{}",
|
||||
"tooltip": false,
|
||||
"max-length": 50,
|
||||
"on-click": "~/.config/wofi/wifi/wifi.sh &",
|
||||
"on-click-right": "~/.config/wofi/wifi/wifinew.sh &",
|
||||
"on-click": "~/.config/rofi/wifi/wifi.sh &",
|
||||
"on-click-right": "~/.config/rofi/wifi/wifinew.sh &",
|
||||
"tooltip": false,
|
||||
},
|
||||
|
||||
"battery": {
|
||||
"format": "{capacity}",
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
pkill waybar || waybar &
|
||||
pkill swaync || swaync &
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
# -f: Specific fields
|
||||
ACTIVE_CONN=$(nmcli -t -f NAME,TYPE connection show --active | grep -E '802-3-ethernet|802-11-wireless' | head -n 1)
|
||||
|
||||
# If no connection is found, output nothing
|
||||
# If no connection is found, output disconnected icon
|
||||
if [ -z "$ACTIVE_CONN" ]; then
|
||||
echo ""
|
||||
echo "{\"text\": \" \", \"class\": \"disconnected\"}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -18,8 +18,22 @@ CONN_TYPE="${ACTIVE_CONN##*:}"
|
||||
# Output JSON for Waybar custom module
|
||||
if [[ "$CONN_TYPE" == *"802-11-wireless"* ]]; then
|
||||
# It's Wi-Fi
|
||||
echo "{\"text\": \"$CONN_NAME \", \"class\": \"wifi\"}"
|
||||
SIGNAL=$(nmcli -t -f IN-USE,SIGNAL dev wifi | grep '^\*' | cut -d':' -f2)
|
||||
if [ -z "$SIGNAL" ]; then
|
||||
ICON=""
|
||||
elif [ "$SIGNAL" -ge 80 ]; then
|
||||
ICON=""
|
||||
elif [ "$SIGNAL" -ge 60 ]; then
|
||||
ICON=""
|
||||
elif [ "$SIGNAL" -ge 40 ]; then
|
||||
ICON=""
|
||||
elif [ "$SIGNAL" -ge 20 ]; then
|
||||
ICON=""
|
||||
else
|
||||
ICON=""
|
||||
fi
|
||||
echo "{\"text\": \"$CONN_NAME $ICON \", \"class\": \"wifi\"}"
|
||||
else
|
||||
# It's Ethernet
|
||||
echo "{\"text\": \"$CONN_NAME \", \"class\": \"ethernet\"}"
|
||||
echo "{\"text\": \"$CONN_NAME \", \"class\": \"ethernet\"}"
|
||||
fi
|
||||
|
||||
+29
-9
@@ -3,11 +3,11 @@
|
||||
* {
|
||||
all: unset;
|
||||
font-family:
|
||||
"Rubik", "JetBrainsMono Nerd Front Propo", "Noto Sans CJK JP",
|
||||
"Rubik", "JetBrainsMono Nerd Font Propo", "Noto Sans CJK JP",
|
||||
"Noto Sans CJK KR";
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
tooltip {
|
||||
background-color: @bg1;
|
||||
color: @fg;
|
||||
margin: 10px;
|
||||
@@ -18,7 +18,7 @@
|
||||
.modules-center {
|
||||
background-color: @bg1;
|
||||
color: @fg;
|
||||
padding: 2px 8px;
|
||||
padding: 4px 18px;
|
||||
border-radius: 99px;
|
||||
}
|
||||
|
||||
@@ -27,19 +27,21 @@
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
min-width: 100px;
|
||||
background-color: @bg2;
|
||||
padding: 2px 4px;
|
||||
margin: 2px 0;
|
||||
font-size: 0.95rem;
|
||||
padding: 2px 3px;
|
||||
margin: 3px 0;
|
||||
border-radius: 99px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
background-color: @bg3;
|
||||
padding: 2px 4px;
|
||||
padding: 0 5px;
|
||||
border-radius: 99px;
|
||||
margin: 0 2px;
|
||||
transition: all 300ms ease-in-out;
|
||||
min-width: 7px;
|
||||
min-width: 10px;
|
||||
}
|
||||
|
||||
#workspaces button.empty {
|
||||
@@ -47,8 +49,26 @@
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: @bg1;
|
||||
background-color: @green;
|
||||
min-width: 1.5rem;
|
||||
font-weight: 500;
|
||||
transition: none;
|
||||
transition: all 300ms ease-in-out;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: @green;
|
||||
margin: 6px 0;
|
||||
padding: 0 8px;
|
||||
border-radius: 99px;
|
||||
font-weight: 500;
|
||||
color: @bg1;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
background-color: @yellow;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user