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 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

8
.scripts/wm/brightness.sh

@ -1,12 +1,12 @@
#!/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=""

6
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

Loading…
Cancel
Save