Files
dotfiles/.config/waybar/modules/power.jsonc

40 lines
1.3 KiB
JSON

{
"group/power-group": {
"orientation": "horizontal",
"modules": ["backlight", "battery", "idle_inhibitor", "custom/lid_sleep"],
},
"battery": {
"format": "{icon}",
// "format-icons": [" ", " ", " ", " ", " "],
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"],
"format-charging": " {capacity}%",
"tooltip-format": "{capacity}% {timeTo}",
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"smooth-scrolling-threshold": 1,
"on-scroll-down": "brightnessctl --class='backlight' set 5%+",
"on-scroll-up": "brightnessctl --class='backlight' set 5%-",
"on-click": "python $HOME/.config/hypr/scripts/awww.py",
"tooltip-format": "{percent}%",
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰐂",
"deactivated": "󱩜",
},
},
"custom/lid_sleep": {
"format": "{}",
"exec": "pgrep -f 'systemd-inhibit --what=[h]andle-lid-switch' > /dev/null && echo '󱜤' || echo '󱠎'",
"on-click": "~/.config/hypr/scripts/toggle-lid-sleep.sh",
"tooltip": true,
"tooltip-format": "Toggle Lid Sleep",
"signal": 10,
},
}