waybar style

This commit is contained in:
thek4n 2026-08-03 13:18:57 +03:00
parent 8711b38386
commit f4d232e2c1
3 changed files with 103 additions and 19 deletions

View File

@ -4,10 +4,11 @@
"position": "bottom", "position": "bottom",
"height": 30, "height": 30,
"spacing": 4, "spacing": 4,
"reload_style_on_change": true,
"modules-left": [ "modules-left": [
"sway/workspaces", "sway/workspaces",
"sway/mode" "sway/mode",
], ],
"modules-right": [ "modules-right": [
@ -15,18 +16,25 @@
"custom/bluetooth", "custom/bluetooth",
"custom/diskroot", "custom/diskroot",
"custom/diskhome", "custom/diskhome",
"custom/memory", "memory",
"custom/cpu_usage", "cpu",
"custom/cpu_temp", "custom/cpu_temp",
"custom/battery", "custom/battery",
"custom/pomodoro", "custom/pomodoro",
"custom/volume", "custom/volume",
"custom/language", "custom/language",
"custom/userhost", "custom/userhost",
"custom/time", "clock",
"tray" "tray",
"custom/power",
], ],
"clock": {
"format": " {:%d.%m.%y %a  %H:%M}",
"format-alt": "{:%H:%M}",
"interval": 30
},
"custom/wireless": { "custom/wireless": {
"exec": "~/.config/waybar/scripts/builder.sh wireless", "exec": "~/.config/waybar/scripts/builder.sh wireless",
"interval": 10, "interval": 10,
@ -42,15 +50,14 @@
"interval": 30, "interval": 30,
"return-type": "text" "return-type": "text"
}, },
"custom/memory": { "memory": {
"exec": "~/.config/waybar/scripts/builder.sh memory",
"interval": 5, "interval": 5,
"return-type": "text" "format": "{used:0.1f}G/{total:0.1f}G "
}, },
"custom/cpu_usage": { "cpu": {
"exec": "~/.config/waybar/scripts/builder.sh cpu_usage", "interval": 1,
"interval": 5, "format": "{icons} {usage:>2}% ",
"return-type": "text" "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
}, },
"custom/cpu_temp": { "custom/cpu_temp": {
"exec": "~/.config/waybar/scripts/builder.sh cpu_temp", "exec": "~/.config/waybar/scripts/builder.sh cpu_temp",
@ -77,6 +84,7 @@
"custom/language": { "custom/language": {
"exec": "~/.config/waybar/scripts/builder.sh language", "exec": "~/.config/waybar/scripts/builder.sh language",
"return-type": "text", "return-type": "text",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
"signal": 3 "signal": 3
}, },
"custom/userhost": { "custom/userhost": {
@ -92,5 +100,19 @@
"exec": "~/.config/waybar/scripts/builder.sh time", "exec": "~/.config/waybar/scripts/builder.sh time",
"interval": 30, "interval": 30,
"return-type": "text" "return-type": "text"
} },
"custom/power": {
"format" : "⏻",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"exit": "swaymsg exit",
"reboot": "reboot",
"shutdown": "shutdown -h now",
"suspend": "~/.config/sway/scripts/lock-telegram.sh && systemctl suspend",
"lock": "~/.config/sway/scripts/lock-telegram.sh && swaylock -f",
"uefi_reboot": "systemctl reboot --firmware-setup",
},
},
} }

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="exit">
<property name="label">🚪 Exit</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">🔄 Reboot</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">⏻ Shutdown</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label">💤 Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="lock">
<property name="label">🔒 Lock</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child>
<child>
<object class="GtkMenuItem" id="uefi_reboot">
<property name="label">⚙️ UEFI</property>
</object>
</child>
</object>
</interface>

View File

@ -34,8 +34,8 @@ window#waybar {
#custom-wireless, #custom-wireless,
#custom-diskroot, #custom-diskroot,
#custom-diskhome, #custom-diskhome,
#custom-memory, #memory,
#custom-cpu_usage, #cpu,
#custom-cpu_temp, #custom-cpu_temp,
#custom-bluetooth, #custom-bluetooth,
#custom-volume, #custom-volume,
@ -43,7 +43,7 @@ window#waybar {
#custom-language, #custom-language,
#custom-userhost, #custom-userhost,
#custom-battery, #custom-battery,
#custom-time { #clock {
padding: 0 6px; padding: 0 6px;
margin: 0 1px; margin: 0 1px;
} }
@ -68,7 +68,7 @@ window#waybar {
color: #E57373; color: #E57373;
} }
#custom-cpu_usage { #cpu {
color: #A5D6A7; color: #A5D6A7;
} }
@ -76,7 +76,7 @@ window#waybar {
color: #FFAB91; color: #FFAB91;
} }
#custom-memory { #memory {
color: #90CAF9; color: #90CAF9;
} }
@ -92,7 +92,7 @@ window#waybar {
color: #80DEEA; color: #80DEEA;
} }
#custom-time { #clock {
color: #E0E0E0; color: #E0E0E0;
} }
@ -104,3 +104,27 @@ window#waybar {
#custom-bluetooth { #custom-bluetooth {
color: #4FC3F7; color: #4FC3F7;
} }
menu {
border-radius: 5px;
background: #161320;
color: #B5E8E0;
}
menuitem {
border-radius: 5px;
}
#custom-power {
padding: 0 10px;
color: #ffffff;
background: red;
border-bottom: 2px solid transparent;
font-size: 22px;
transition-duration: .3s;
border-radius: 3px;
}
#custom-power:hover {
background: inherit;
box-shadow: inset 0 +1px #ffffff;
}