dotfiles

My dotfiles: zsh, lf, sxiv, i3, ranger, mpd and more
Log | Files | Refs | Submodules | README | LICENSE

commit ae185dc3b18d470c664bc80b10ae797ec42786a8
parent 20a03e90626f299218c497b9f407a779c8a6220c
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Tue,  4 Aug 2020 10:13:28 -0400

Merge branch 'master' of github.com:LukeSmithxyz/voidrice into master

Diffstat:
M.config/directories | 4+++-
M.config/zathura/zathurarc | 1+
M.local/bin/camtoggle | 2+-
M.local/bin/dmenumountcifs | 4++--
M.local/bin/ifinstalled | 2+-
M.local/bin/statusbar/kbselect | 6+++---
6 files changed, 11 insertions(+), 8 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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