Compare commits

..

No commits in common. "cb2305496e10c7d9bfa21cb9607e139e04370545" and "01f328be313912e6a77fc942c910aa5aa6c29338" have entirely different histories.

3 changed files with 2 additions and 26 deletions

View File

@ -22,6 +22,3 @@ function genlop; doas -u portage /usr/bin/genlop; end
function loginctl; doas /bin/loginctl; end function loginctl; doas /bin/loginctl; end
function pyenv; source ~/dox/proj/ref/venv/bin/activate.fish; end function pyenv; source ~/dox/proj/ref/venv/bin/activate.fish; end
# bootleg meme feed
function arf; cd ~/med/memes/arf; mpv --no-resume-playback (ls | shuf); end

View File

@ -1,27 +1,6 @@
#!/bin/sh #!/bin/sh
# Categorize files in the quarantine directory # Categorize files in the quarantine directory
# read -n 1 isn't POSIX-compliant so we implement something
# https://unix.stackexchange.com/questions/464930/can-i-read-a-single-character-from-stdin-in-posix-shell
readc() {
# return a single character from input
# if tty
if [ -t 0 ]; then
# save settings
saved_settings="$(stty -g)"
# make it so we get the character even if no enter press
stty -icanon
fi
dd bs=1 count=1 2>/dev/null
if [ -t 0 ]; then
# restore settings
stty "$saved_settings"
fi
}
view() { view() {
mpv --no-resume-playback "$1" mpv --no-resume-playback "$1"
} }
@ -82,7 +61,7 @@ while read -r FILE; do
printf "send to: %s\n" "$DESTPATH" printf "send to: %s\n" "$DESTPATH"
printf "\nh view again, j set directory, k set name, l confirm, L confirm and preserve information\n q exit, s skip, d move to trash\n" printf "\nh view again, j set directory, k set name, l confirm, L confirm and preserve information\n q exit, s skip, d move to trash\n"
printf "\n> " printf "\n> "
ANS="$(readc </dev/tty)" read -n 1 ANS < /dev/tty
case "$ANS" in case "$ANS" in
q ) exit;; q ) exit;;
h ) view "$FILE";; h ) view "$FILE";;

View File

@ -16,7 +16,7 @@ wallpaper
xss-lock -- slock & xss-lock -- slock &
dunst & dunst &
xrdb .Xresources xrdb .Xresources
gentoo-pipewire-launcher & # gentoo-pipewire-launcher &
# DBus # DBus
export NO_AT_BRIDGE=1 export NO_AT_BRIDGE=1