refactor(waybar): reorganize top bar with groups and add new modules

- config_top.jsonc:
  - Group modules into traygroup, pomodorogroup, bench, general
  - Add weather, language, CPU, memory, temperature modules with icons and states
  - Add pomodoro preset buttons (10m,20m,30m,1h,1h30m)
  - Split battery into #watt (power draw) and #charge (charge level)
  - Add invisible separators for spacing
- config_bottom.jsonc:
  - Remove unused modules from left/right, add margin-top
- style_top.css:
  - Style new groups and modules, define state-based colors for CPU/memory/temperature
  - Add hover effects and critical animation for paused pomodoro
- style_bottom.css:
  - Style minimized taskbar buttons
  - Fix side panel group selector (use #group)
This commit is contained in:
2026-03-19 02:21:29 +03:00
parent 7470df32e0
commit a89e680872
4 changed files with 247 additions and 28 deletions

View File

@@ -8,22 +8,121 @@
"margin-left": 5,
"margin-right": 5,
"margin-top": 5,
"margin-bottom": 5,
"position": "top",
"layer": "top",
"spacing": 0,
"reload_style_on_change": true,
"modules-left": [
"custom/weather",
"custom/separator_invisible",
"group/pomodorogroup",
"custom/separator_invisible",
"mpd"
],
"modules-center": [
"hyprland/workspaces"
],
"modules-right": [
"pulseaudio",
"pulseaudio/slider",
"battery",
"network",
"clock"
"group/traygroup",
"custom/separator_invisible",
"group/bench",
"custom/separator_invisible",
"group/general"
],
"group/traygroup": {
"orientation": "inherit",
"modules": [
"hyprland/language",
"tray"
]
},
"group/pomodorogroup": {
"orientation": "inherit",
"modules": [
"custom/pomodoro",
"custom/pomodoro10",
"custom/pomodoro20",
"custom/pomodoro30",
"custom/pomodoro60",
"custom/pomodoro90"
],
"drawer": {
}
},
"group/bench": {
"orientation": "inherit",
"modules": [
"battery#watt",
"cpu",
"memory",
"temperature"
]
},
"group/general": {
"orientation": "inherit",
"modules": [
"pulseaudio",
"pulseaudio/slider",
"battery#charge",
"network",
"clock"
]
},
"hyprland/language": {
"format": "{}",
"format-en": "🇬🇧",
"format-ru": "🇷🇺"
},
"battery#watt": {
"interval": 5,
"format": "{power:.0f}W |",
"on-click": "sh -c 'swaync-client -cp & ~/.config/rofi/scripts/dmenu_powermodemenu.sh'"
},
"cpu": {
"format": "{icon}",
"tooltip": true,
"interval": 3,
"format-icons": [
"󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"states": {
"s1": 0,
"s2": 10,
"s3": 30,
"s4": 50,
"s5": 70
},
"on-click": "kitty btop"
},
"memory": {
"format": "{icon}",
"interval": 3,
"format-icons": [
"󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"states": {
"s1": 20,
"s2": 30,
"s3": 50,
"s4": 60,
"s4": 70
},
"tooltip-format": "{used:0.1f}GiB used",
"tooltip": true,
"on-click": "kitty btop"
},
"temperature": {
"format": "{icon}",
"interval": 10,
"format-icons": [
"󰄰", "󰄰", "󰄰", "󰄰", "󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"
],
"warning-threshold": 60,
"critical-threshold": 80,
"on-click": "kitty btop"
},
"tray": {
"icon-size": 18,
"spacing": 10,
@@ -131,7 +230,7 @@
"on-click-right": "mode"
}
},
"battery": {
"battery#charge": {
"full-at": 98,
"states": {
"good": 85,
@@ -179,11 +278,38 @@
"interval": "once",
"tooltip": false
},
"custom/weather": {
"format": "{}°C",
"tooltip": true,
"interval": 3600,
"exec": "wttrbar --location Moskau --nerd --mph --date-format %d.%m.%Y",
"return-type": "json"
},
"custom/pomodoro": {
"format": "{}",
"return-type": "json",
"exec": "~/.local/bin/waybar-module-pomodoro --persist -w 20 -s 5 -l 20 -i 3 -p '' -a '' --autob",
"on-click": "~/.local/bin/waybar-module-pomodoro toggle",
"on-click-right": "~/.local/bin/waybar-module-pomodoro reset"
},
"custom/pomodoro10": {
"format": "10m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 10"
},
"custom/pomodoro20": {
"format": "20m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 20"
},
"custom/pomodoro30": {
"format": "30m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 30"
},
"custom/pomodoro60": {
"format": "1h",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 60"
},
"custom/pomodoro90": {
"format": "1h30m",
"on-click": "~/.local/bin/waybar-module-pomodoro set-work 90"
}
}