обновлен waybar

- Изменен порядок модулей
- Добавлен модуль для монитора скорости сети
- Оптимизированы стили
This commit is contained in:
retrilzzy committed 2024-11-01 22:31:18 +05:00
1 parent ff2db49235
commit bccadadf01
4 files changed
+79 -103

No files matched your search

+31 -22
View File
@@ -2,7 +2,7 @@
"layer": "top",
"position": "top",
"mode": "dock",
// "height": 28, // uncomment to set fixed height
"height": 24, // uncomment to set fixed height
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
@@ -10,7 +10,7 @@
// Positions
"modules-left": [
"custom/ws", // logo
"idle_inhibitor",
"hyprland/workspaces", // workspaces
@@ -18,14 +18,13 @@
],
"modules-center": [
"custom/paddc", // padding
"custom/cpuinfo", // temperature
"memory", // memory
"custom/cpu", // cpu
"idle_inhibitor",
"clock#time", // time
"clock#date", // date
@@ -34,6 +33,8 @@
],
"modules-right": [
"network", // network speed
"tray", // tray
"hyprland/language", // language
@@ -48,11 +49,14 @@
],
// Modules
"custom/ws": {
"format": " ",
"tooltip": false,
"min-length": 3,
"max-length": 4
"idle_inhibitor": {
"format": " -rzx.ovh",
"tooltip": true,
"tooltip-format-activated": "Presentation Mode",
"tooltip-format-deactivated": "Idle Mode",
"start-activated": false,
"max-length": 20,
"timeout": 5
},
"hyprland/workspaces": {
@@ -166,15 +170,6 @@
"max-length": 6
},
"idle_inhibitor": {
"format": "rzx.ovh",
"tooltip": true,
"tooltip-format-activated": "Presentation Mode",
"tooltip-format-deactivated": "Idle Mode",
"start-activated": false,
"timeout": 5
},
"clock#time": {
"format": "󱑂 {:%H:%M}",
"tooltip": true,
@@ -203,11 +198,19 @@
"format": "{}", // in wifiinfo.sh, change "Wi-Fi" to "${essid}" to display network name
"tooltip": true,
"on-click": "~/.config/waybar/scripts/wifimenu.sh",
"interval": 1,
"interval": 2,
"min-length": 7,
"max-length": 7
},
"network": {
"interface": "wlan0",
"interval": 2,
"format": " {bandwidthUpBytes}  {bandwidthDownBytes}",
"format-disconnected": "",
"max-length": 24
},
"tray": {
"icon-size": 18,
"rotate": 0,
@@ -218,8 +221,8 @@
"format": "{}",
"format-en": "EN",
"format-ru": "RU",
"min-length": 5,
"max-length": 5
"min-length": 4,
"max-length": 4
},
"pulseaudio": {
@@ -258,9 +261,10 @@
"format": "{icon} {capacity}%",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"format-charging": "󱘖 {capacity}%",
"tooltip": true,
"tooltip-format": "Time to Empty: {time}",
"tooltip-format-charging": "Time to Full: {time}",
"interval": 1,
"interval": 2,
"min-length": 6,
"max-length": 6
},
@@ -271,6 +275,11 @@
"on-click": "~/.config/waybar/scripts/logoutlaunch.sh 2",
"on-click-right": "~/.config/waybar/scripts/logoutlaunch.sh 1",
"interval": 86400
},
"custom/paddc": {
"format": " ",
"tooltip": false
}
}
+10 -10
View File
@@ -90,8 +90,8 @@ else
# bssid="N/A"
chan="N/A"
# rssi="N/A"
rx_bitrate=""
tx_bitrate=""
# rx_bitrate=""
# tx_bitrate=""
phy_mode=""
signal=$(echo "$wifi_info" | awk -F: '{print $3}')
@@ -119,10 +119,10 @@ else
# rssi=$(echo "$iw_output" | grep "signal:" | awk '{print $2 " dBm"}')
# Upload speed
rx_bitrate=$(echo "$iw_output" | grep "rx bitrate:" | awk '{print $3 " " $4}')
# rx_bitrate=$(echo "$iw_output" | grep "rx bitrate:" | awk '{print $3 " " $4}')
# Download speed
tx_bitrate=$(echo "$iw_output" | grep "tx bitrate:" | awk '{print $3 " " $4}')
# tx_bitrate=$(echo "$iw_output" | grep "tx bitrate:" | awk '{print $3 " " $4}')
# Physical Layer Mode
if echo "$iw_output" | grep -E -q "rx bitrate:.* VHT"; then
@@ -147,13 +147,13 @@ else
# tooltip+="\nRSSI: ${rssi}"
tooltip+="\nStrength: ${signal} / 100"
if [ -n "$rx_bitrate" ]; then
tooltip+="\nRx Rate: ${rx_bitrate}"
fi
# if [ -n "$rx_bitrate" ]; then
# tooltip+="\nRx Rate: ${rx_bitrate}"
# fi
if [ -n "$tx_bitrate" ]; then
tooltip+="\nTx Rate: ${tx_bitrate}"
fi
# if [ -n "$tx_bitrate" ]; then
# tooltip+="\nTx Rate: ${tx_bitrate}"
# fi
if [ -n "$phy_mode" ]; then
tooltip+="\nPHY Mode: ${phy_mode}"
+37 -70
View File
@@ -15,6 +15,10 @@ window#waybar {
background: transparent;
}
window#waybar > box {
margin-top: 4px;
}
/* Tooltip Styling */
tooltip {
color: @foreground;
@@ -64,7 +68,7 @@ tooltip {
}
/* General Module Styling */
#custom-ws,
#idle_inhibitor,
#workspaces,
#window,
#custom-cpuinfo,
@@ -72,117 +76,84 @@ tooltip {
#custom-cpu,
#clock,
#custom-wifi,
#tray,
#network,
#language,
#pulseaudio,
#custom-backlight,
#battery,
#custom-power {
opacity: 1;
margin-bottom: 0px;
padding-right: 4px;
padding-left: 4px;
padding-right: 2px;
padding-left: 2px;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
text-shadow: 0px 0px 2px rgba(22, 22, 22, 0.8);
}
/* Logo */
#custom-ws {
/* Idle Inhibitor */
#idle_inhibitor {
background: @logo;
border-radius: 8px;
padding: 1px 0 0 3px;
margin: 0px;
margin-right: 2px;
margin-left: 10px;
padding-left: 8px;
padding-right: 8px;
}
/* Workspaces */
#workspaces {
background: @workspaces;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Window Title */
#window {
background: @window;
margin-left: 2px;
padding-right: 10px;
padding-left: 10px;
border-radius: 8px;
}
/* Temperature */
#custom-paddc {
padding-right: 12px;
}
#custom-cpuinfo {
background: @cpuinfo;
padding-left: 1px;
padding-right: 0px;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Memory */
#memory {
background: @memory;
padding-left: 1px;
padding-right: 0px;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* CPU */
#custom-cpu {
background: @cpu;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Idle Inhibitor */
#idle_inhibitor {
color: @foreground;
background: @idle_inhibitor;
font-size: 11pt;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
padding-right: 5px;
padding-left: 5px;
text-shadow: 0px 0px 1.5px rgba(22, 22, 22, 1);
}
/* Time */
#clock.time {
background: @time;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Date */
#clock.date {
background: @date;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Wifi */
#custom-wifi {
background: @wifi;
padding-right: 6px;
padding-left: 4px;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Tray */
#tray {
padding-right: 6px;
padding-left: 6px;
padding-right: 8px;
padding-left: 8px;
background: @tray;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
#tray menu {
@@ -203,36 +174,35 @@ tooltip {
background-color: @hover;
}
/* Network */
#network {
background: @network;
padding-right: 8px;
padding-left: 8px;
}
/* Language */
#language {
background: @language;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
padding-right: 2px;
padding-left: 2px;
}
/* PulseAudio */
#pulseaudio {
background: @pulseaudio;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Brightness */
#custom-backlight {
background: @backlight;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
}
/* Battery */
#battery {
background: @battery;
margin-right: 2px;
margin-left: 2px;
border-radius: 8px;
padding-right: 6px;
padding-left: 6px;
}
#battery.warning {
@@ -246,10 +216,7 @@ tooltip {
/* Power Button */
#custom-power {
background: @power;
color: @foreground;
border-radius: 10px;
margin-right: 4px;
margin-left: 2px;
margin-right: 6px;
padding-right: 6px;
padding-left: 9px;
}
+1 -1
View File
@@ -19,11 +19,11 @@
@define-color cpuinfo rgba(30, 30, 30, 0.8);
@define-color memory rgba(50, 50, 50, 0.8);
@define-color cpu rgba(70, 70, 70, 0.8);
@define-color idle_inhibitor rgba(80, 80, 80, 0.8);
@define-color time rgba(70, 70, 70, 0.8);
@define-color date rgba(50, 50, 50, 0.8);
@define-color wifi rgba(30, 30, 30, 0.8);
@define-color tray rgba(40, 40, 40, 0.8);
@define-color network rgba(40, 40, 40, 0.8);
@define-color language rgba(45, 45, 45, 0.8);
@define-color pulseaudio rgba(50, 50, 50, 0.8);
@define-color backlight rgba(50, 50, 50, 0.8);