mirror of
https://github.com/basecamp/omarchy.git
synced 2025-07-27 12:19:24 +00:00
Add asdcontrol for Apple Display brightness
This commit is contained in:
3
bin/apple-display-brightness
Executable file
3
bin/apple-display-brightness
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo asdcontrol $(sudo asdcontrol --detect /dev/usb/hiddev* | grep ^/dev/usb/hiddev | cut -d: -f1) -- "$1"
|
@ -15,6 +15,7 @@ bind = SUPER, W, killactive,
|
||||
# End active session
|
||||
bind = SUPER, ESCAPE, exec, hyprlock
|
||||
bind = SUPER SHIFT, ESCAPE, exit,
|
||||
bind = SUPER SHIFT CTRL, ESCAPE, exec, reboot
|
||||
|
||||
# Control tiling
|
||||
bind = SUPER, J, togglesplit, # dwindle
|
||||
@ -79,6 +80,11 @@ bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
|
||||
# Control Apple Display brightness
|
||||
bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000
|
||||
bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000
|
||||
bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000
|
||||
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
|
11
install/adscontrol.sh
Normal file
11
install/adscontrol.sh
Normal file
@ -0,0 +1,11 @@
|
||||
# Install asdcontrol for controlling brightness on Apple Displays
|
||||
git clone https://github.com/nikosdion/asdcontrol.git /tmp/asdcontrol
|
||||
cd /tmp/asdcontrol
|
||||
make
|
||||
sudo make install
|
||||
cd -
|
||||
rm -rf /tmp/asdcontrol
|
||||
|
||||
# Setup sudo-less controls
|
||||
echo "$USER ALL=(ALL) NOPASSWD: /usr/local/bin/asdcontrol" | sudo tee /etc/sudoers.d/asdcontrol
|
||||
sudo chmod 440 /etc/sudoers.d/asdcontrol
|
Reference in New Issue
Block a user