mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-06-30 09:12:02 +00:00
Compare commits
2 Commits
981d514156
...
3f4190e95a
Author | SHA1 | Date | |
---|---|---|---|
3f4190e95a | |||
d1d88aa7b3 |
@ -9,6 +9,9 @@ bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, D, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
bind = $mainMod, L, exec, hyprlock
|
||||
bind = $mainMod, F, fullscreen
|
||||
|
||||
|
||||
# Move focus window
|
||||
bind = $mainMod, left, movefocus, l
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Screen brightness controls
|
||||
exec-once = light -N 1
|
||||
bind = ,XF86MonBrightnessUp, exec, light -A 5 # increase screen brightness
|
||||
bind = ,XF86MonBrightnessDown, exec, light -U 5 # decrease screen brightness
|
||||
bind = ,XF86MonBrightnessUp, exec, ~/bin/system/backlight-ctl.sh -i
|
||||
bind = ,XF86MonBrightnessDown, exec, ~/bin/system/backlight-ctl.sh -d
|
||||
|
||||
# Pulse Audio controls
|
||||
bind = ,XF86AudioRaiseVolume, exec, amixer set Master 3%+ #increase sound volume
|
||||
|
52
scripts/bin/system/backlight-ctl.sh
Executable file
52
scripts/bin/system/backlight-ctl.sh
Executable file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Print help info.
|
||||
function print_help() {
|
||||
echo 'Control the backlight brightness with animation.'
|
||||
echo
|
||||
echo '-i -- increase brightness'
|
||||
echo '-d -- decrease brightness'
|
||||
}
|
||||
|
||||
# Increase backlight brightness.
|
||||
function increase() {
|
||||
run_animation 'light -A 0.1'
|
||||
}
|
||||
|
||||
# Decrease backlight brightness.
|
||||
function decrease() {
|
||||
run_animation 'light -U 0.1'
|
||||
}
|
||||
|
||||
# Run animation task.
|
||||
function run_animation() {
|
||||
local cmd="${1}"
|
||||
i=0
|
||||
while [ $i -lt 50 ]; do
|
||||
${cmd}
|
||||
sleep 0.01
|
||||
((i = i + 1));
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Check arguments
|
||||
for i in "$@"; do
|
||||
case $i in
|
||||
-h|--help)
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
-i)
|
||||
increase
|
||||
;;
|
||||
-d)
|
||||
decrease
|
||||
;;
|
||||
*)
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
Reference in New Issue
Block a user