config: little fixes

This commit is contained in:
xeruf 2021-12-05 20:50:24 +01:00
parent 179c595fa6
commit 76d07db42b
4 changed files with 11 additions and 8 deletions

View File

@ -442,7 +442,7 @@
},
{
"data": "Journal your day",
"enabled": "expr $(date +%H) \/ 2 - $(jrnl -from '20 hours ago' | wc -l)"
"enabled": "expr $(date +%H) / 2 - $(jrnl -from '20 hours ago' | wc -l)"
}
],
"showBreaksAsRegularWindows": false,
@ -450,5 +450,6 @@
"pauseForSuspendOrLock": true,
"pauseBreaksShortcut": "",
"resumeBreaksShortcut": "",
"screen": "primary"
}
"screen": "primary",
"timeToBreakInTray": false
}

View File

@ -67,10 +67,10 @@ Version 2019-11-04 2021-02-16"
(lambda ($fpath) (let ((process-connection-type nil))
(start-process "" nil "xdg-open" $fpath))) $file-list))))))
(defun dragon (&optional file)
(defun dragon (&optional @file)
; Share file in current buffer via dragon
(interactive)
(shell-command (concat "dragon-drag-and-drop -a -x " (or file buffer-file-name)))
(shell-command (concat "dragon-drag-and-drop -a -x " (if (not (string-blank-p @file)) @file buffer-file-name)))
)
;; rebing C-u - https://emacs.stackexchange.com/a/58320

View File

@ -26,7 +26,7 @@ fileinfo() {
tput setaf 6
for arg
do case "$arg" in (-*) continue;; esac
$elevate file -E "$arg" && ffprobe "$arg" 2>&1 | grep Duration | sed 's/, start:[^,]\+,/,/'
$elevate file -E "$arg" && ffprobe "$arg" 2>&1 | grep Duration | grep -v '00:00:00.04' | sed 's/, start:[^,]\+,/,/'
$elevate stat --format '%A size %sB, birth %.10w mod %.10y' "$arg"
done
}
@ -84,7 +84,9 @@ if test "$timg"; then
$elevate timg --center -t0.3 $(test $# -gt 1 &&
echo "--title --grid=$(expr $(tput cols) / 30)" ||
echo "-g 60x$(expr $(tput lines) / 2)") "$@" 2>/dev/null
fileinfo "${timg[@]}"
for img in "${timg[@]}"
do printf "%11s %-30s %s\n" "$(identify -format "%wx%h" "$img")" "$img" "$(identify -precision 3 -format "%b %m %[bit-depth]-bit %[colorspace]" "$img")"
done
fi
if test "$bat"; then

View File

@ -9,7 +9,7 @@ case $1 in
info --vi-keys $(test $last != zsh && echo --index-search=$last) zsh || LESS="$LESS +/^ *$last *\\[" man zshall;;
(vlc) unbuffer vlc --full-help "${@:2}" | $paginate;;
(gh|chordpro) $@ --help | $paginate;;
(caddy|stretchly) $1 help ${@:2} | $paginate;;
(caddy|stretchly|go) $1 help ${@:2} | $paginate;;
(*) man "$@" || { info "$1" -w | grep -v "manpages" && pinfo "$@"; } || { "$@" --help || "$@" -help; } 2>&1 | ${PAGER:-less} || which "$@";;
esac
docs="/usr/share/doc/$1"