i3, drastically reduce the time that notify-send lingers on the screen, variablize the step counts for going up and down in brightness and volume.
This commit is contained in:
+44
-36
@@ -141,37 +141,23 @@ bindsym $mod+c exec codium-flatpak
|
||||
|
||||
|
||||
## Brightness ##
|
||||
# Use the bracket keys to change the brightness.
|
||||
# light requires sudo privileges unless video group and udev are configured.
|
||||
bindsym $mod+bracketleft exec --no-startup-id "light -U 05 && notify-send 'Brightness - ' $(light -G)"
|
||||
bindsym $mod+bracketright exec --no-startup-id "light -A 05 && notify-send 'Brightness + ' $(light -G)"
|
||||
bindsym $shift+$mod+bracketleft exec --no-startup-id "light -U 20 && notify-send 'Brightness ---' $(light -G)"
|
||||
bindsym $shift+$mod+bracketright exec --no-startup-id "light -A 20 && notify-send 'Brightness +++' $(light -G)"
|
||||
|
||||
set $time 1500
|
||||
set $small 5
|
||||
set $large 20
|
||||
|
||||
# Use the bracket keys to change the brightness.
|
||||
bindsym $mod+bracketleft exec --no-startup-id "light -U $small && notify-send -t $time 'Brightness - ' $(light -G)"
|
||||
bindsym $mod+bracketright exec --no-startup-id "light -A $small && notify-send -t $time 'Brightness + ' $(light -G)"
|
||||
bindsym $shift+$mod+bracketleft exec --no-startup-id "light -U $large && notify-send -t $time 'Brightness ---' $(light -G)"
|
||||
bindsym $shift+$mod+bracketright exec --no-startup-id "light -A $large && notify-send -t $time 'Brightness +++' $(light -G)"
|
||||
|
||||
# Also get the actual brightness keys to work!!
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A 05 && notify-send 'Brightness + ' $(light -G)"
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U 05 && notify-send 'Brightness - ' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessUp exec --no-startup-id "light -A 20 && notify-send 'Brightness +++' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U 20 && notify-send 'Brightness ---' $(light -G)"
|
||||
|
||||
|
||||
## Volume ##
|
||||
# The volume function is from https://git.hyperling.com/me/env-ansible
|
||||
|
||||
# Use the comma and period keys to change volume.
|
||||
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -05 && notify-send "Volume - " $(volume)'
|
||||
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +05 && notify-send "Volume + " $(volume)'
|
||||
bindsym $shift+$mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -25 && notify-send "Volume ---" $(volume)'
|
||||
bindsym $shift+$mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +25 && notify-send "Volume +++" $(volume)'
|
||||
|
||||
# Actual volume keys.
|
||||
bindsym XF86AudioMute exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume mute && notify-send "Volume Muted" $(volume)'
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +05 && notify-send "Volume + " $(volume)'
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -05 && notify-send "Volume - " $(volume)'
|
||||
bindsym $shift+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +25 && notify-send "Volume +++ " $(volume)'
|
||||
bindsym $shift+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -25 && notify-send "Volume --- " $(volume)'
|
||||
|
||||
bindsym $mod+slash exec pavucontrol
|
||||
bindsym XF86MonBrightnessUp exec --no-startup-id "light -A $small && notify-send -t $time 'Brightness + ' $(light -G)"
|
||||
bindsym XF86MonBrightnessDown exec --no-startup-id "light -U $small && notify-send -t $time 'Brightness - ' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessUp exec --no-startup-id "light -A $large && notify-send -t $time 'Brightness +++' $(light -G)"
|
||||
bindsym $shift+XF86MonBrightnessDown exec --no-startup-id "light -U $large && notify-send -t $time 'Brightness ---' $(light -G)"
|
||||
|
||||
|
||||
## Keyboard Brightness ##
|
||||
@@ -179,15 +165,37 @@ bindsym $mod+slash exec pavucontrol
|
||||
# Macbooks tend to use 'sysfs/leds/smc::kbd_backlight'
|
||||
# NovaCustom laptop is 'sysfs/leds/system76_acpi::kbd_backlight'
|
||||
# Some other laptops may be 'sysfs/class/leds/...', use ìght -L`to find out.
|
||||
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send -t 1500 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send -t 1500 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessUp exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send -t 1500 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+XF86KbdBrightnessDown exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send -t 1500 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
|
||||
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send -t 1500 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send -t 1500 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send -t 1500 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send -t 1500 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
|
||||
|
||||
## Volume ##
|
||||
# The volume function is from https://git.hyperling.com/me/env-ansible
|
||||
|
||||
set $large 25
|
||||
|
||||
# Use the comma and period keys to change volume.
|
||||
bindsym $mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$small && notify-send -t $time "Volume - " $(volume)'
|
||||
bindsym $mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$small && notify-send -t $time "Volume + " $(volume)'
|
||||
bindsym $shift+$mod+comma exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$large && notify-send -t $time "Volume ---" $(volume)'
|
||||
bindsym $shift+$mod+period exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$large && notify-send -t $time "Volume +++" $(volume)'
|
||||
|
||||
# Actual volume keys.
|
||||
bindsym XF86AudioMute exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume mute && notify-send -t $time "Volume Muted" $(volume)'
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$small && notify-send -t $time "Volume + " $(volume)'
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$small && notify-send -t $time "Volume - " $(volume)'
|
||||
bindsym $shift+XF86AudioRaiseVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume +$large && notify-send -t $time "Volume +++ " $(volume)'
|
||||
bindsym $shift+XF86AudioLowerVolume exec --no-startup-id bash -c 'source /usr/local/bin/volume.function && volume -$large && notify-send -t $time "Volume --- " $(volume)'
|
||||
|
||||
bindsym $mod+slash exec pavucontrol
|
||||
|
||||
bindsym $mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 05 && notify-send 'Keyboard Brightness + ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 05 && notify-send 'Keyboard Brightness - ' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+apostrophe exec "light -s sysfs/leds/smc::kbd_backlight -A 20 && notify-send 'Keyboard Brightness +++' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
bindsym $shift+$mod+semicolon exec "light -s sysfs/leds/smc::kbd_backlight -U 20 && notify-send 'Keyboard Brightness ---' $(light -s sysfs/leds/smc::kbd_backlight -G)"
|
||||
|
||||
|
||||
## Workspaces ##
|
||||
|
||||
Reference in New Issue
Block a user