diff --git a/.config/directories b/.config/directories index 7f55c5c..b3807cd 100644 --- a/.config/directories +++ b/.config/directories @@ -3,9 +3,11 @@ cac ${XDG_CACHE_HOME:-$HOME/.cache} cf ${XDG_CONFIG_HOME:-$HOME/.config} D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} d ${XDG_DOCUMENTS_DIR:-$HOME/Documents} +dt ${XDG_DATA_HOME:-$HOME/.local/share} h $HOME m ${XDG_MUSIC_DIR:-$HOME/Music} mn /mnt pp ${XDG_PICTURES_DIR:-$HOME/Pictures} -sc ~/.local/bin +sc $HOME/.local/bin +src $HOME/.local/src vv ${XDG_VIDEOS_DIR:-$HOME/Videos} diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 9fa50ca..dc45337 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -1,6 +1,7 @@ set statusbar-h-padding 0 set statusbar-v-padding 0 set page-padding 1 +set selection-clipboard clipboard map u scroll half-up map d scroll half-down map D toggle_page_mode diff --git a/.local/bin/camtoggle b/.local/bin/camtoggle index 05679c0..d29a8b4 100755 --- a/.local/bin/camtoggle +++ b/.local/bin/camtoggle @@ -1,2 +1,2 @@ #!/bin/sh -pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" /dev/video0 +pkill -f /dev/video || mpv --no-osc --no-input-default-bindings --input-conf=/dev/null --geometry=-0-0 --autofit=30% --title="mpvfloat" --profile=low-latency --untimed /dev/video0 diff --git a/.local/bin/dmenumountcifs b/.local/bin/dmenumountcifs index 99be72f..46c2b57 100755 --- a/.local/bin/dmenumountcifs +++ b/.local/bin/dmenumountcifs @@ -1,5 +1,5 @@ #!/bin/sh -# Gives a dmenu prompt to mount unmounted local NAS shares. +# Gives a dmenu prompt to mount unmounted local NAS shares for read/write. # Requirements - "%wheel ALL=(ALL) NOPASSWD: ALL" # # Browse for mDNS/DNS-SD services using the Avahi daemon... @@ -12,7 +12,7 @@ share2mnt=//"$srvname".local/"$share" sharemount() { mounted=$(mount -v | grep "$share2mnt") || ([ ! -d /mnt/"$share" ] && sudo mkdir /mnt/"$share") - [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="" /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 + [ -z "$mounted" ] && sudo mount -t cifs "$share2mnt" -o user=nobody,password="",noperm /mnt/"$share" && notify-send "Netshare $share mounted" && exit 0 notify-send "Netshare $share already mounted"; exit 1 } diff --git a/.local/bin/ifinstalled b/.local/bin/ifinstalled index e2013a4..be3ac24 100755 --- a/.local/bin/ifinstalled +++ b/.local/bin/ifinstalled @@ -6,6 +6,6 @@ # various other scripts for clarity's sake. for x in "$@";do - pacman -Qq "$x" 2>/dev/null || + pacman -Qq "$x" >/dev/null 2>&1 || { notify-send "📦 $x" "must be installed for this function." && exit 1 ;} done diff --git a/.local/bin/statusbar/kbselect b/.local/bin/statusbar/kbselect index d7313c6..f0c923f 100755 --- a/.local/bin/statusbar/kbselect +++ b/.local/bin/statusbar/kbselect @@ -1,14 +1,14 @@ #!/bin/sh # works on any init system -# requirements: dmenu, xorg-setxkbmap, xkblayout-state (https://github.com/nonpop/xkblayout-state) -kb="$(xkblayout-state print "%s")" || exit 1 +# requirements: dmenu, xorg-setxkbmap +kb="$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')" || exit 1 case $BLOCK_BUTTON in 1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | dmenu -l 15)" kb="$(echo "$kb_choice" | awk '{print $3}')" setxkbmap "$kb" pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";; - 3) notify-send "⌨ Keyboard/language module" "$(xkblayout-state print "\- Current layout: %s (%n)") + 3) notify-send "⌨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')") - Left click to change keyboard.";; 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac