1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2025-09-05 10:48:32 -05:00

add backlight

This commit is contained in:
Kaan Barmore-Genç 2023-04-26 20:33:38 -04:00
parent a29efbd37f
commit f59fad3203
Signed by: kaan
GPG key ID: B2E280771CD62FCF
3 changed files with 10 additions and 0 deletions

View file

@ -49,6 +49,7 @@ depends = ["theme", "system"]
[system.variables] [system.variables]
has_battery = false has_battery = false
intel_backlight = false
[theme.variables] [theme.variables]
# These are specified in bg-fg pairs, background and text color. The _fg color # These are specified in bg-fg pairs, background and text color. The _fg color

View file

@ -270,6 +270,10 @@ bindsym $mod+c mode "screenshot"
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
{{#if intel_backlight}}
bindsym XF86MonBrightnessUp exec backlight-control +1
bindsym XF86MonBrightnessDown exec backlight-control -1
{{/if}}
# #
# Resizing containers: # Resizing containers:

View file

@ -10,6 +10,9 @@
"modules-right": ["custom/media", "pulseaudio", "modules-right": ["custom/media", "pulseaudio",
{{#if has_battery}} {{#if has_battery}}
"battery", "battery",
{{/if}}
{{#if intel_backlight}}
"backlight",
{{/if}} {{/if}}
"cpu", "memory", "temperature", "sway/language", "clock", "tray", "custom/exit"], "cpu", "memory", "temperature", "sway/language", "clock", "tray", "custom/exit"],
// Modules configuration // Modules configuration
@ -73,6 +76,8 @@
"device": "intel_backlight", "device": "intel_backlight",
"format": "{percent}% {icon}", "format": "{percent}% {icon}",
"format-icons": ["", ""], "format-icons": ["", ""],
"on-scroll-up": "backlight-control +1",
"on-scroll-down": "backlight-control -1"
}, },
"pulseaudio": { "pulseaudio": {
// "scroll-step": 1, // %, can be a float // "scroll-step": 1, // %, can be a float