From 83809e198844e13b98532864a4052b7c1cd9585a Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 7 Sep 2021 23:52:48 +0200 Subject: [PATCH 1/4] cleanup: variables and code --- .config/X11/xprofile | 4 ++-- .local/bin/sbacklight | 8 +++++++- .local/bin/statusbar/sb-battery | 2 +- .xprofile | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) 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 From 786862340e484aa7975efb6bd3a19f1e4a429015 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 7 Sep 2021 23:53:37 +0200 Subject: [PATCH 2/4] feat: zsh options auto-complete and space-to-ignore --- .config/zsh/.zshrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 8b1c592..277119e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -19,6 +19,7 @@ bindkey '^[[6~' down-line-or-history # PageDown HISTSIZE=10000 SAVEHIST=10000 HISTFILE=~/.cache/zsh/history +setopt hist_ignore_space # Ignore commands preceeded by a space # Basic auto/tab complete: autoload -U compinit @@ -27,6 +28,9 @@ zmodload zsh/complist compinit _comp_options+=(globdots) # Include hidden files. +# Command correction +setopt correctall + # vi mode bindkey -v export KEYTIMEOUT=1 From 59a4bb273aaadc51774510d230086270ea3b6e9d Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 7 Sep 2021 23:54:37 +0200 Subject: [PATCH 3/4] feat: upgrade sumneko --- .local/share/nvim/lsp/sumneko_lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/share/nvim/lsp/sumneko_lua b/.local/share/nvim/lsp/sumneko_lua index 8bd3d09..db51575 160000 --- a/.local/share/nvim/lsp/sumneko_lua +++ b/.local/share/nvim/lsp/sumneko_lua @@ -1 +1 @@ -Subproject commit 8bd3d0987af29c71f5e6bfa884936dc99aa58293 +Subproject commit db515753ac0c9811199453d3e4ce72a1c72f5e2e From ff2152ec3b4caedcce39cb28b4f32101383ddb4e Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 7 Sep 2021 23:56:08 +0200 Subject: [PATCH 4/4] refactor: only one floating window class --- .config/sxhkd/sxhkdrc | 6 +++--- .local/src/dwm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 7d0d706..80850e7 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -54,13 +54,13 @@ super + shift + {h,j,k,l} player {prev,stop,toggle,next} super + shift + m - $TERMINAL -g 128x32 -c "ncmpcpp" -e ncmpcpp + $TERMINAL -g 128x32 -c "float" -e ncmpc super + shift + n - $TERMINAL -g 128x32 -c "neomutt" -e neomutt + $TERMINAL -g 128x32 -c "float" -e neomutt super + shift + t - $TERMINAL -g 128x32 -c "transmission" -e tremc + $TERMINAL -g 128x32 -c "float" -e tremc super + shift + b script="$(printf "bibinput\nbibshow" | dmenu -i -p "which script?")" && $script diff --git a/.local/src/dwm b/.local/src/dwm index 0e2075b..7199d8d 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 0e2075b0ec4282cb81dec8055332b5f71ede9e6c +Subproject commit 7199d8d564c144bbf4d47641db72b071f39533c7