From 6021a9e22f99bb9b19134e2cb443bdeba852edc6 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 27 Mar 2021 18:46:45 +0100 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accounts/gkleen@sif/xmonad/xmonad.hs | 2 +- accounts/gkleen@sif/zshrc | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 425beaf4..8282ed3f 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -199,7 +199,7 @@ hostFromName h , assign' ["work", "uni"] $ className =? "jetbrains-idea-ce" , assign "read" $ className =? "llpp" , assign "read" $ className =? "Evince" - , assign "read" $ fmap ("zathura" `isInfixOf`) title + , assign "read" $ className =? "Zathura" , assign "read" $ className =? "MuPDF" , assign "read" $ className =? "Xournal" , assign "read" $ appName =? "com-trollworks-gcs-app-GCS" diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index c65e35f9..fd1f1002 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -1,9 +1,20 @@ filebin() { basePath=/srv/www/files - ssh ymir find "${basePath}" -type f -print0 \ - | while IFS= read -r -d $'\0' p; do - printf "https://f.141.li/%s\n" "${p#${basePath}/}" + ssh ymir find /srv/www/files -type f -printf "$'%T@ %TY-%Tm-%TdT%TH:%TM %P\\\\0'" | sort -zn | cut -z -d ' ' -f 2- \ + | while IFS= read -r -d $'\0' l; do + IFS=' ' read -r t p <<<"${l}" + printf "%s https://f.141.li/%s\n" "${t}" "${p}" + done +} + +push2bin() { + if [[ ${#@} -eq 1 && ! -r ${1} ]]; then + uux -p 'ymir!push2bin' $(echo -n "${1:t}" | tr -c $'[:alnum:]+-=.' '_') + else + for f (${@}); do + uux -p 'ymir!push2bin' $(echo -n "${f:t}" | tr -c $'[:alnum:]+-=.' '_') <${f} done + fi } genmail() { -- cgit v1.2.3