refactor(waybar): finalize modular layout structure

This commit is contained in:
pyrschtjag committed 2026-10-30 11:10:22 +04:00
1 parent a1a8b49116
commit 343d0a20ae
2 files changed
+99 -252

No files matched your search

+28 -181
View File
@@ -1,197 +1,44 @@
{
"layer": "top",
"position": "top",
"margin-top": 5,
"margin-left": 5,
"margin-right": 5,
"height": 34,
[{
"include": ["~/.config/waybar/modules"],
"output": "HDMI-A-2",
"modules-left": [
"custom/rofi",
"sway/workspaces",
"sway/mode"
],
"modules-center": [
"clock#time"
"clock#time",
"clock#date"
],
"modules-right": [
"tray",
"privacy",
"idle_inhibitor",
"group/keyboard",
"disk" ,
"disk",
"group/hardware",
"group/temp",
"custom/mouse",
"group/audio"
]
}, {
"include": ["~/.config/waybar/modules"],
"output": ["DP-1", "DP-2"],
"no-center": true,
"modules-left": [
"sway/workspaces",
"sway/mode"
],
"group/keyboard": {
"orientation": "horizontal",
/*"modules": [
"keyboard-state",
"sway/language"
]*/
"modules": ["sway/language"]
},
"group/hardware": {
"orientation": "horizontal",
"modules": [
"cpu",
"memory"
"modules-right": [
"privacy",
"idle_inhibitor",
"group/keyboard",
"disk",
"group/hardware",
"group/temp",
"custom/mouse",
"group/audio",
"clock#date",
"clock#time"
]
},
"group/temp": {
"orientation": "horizontal",
"modules": [
"temperature#cpu",
"custom/gpu_temperature"
]
},
"group/audio": {
"orientation": "horizontal",
"modules": [
"wireplumber#source",
"wireplumber#sink"
]
},
"custom/rofi": {
"exec-if": "[ \"$USER\" != \"pyrschtjag\" ]",
"exec": "echo '{\"text\": \"\", \"tooltip\": \"\"}'",
"return-type": "json",
"format": "<span color='#88c0d0'>{icon}</span><span rise='1000' font='Symbols Nerd Font Mono 8'>{text}</span>",
"format-icons": ["󰀻"],
"interval": "once",
"on-click": "rofi -show drun",
"tooltip": false
},
"sway/workspaces": {
"format": "<span color='#88c0d0' weight='bold'>{icon}</span><span rise='1000' font='Symbols Nerd Font Mono 8'>{windows}</span>",
"window-rewrite": {
"class<firefox>": " 󰈹",
"class<foot>": " ",
"class<discord>": " 󰙯",
"class<org.telegram.desktop>": " ",
"class<steam>": " 󰓓",
"class<org.gajim.Gajim>": " 󰷕",
"class<Spotify>": " ",
"title<nvim>": " ",
"title<rmpc>": " 󰎈",
"title<mc(.*)>": " ",
"": " "
},
"tooltip": false
},
"sway/mode": {
"format": "<span color='#ebcb8b'>{}</span>",
"max-length": 18,
"tooltip": false
},
"clock#time": {
"format": "{:%H:%M}",
"tooltip": false
},
"tray": {
"icon-size": 12,
"spacing": 10,
"tooltip": false
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "<span color='#d08770' rise='1000' font='Symbols Nerd Font Mono 8'></span>",
// "deactivated": ""
"deactivated": "<span color='#ebcb8b' rise='1000' font='Symbols Nerd Font Mono 8'>󱎴</span>"
},
"signal": 13,
"tooltip": false,
"cursor": ""
},
"sway/language": {
// "format": "{}",
"format": "<span color='#8fbcbb' rise='1000' font='Symbols Nerd Font Mono 8'>󰌌</span> {}",
"format-en": "EN",
"format-ru": "RU",
"tooltip": false
},
"keyboard-state": {
"format": "{name}{icon}",
"numlock": true,
"capslock": true,
"scrolllock": false,
"format-icons": {
"numlock": {
"locked": "<span color='#a3be8c' rise='1000' font='Symbols Nerd Font Mono 8'>󰎠</span> ",
"unlocked": ""
},
"capslock": {
"locked": "<span color='##8fbcbb' rise='1000' font='Symbols Nerd Font Mono 8'>󰌌</span> <span color='#bf616a' rise='1000' font='Symbols Nerd Font Mono 8'>󰬴</span> ",
"unlocked": "<span color='##8fbcbb' rise='1000' font='Symbols Nerd Font Mono 8'>󰌌</span> "
}
}
},
"disk": {
// enable when release waybar 0.16+
// "format": "<span color='#a3be8c' rise='1000' font='Symbols Nerd Font Mono 8'></span> {free:5G}G",
"format": "<span color='#a3be8c' rise='1000' font='Symbols Nerd Font Mono 8'></span> {free:7}",
"paths": ["/"],
"interval": 120,
"tooltip": false
},
"cpu": {
"format": "<span color='#5e81ac' rise='1000' font='Symbols Nerd Font Mono 8'></span> {usage:03}%",
"interval": 5,
"tooltip": false
},
"memory": {
"format": "<span color='#81a1c1' rise='1000' font='Symbols Nerd Font Mono 8'></span> {percentage:03}%",
"interval": 5,
"tooltip": false
},
"temperature#cpu": {
"format": "<span color='#ebcb8b' rise='1000' font='Symbols Nerd Font Mono 8'></span> {temperatureC:03}°C",
"hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"interval": 5,
"tooltip": false
},
"custom/gpu_temperature": {
"format": "<span color='#d08770' rise='1000' font='Symbols Nerd Font Mono 8'>󰢮</span> {text}°C",
"exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits | xargs printf '%03d'",
"interval": 5,
"tooltip": false
},
"wireplumber#source": {
"format": "<span color='#b48ead' rise='1000' font='Symbols Nerd Font Mono 8'></span> {volume:03}%",
"format-muted": "<span color='#4c566a' rise='1000' font='Symbols Nerd Font Mono 8'></span> 000%",
"node-type": "Audio/Source",
"scroll-step": 5,
"tooltip": false
},
"wireplumber#sink": {
"format": "<span color='#b48ead' rise='1000' font='Symbols Nerd Font Mono 8'>{icon}</span> {volume:03}%",
"format-muted": "<span color='#4c566a' rise='1000' font='Symbols Nerd Font Mono 8'></span> 000%",
"format-icons": ["", "", ""],
"scroll-step": 5,
"tooltip": false
}
}
}]
+71 -71
View File
@@ -1,158 +1,158 @@
@define-color nord0 #2e3440;
@define-color nord1 #3b4252;
@define-color nord2 #434c5e;
@define-color nord3 #4c566a;
@define-color nord4 #d8dee9;
@define-color nord5 #e5e9f0;
@define-color nord6 #eceff4;
@define-color nord7 #8fbcbb;
@define-color nord8 #88c0d0;
@define-color nord9 #81a1c1;
@define-color nord10 #5e81ac;
@define-color nord11 #bf616a;
@define-color nord12 #d08770;
@define-color nord13 #ebcb8b;
@define-color nord14 #a3be8c;
@define-color nord15 #b48ead;
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
* {
font-family: "Noto Sans Mono";
font-size: 13px;
font-family: "JetBrains Mono", "Symbols Nerd Font Mono";
font-size: 10pt;
border: 0px;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
transition: none;
}
window#waybar {
color: @nord6;
background-color: @nord0;
color: @text;
background-color: @base;
}
#custom-rofi {
margin: 0 10px 0 10px;
}
#workspaces button {
color: @nord4;
color: @subtext1;
padding: 0px 10px;
border-bottom: 2px solid transparent;
}
#workspaces button.visible {
color: @nord5;
background-color: transparent;
border-bottom: 2px solid @nord9;
color: @subtext0;
background-color: @surface0;
}
#workspaces button.focused {
color: @nord6;
background-color: @nord1;
border-bottom: 2px solid @nord8;
color: @text;
background-color: @surface0;
}
#workspaces button.urgent {
color: @nord8;
color: @subtext1;
}
#workspaces button:hover {
background: transparent;
border-bottom: 2px solid transparent;
}
#workspaces button:hover.active,
#workspaces button:hover.visible {
background-color: @nord1;
border-bottom: 2px solid @nord8;
background-color: @surface0;
}
#workspaces button.urgent {
border-bottom: 2px solid @nord12;
background-color: @peach;
}
#mode {
margin: 0 0 0 10px;
}
#tray menu {
background-color: @nord0;
background-color: @base;
padding: 4px 0;
}
#tray menu menuitem {
color: @nord4;
color: @subtext1;
padding: 4px 0px;
border-left: 2px solid transparent;
}
#tray menu menuitem:hover {
background-color: @nord1;
color: @nord6;
border-left: 2px solid @nord8;
color: @color;
background-color: @surface0;
border-left: 2px solid @lavender;
}
#tray menu separator {
background-color: @nord3;
background-color: @surface0;
margin: 4px 0;
min-height: 1px;
}
#tray > .passive { opacity: 0.6; }
#tray > .needs-attention { color: @nord8; }
#tray > .needs-attention { color: @lavender; }
/* delete when release waybar 0.16+ */
#idle_inhibitor {
margin: 0 10px 0 0;
opacity: 1;
}
/* enable when release waybar 0.16+
#idle_inhibitor {
margin: 0;
opacity: 0;
}
#idle_inhibitor.activated {
margin: 0 10px 0 0;
opacity: 1;
}
*/
#tray,
#keyboard,
#custom-kbd,
#disk,
#hardware,
#temp,
#custom-mouse,
#clock.time,
#clock.date,
#privacy,
#audio {
margin: 0 10px 0 0;
}
#wireplumber.muted {
color: @nord3;
color: @surface2;
}
#wireplumber {
color: @nord6;
color: @text;
}
#cpu,
#temperature.cpu,
#wireplumber.source {
padding: 0 5px 0 0;
}
#memory,
#custom-gpu_temperature,
#wireplumber.sink {
padding: 0 0 0 5px;
}
#keyboard-state.num label,
#keyboard-state.caps label {
margin: 0;
opacity: 0;
}
#keyboard-state.num label.locked,
#keyboard-state.caps label.locked {
margin: 0 10px 0 0;
opacity: 1;
}
#privacy-item.screenshare {
color: @maroon;
}
#privacy-item.audio-in {
color: @red;
}
tooltip {
background-color: @nord0;
background-color: @base;
}
tooltip label {
background-color: @nord0;
color: @nord6;
background-color: @base;
color: @text;
}