Skip to content

Commit

Permalink
Adds support for changing brightness on Ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrewer committed Aug 7, 2023
1 parent 03cb82b commit c763f3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion install-xmonad
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
# Author: David Brewer

echo "Installing required packages..."
sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar xcompmgr nitrogen stalonetray moreutils synapse ssh-askpass-gnome suckless-tools
sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar xcompmgr nitrogen stalonetray moreutils synapse ssh-askpass-gnome suckless-tools brightnessctl

# If brightnessctl does not work, you may need to add your username to the
# video group to give it permission. Then you may need to log out and back in.
# sudo gpasswd -a <user_name> video

echo "Creating xmonad xsession configuration..."
if [ -f "/usr/share/xsessions/xmonad.desktop" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion startup-hook
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ fi
# change depending on what devices you have plugged into USB. We extract the
# id of the device from the output of xinput, then use it to disable the
# device
TOUCHPAD_ID=`xinput | grep 'Synaptics TouchPad' | cut -f 2 | cut -f 2 -d =`
TOUCHPAD_ID=`xinput | grep 'Synaptics' | cut -f 2 | cut -f 2 -d =`
xinput set-prop $TOUCHPAD_ID "Device Enabled" 0
2 changes: 2 additions & 0 deletions xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ myKeyBindings =
, ((0, 0x1008FF12), spawn "amixer -q set Master toggle")
, ((0, 0x1008FF11), spawn "amixer -q set Master 10%-")
, ((0, 0x1008FF13), spawn "amixer -q set Master 10%+")
, ((0, 0x1008FF02), spawn "brightnessctl set +10%")
, ((0, 0x1008FF03), spawn "brightnessctl set 10%-")
]


Expand Down

0 comments on commit c763f3e

Please sign in to comment.