Browse Source

Switch from xbacklight to brightnessctl, update packages

master
Riyyi 7 years ago
parent
commit
fa57174c9d
  1. 4
      .config/i3/config
  2. 8
      .scripts/wm/brightness.sh
  3. 6
      packages

4
.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 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 bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
# Screen brightness # Screen brightness
bindsym $mod+F3 exec xbacklight -inc 10 && pkill -RTMIN+2 i3blocks bindsym $mod+F3 exec brightnessctl -q s +10% && pkill -RTMIN+2 i3blocks
bindsym $mod+F2 exec xbacklight -dec 10 && pkill -RTMIN+2 i3blocks bindsym $mod+F2 exec brightnessctl -q s 10%- && pkill -RTMIN+2 i3blocks
# Screenshot # Screenshot
bindsym --release Print exec scrot -e "mv \$f $HOME/Pictures/screen_captures/" # Fullscreen 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 bindsym --release Shift+Print exec scrot -s -e "mv \$f $HOME/Pictures/screen_captures/" # Selection

8
.scripts/wm/brightness.sh

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
3) xbacklight -set 30 ;; # right click 3) brightnessctl -q s 30% ;; # right click
4) xbacklight -inc 10 ;; # scroll up 4) brightnessctl -q s +10% ;; # scroll up
5) xbacklight -dec 10 ;; # scroll down 5) brightnessctl -q s 10%- ;; # scroll down
esac esac
PERCENTAGE=$(printf "%.0f" "$(xbacklight)") PERCENTAGE=$(brightnessctl | awk '/\([0-9]+%\)/ { print substr($4, 2, length($4) - 3) }')
if [ "$PERCENTAGE" -ge "75" ]; then if [ "$PERCENTAGE" -ge "75" ]; then
ICON="" ICON=""

6
packages

@ -3,14 +3,15 @@ adobe-source-han-sans-otc-fonts
alsa-utils alsa-utils
arandr arandr
arc-icon-theme-git arc-icon-theme-git
brightnessctl
capitaine-cursors capitaine-cursors
checkbashisms checkbashisms
chromium chromium
clang
cower cower
dialog dialog
domoticz-git domoticz-git
dos2unix dos2unix
doxygen
efibootmgr efibootmgr
exfat-utils exfat-utils
feh feh
@ -21,6 +22,7 @@ fritzing
gedit gedit
git git
gnome-themes-standard gnome-themes-standard
graphviz
gtk-theme-arc-git gtk-theme-arc-git
gucharmap gucharmap
gvfs gvfs
@ -55,7 +57,6 @@ pavucontrol
platformio platformio
playerctl playerctl
poppler-glib poppler-glib
powertop
pulseaudio pulseaudio
pulseaudio-alsa pulseaudio-alsa
python2-click-5.1 python2-click-5.1
@ -100,7 +101,6 @@ xarchiver
xcape xcape
xdotool xdotool
xorg-server xorg-server
xorg-xbacklight
xorg-xinit xorg-xinit
xorg-xinput xorg-xinput
xorg-xprop xorg-xprop

Loading…
Cancel
Save