waybar: tweak config

This commit is contained in:
Veneficium 2024-12-06 20:00:08 +01:00
parent 479374347f
commit 019824b447
3 changed files with 193 additions and 158 deletions

View file

@ -14,6 +14,7 @@
settings = [ settings = [
(builtins.fromJSON (builtins.readFile ./waybar.json)) (builtins.fromJSON (builtins.readFile ./waybar.json))
]; ];
style = builtins.readFile ./waybar.css;
}; };
programs.niri.config = builtins.readFile ./config.kdl; programs.niri.config = builtins.readFile ./config.kdl;
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -0,0 +1,74 @@
* {
font-size: 20px;
font-family: monospace;
}
window#waybar {
background: #292b2e;
color: #fdf6e3;
}
#custom-right-arrow-dark,
#custom-left-arrow-dark {
color: #1a1a1a;
}
#custom-right-arrow-light,
#custom-left-arrow-light {
color: #292b2e;
background: #1a1a1a;
}
#workspaces,
#clock.1,
#clock.2,
#clock.3,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk,
#tray {
background: #1a1a1a;
}
#workspaces button {
padding: 0 2px;
color: #fdf6e3;
}
#workspaces button.focused {
color: #268bd2;
}
#workspaces button:hover {
box-shadow: inherit;
text-shadow: inherit;
}
#workspaces button:hover {
background: #1a1a1a;
border: #1a1a1a;
padding: 0 3px;
}
#pulseaudio {
color: #268bd2;
}
#memory {
color: #2aa198;
}
#cpu {
color: #6c71c4;
}
#battery {
color: #859900;
}
#disk {
color: #b58900;
}
#clock,
#pulseaudio,
#memory,
#cpu,
#battery,
#disk {
padding: 0 10px;
}

View file

@ -1,160 +1,120 @@
{ {
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"height": 30,
"spacing": 4, "modules-left": [
"modules-right": [ "custom/right-arrow-dark"
"idle_inhibitor", ],
"pulseaudio", "modules-center": [
"network", "custom/left-arrow-dark",
"power-profiles-daemon", "clock#1",
"cpu", "custom/left-arrow-light",
"memory", "custom/left-arrow-dark",
"temperature", "clock#2",
"backlight", "custom/right-arrow-dark",
"keyboard-state", "custom/right-arrow-light",
"battery", "clock#3",
"battery#bat2", "custom/right-arrow-dark"
"clock", ],
"tray", "modules-right": [
"custom/power" "custom/left-arrow-dark",
], "pulseaudio",
"keyboard-state": { "custom/left-arrow-light",
"numlock": true, "custom/left-arrow-dark",
"capslock": true, "memory",
"format": "{name} {icon}", "custom/left-arrow-light",
"format-icons": { "custom/left-arrow-dark",
"locked": "", "cpu",
"unlocked": "" "custom/left-arrow-light",
} "custom/left-arrow-dark",
}, "battery",
"idle_inhibitor": { "custom/left-arrow-light",
"format": "{icon}", "custom/left-arrow-dark",
"format-icons": { "disk",
"activated": "", "custom/left-arrow-light",
"deactivated": "" "custom/left-arrow-dark",
} "tray"
}, ],
"tray": {
"spacing": 10 "custom/left-arrow-dark": {
}, "format": "",
"clock": { "tooltip": false
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", },
"format-alt": "{:%Y-%m-%d}" "custom/left-arrow-light": {
}, "format": "",
"cpu": { "tooltip": false
"format": "{usage}% ", },
"tooltip": false "custom/right-arrow-dark": {
}, "format": "",
"memory": { "tooltip": false
"format": "{}% " },
}, "custom/right-arrow-light": {
"temperature": { "format": "",
"critical-threshold": 80, "tooltip": false
"format": "{temperatureC}°C {icon}", },
"format-icons": [
"", "sway/workspaces": {
"", "disable-scroll": true,
"" "format": "{name}"
] },
},
"backlight": { "clock#1": {
"format": "{percent}% {icon}", "format": "{:%a}",
"format-icons": [ "tooltip": false
"", },
"", "clock#2": {
"", "format": "{:%H:%M}",
"", "tooltip": false
"", },
"", "clock#3": {
"", "format": "{:%m-%d}",
"", "tooltip": false
"" },
]
}, "pulseaudio": {
"battery": { "format": "{icon} {volume:2}%",
"states": { "format-bluetooth": "{icon} {volume}%",
"warning": 30, "format-muted": "MUTE",
"critical": 15 "format-icons": {
}, "headphones": "",
"format": "{capacity}% {icon}", "default": [
"format-full": "{capacity}% {icon}", "",
"format-charging": "{capacity}% ", ""
"format-plugged": "{capacity}% ", ]
"format-alt": "{time} {icon}", },
"format-icons": [ "scroll-step": 5,
"", "on-click": "pamixer -t",
"", "on-click-right": "pavucontrol"
"", },
"", "memory": {
"" "interval": 5,
] "format": "Mem {}%"
}, },
"battery#bat2": { "cpu": {
"bat": "BAT2" "interval": 5,
}, "format": "CPU {usage:2}%"
"power-profiles-daemon": { },
"format": "{icon}", "battery": {
"tooltip-format": "Power profile: {profile}\nDriver: {driver}", "states": {
"tooltip": true, "good": 95,
"format-icons": { "warning": 30,
"default": "", "critical": 15
"performance": "", },
"balanced": "", "format": "{icon} {capacity}%",
"power-saver": "" "format-icons": [
} "",
}, "",
"network": { "",
"format-wifi": "{essid} ({signalStrength}%) ", "",
"format-ethernet": "{ipaddr}/{cidr} ", ""
"tooltip-format": "{ifname} via {gwaddr} ", ]
"format-linked": "{ifname} (No IP) ", },
"format-disconnected": "Disconnected ⚠", "disk": {
"format-alt": "{ifname}: {ipaddr}/{cidr}" "interval": 5,
}, "format": "Disk {percentage_used:2}%",
"pulseaudio": { "path": "/"
"format": "{volume}% {icon} {format_source}", },
"format-bluetooth": "{volume}% {icon} {format_source}", "tray": {
"format-bluetooth-muted": " {icon} {format_source}", "icon-size": 20
"format-muted": " {format_source}", }
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"",
"",
""
]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {text}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"
},
"custom/power": {
"format": "⏻ ",
"tooltip": false,
"menu": "on-click",
"menu-file": "$HOME/.config/waybar/power_menu.xml",
"menu-actions": {
"shutdown": "shutdown",
"reboot": "reboot",
"suspend": "systemctl suspend",
"hibernate": "systemctl hibernate"
}
}
} }