Add backlight module

Monitor the backlight level via udev. Poll every `interval` as well,
in case backlight udev events aren't supported.
This commit is contained in:
Ian Hattendorf
2019-02-10 02:35:19 -07:00
parent 6bf4f65228
commit 875306804c
7 changed files with 369 additions and 3 deletions

View File

@ -6,7 +6,7 @@
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/spotify"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "battery", "battery#bat2", "clock", "tray"],
"modules-right": ["pulseaudio", "network", "cpu", "memory", "backlight", "battery", "battery#bat2", "clock", "tray"],
// Modules configuration
// "sway/workspaces": {
// "disable-scroll": true,
@ -39,6 +39,11 @@
"memory": {
"format": "{}% "
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,

View File

@ -29,7 +29,7 @@ window#waybar {
border-bottom: 3px solid white;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
#clock, #battery, #cpu, #memory, #backlight, #network, #pulseaudio, #custom-spotify, #tray, #mode {
padding: 0 10px;
margin: 0 5px;
}
@ -74,6 +74,10 @@ window#waybar {
background: #9b59b6;
}
#backlight {
background: #90b1b1;
}
#network {
background: #2980b9;
}