diff --git a/.config/X11/xprofile b/.config/X11/xprofile index f644d3e..c1a3f83 100644 --- a/.config/X11/xprofile +++ b/.config/X11/xprofile @@ -8,12 +8,12 @@ xss-lock -- slock & redshift & dunst -follow mouse &> /dev/null & #temp fix # 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 sbacklight set 3 & setbg & 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 Natural Scrolling Enabled' 1 & diff --git a/.local/bin/sbacklight b/.local/bin/sbacklight index 58125fd..fb2cfb9 100755 --- a/.local/bin/sbacklight +++ b/.local/bin/sbacklight @@ -20,8 +20,14 @@ step=$(expr $max / 20) [ "$1" = "dec" ] && new=$(expr $current - $step) [ "$1" = "inc" ] && new=$(expr $current + $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 echo $new > /sys/class/backlight/intel_backlight/brightness diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery index 48d7821..b164339 100755 --- a/.local/bin/statusbar/sb-battery +++ b/.local/bin/statusbar/sb-battery @@ -50,4 +50,4 @@ do esac fi printf " %s %3d%% " "$status" "$capacity"; -done && return 0 +done diff --git a/.xprofile b/.xprofile index f4c89aa..bc8f6e1 100644 --- a/.xprofile +++ b/.xprofile @@ -1 +1 @@ -.config/X11/xprofile +~/.config/X11/xprofile