Add darklight toggle to waybar

This commit is contained in:
Maximilian Friedersdorff 2025-10-06 11:59:45 +01:00
parent 4d2aeb82fb
commit d1cb1f76f6
2 changed files with 32 additions and 10 deletions

View file

@ -20,6 +20,7 @@
], ],
"modules-right": [ "modules-right": [
"clock", "clock",
"custom/darklight",
"custom/cliphist", "custom/cliphist",
"privacy", "privacy",
"idle_inhibitor", "idle_inhibitor",
@ -205,5 +206,18 @@
"on-click": "cliphist list | wofi -S dmenu | cliphist decode | wl-copy", "on-click": "cliphist list | wofi -S dmenu | cliphist decode | wl-copy",
"on-click-middle": "cliphist list | wofi -S dmenu | cliphist delete", "on-click-middle": "cliphist list | wofi -S dmenu | cliphist delete",
"on-click-right": "cliphist wipe" "on-click-right": "cliphist wipe"
},
"custom/darklight": {
"format": "{icon}",
"interval": 1,
"exec": "$HOME/.config/waybar/darkmanstate.sh",
"return-type": "json",
"format-icons": {
"dark": "",
"light": ""
},
"on-click": "darkman set light",
"on-click-right": "darkman set dark"
} }
} }
// vim: ts=4 sts=4 sw=4 et

View file

@ -107,9 +107,10 @@ button:hover {
#custom-power, #custom-power,
#language, #language,
#custom-dnd, #custom-dnd,
#custom-cliphist #custom-cliphist,
{ #custom-darklight {
padding: 0 10px; padding-left: 10px;
padding-right: 10px;
background-color: @base03; background-color: @base03;
color: @base1; color: @base1;
} }
@ -119,21 +120,23 @@ button:hover {
margin: 0 4px; margin: 0 4px;
} }
.modules-right *, .modules-left * { .modules-right *,
.modules-left * {
border-radius: 5px; border-radius: 5px;
} }
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left>widget:first-child>#workspaces {
margin-left: 0; margin-left: 0;
} }
/* If workspaces is the rightmost module, omit right margin */ /* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces { .modules-right>widget:last-child>#workspaces {
margin-right: 0; margin-right: 0;
} }
.modules-right, .modules-left { .modules-right,
.modules-left {
border-radius: 15px; border-radius: 15px;
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
@ -150,7 +153,8 @@ button:hover {
border-bottom: 3px solid @violet; border-bottom: 3px solid @violet;
} }
#battery.charging, #battery.plugged { #battery.charging,
#battery.plugged {
border-bottom: 3px solid @green; border-bottom: 3px solid @green;
} }
@ -226,6 +230,10 @@ label:focus {
border-bottom: 3px solid @base01; border-bottom: 3px solid @base01;
} }
#custom-darklight {
border-bottom: 3px solid @base01;
}
#temperature { #temperature {
border-bottom: 3px solid @yellow; border-bottom: 3px solid @yellow;
} }
@ -238,11 +246,11 @@ label:focus {
border-bottom: 3px solid @green; border-bottom: 3px solid @green;
} }
#tray > .passive { #tray>.passive {
-gtk-icon-effect: dim; -gtk-icon-effect: dim;
} }
#tray > .needs-attention { #tray>.needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #eb4d4b; background-color: #eb4d4b;
} }