cleanup: variables and code

This commit is contained in:
David JULIEN 2021-09-07 23:52:48 +02:00
parent 2aecdc58ba
commit 83809e1988
4 changed files with 11 additions and 5 deletions

View File

@ -8,12 +8,12 @@ xss-lock -- slock &
redshift & redshift &
dunst -follow mouse &> /dev/null & #temp fix dunst -follow mouse &> /dev/null & #temp fix
# MPD daemon start (if no other user instance exists) # MPD daemon start (if no other user instance exists)
[ ! -s ~/.config/mpd/pid ] && mpd [ ! -s "$XDG_CONFIG_HOME/mpd/pid" ] && mpd
pulsemixer --set-volume 50 pulsemixer --set-volume 50
sbacklight set 3 & sbacklight set 3 &
setbg & setbg &
dwmblocks & dwmblocks &
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources xrdb "$XDG_CONFIG_HOME/X11/xresources"
xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 & xinput set-prop 'Synaptics TM3072-003' 'libinput Tapping Enabled' 1 &
xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 & xinput set-prop 'Synaptics TM3072-003' 'libinput Natural Scrolling Enabled' 1 &

View File

@ -20,8 +20,14 @@ step=$(expr $max / 20)
[ "$1" = "dec" ] && new=$(expr $current - $step) [ "$1" = "dec" ] && new=$(expr $current - $step)
[ "$1" = "inc" ] && new=$(expr $current + $step) [ "$1" = "inc" ] && new=$(expr $current + $step)
[ "$1" = "set" ] && new=$(expr $2 \* $step) [ "$1" = "set" ] && new=$(expr $2 \* $step)
case "$1" in
"dec") new=$(expr $current - $step);;
"inc") new=$(expr $current + $step);;
"set") new=$(expr $2 \* $step);;
*) exit
esac
[ $new -gt 850 ] && new=850 [ $new -gt $max ] && new=$max
[ $new -lt 0 ] && new=0 [ $new -lt 0 ] && new=0
echo $new > /sys/class/backlight/intel_backlight/brightness echo $new > /sys/class/backlight/intel_backlight/brightness

View File

@ -50,4 +50,4 @@ do
esac esac
fi fi
printf " %s %3d%% " "$status" "$capacity"; printf " %s %3d%% " "$status" "$capacity";
done && return 0 done

View File

@ -1 +1 @@
.config/X11/xprofile ~/.config/X11/xprofile