From fa57174c9dcfd2731a60532877be448f51404969 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Thu, 22 Mar 2018 12:06:33 +0100 Subject: [PATCH] Switch from xbacklight to brightnessctl, update packages --- .config/i3/config | 4 ++-- .scripts/wm/brightness.sh | 10 +++++----- packages | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index 0016ec4..9e3d83b 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -197,8 +197,8 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q -D pulse sset Master bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q -D pulse sset Master 5%- unmute && pkill -RTMIN+1 i3blocks bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks # Screen brightness -bindsym $mod+F3 exec xbacklight -inc 10 && pkill -RTMIN+2 i3blocks -bindsym $mod+F2 exec xbacklight -dec 10 && pkill -RTMIN+2 i3blocks +bindsym $mod+F3 exec brightnessctl -q s +10% && pkill -RTMIN+2 i3blocks +bindsym $mod+F2 exec brightnessctl -q s 10%- && pkill -RTMIN+2 i3blocks # Screenshot bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/" # Fullscreen bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection diff --git a/.scripts/wm/brightness.sh b/.scripts/wm/brightness.sh index 3863284..101d347 100755 --- a/.scripts/wm/brightness.sh +++ b/.scripts/wm/brightness.sh @@ -1,18 +1,18 @@ #!/bin/sh case $BLOCK_BUTTON in - 3) xbacklight -set 30 ;; # right click - 4) xbacklight -inc 10 ;; # scroll up - 5) xbacklight -dec 10 ;; # scroll down + 3) brightnessctl -q s 30% ;; # right click + 4) brightnessctl -q s +10% ;; # scroll up + 5) brightnessctl -q s 10%- ;; # scroll down esac -PERCENTAGE=$(printf "%.0f" "$(xbacklight)") +PERCENTAGE=$(brightnessctl | awk '/\([0-9]+%\)/ { print substr($4, 2, length($4) - 3) }') if [ "$PERCENTAGE" -ge "75" ]; then ICON="" elif [ "$PERCENTAGE" -ge "25" ]; then ICON="" -else +else ICON="" fi diff --git a/packages b/packages index e91780f..f39668b 100644 --- a/packages +++ b/packages @@ -3,14 +3,15 @@ adobe-source-han-sans-otc-fonts alsa-utils arandr arc-icon-theme-git +brightnessctl capitaine-cursors checkbashisms chromium -clang cower dialog domoticz-git dos2unix +doxygen efibootmgr exfat-utils feh @@ -21,6 +22,7 @@ fritzing gedit git gnome-themes-standard +graphviz gtk-theme-arc-git gucharmap gvfs @@ -55,7 +57,6 @@ pavucontrol platformio playerctl poppler-glib -powertop pulseaudio pulseaudio-alsa python2-click-5.1 @@ -100,7 +101,6 @@ xarchiver xcape xdotool xorg-server -xorg-xbacklight xorg-xinit xorg-xinput xorg-xprop