From 043c6253537a20875adbfd274c1c3a3377803095 Mon Sep 17 00:00:00 2001 From: Aleks Ozolins Date: Sun, 5 Apr 2020 09:19:53 -0400 Subject: [PATCH 1/2] Update .profile to export XDG base dirs (#526) Not every program will read them from ~/.config/user-dirs.dirs so might as well export them yourself... Also can now use them elsewhere. --- .profile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.profile b/.profile index 1b5460a..890acde 100644 --- a/.profile +++ b/.profile @@ -14,6 +14,9 @@ export BROWSER="brave" export READER="zathura" export STATUSBAR="${LARBSWM}blocks" +# Export XDG environmental variables from '~/.config/user-dirs.dirs' +eval "$(sed 's/^[^#].*/export &/g;t;d' ~/.config/user-dirs.dirs)" + # ~/ Clean-up: #export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export NOTMUCH_CONFIG="$HOME/.config/notmuch-config" From 77ba6e73c64aebf9e4f35a217117fc3dafbde99c Mon Sep 17 00:00:00 2001 From: Spenser Truex Date: Sun, 5 Apr 2020 15:30:49 -0700 Subject: [PATCH 2/2] Prevent writing all marked imgs onto file (lossage) (#534) This fix issues a warning message and does nothing in that case. Running C-x c (copy) or C-x m (move) will copy/move all the marked files to a single location. If that location is not a directory, then creating that file and overwriting it several times results in complete loss of data in the case of moving, and unhelpful behaviour in the case of "copying". Only the last marked file remains in the file. --- .config/sxiv/exec/key-handler | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index d9f1825..73b572a 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -6,11 +6,13 @@ do "c") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & ;; "m") [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/directories | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & ;; "r")