Browse Source

cleanup: variables and code

dev
David JULIEN 3 months ago
parent
commit
83809e1988
  1. 4
      .config/X11/xprofile
  2. 8
      .local/bin/sbacklight
  3. 2
      .local/bin/statusbar/sb-battery
  4. 2
      .xprofile

4
.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 &

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

2
.local/bin/statusbar/sb-battery

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

2
.xprofile

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

Loading…
Cancel
Save