From 76d07db42b9e970bdd65d6c5124c58942ba80d36 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 5 Dec 2021 20:50:24 +0100 Subject: [PATCH] config: little fixes --- .config/Stretchly/config.json | 7 ++++--- .config/doom/config.el | 4 ++-- .local/bin/scripts/b | 6 ++++-- .local/bin/scripts/help | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.config/Stretchly/config.json b/.config/Stretchly/config.json index c45183b..acf99d8 100644 --- a/.config/Stretchly/config.json +++ b/.config/Stretchly/config.json @@ -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 +} \ No newline at end of file diff --git a/.config/doom/config.el b/.config/doom/config.el index f2d88f1..9593792 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -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 diff --git a/.local/bin/scripts/b b/.local/bin/scripts/b index a4c3813..d79869a 100755 --- a/.local/bin/scripts/b +++ b/.local/bin/scripts/b @@ -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 diff --git a/.local/bin/scripts/help b/.local/bin/scripts/help index 6be741b..142c936 100755 --- a/.local/bin/scripts/help +++ b/.local/bin/scripts/help @@ -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"