diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-15 23:18:49 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-07-15 23:18:49 +0200 |
commit | 8c22e3212086a89990a3709c78c3eb5ca92a7b2e (patch) | |
tree | 737072b2b5308f4e678299440d6fc007939da77e | |
parent | 0bdd5288aed359f0ed1f4401c08afc1f7868b997 (diff) | |
parent | 0b7195aab3e729f2b577545b3485dfe1193fd046 (diff) |
Merge branch 'main' of db:dotfiles
-rw-r--r-- | config/common/mpv/input.conf | 2 | ||||
-rw-r--r-- | config/essentials/zsh/functions.zsh | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/config/common/mpv/input.conf b/config/common/mpv/input.conf index 9de1b1b..295dd4d 100644 --- a/config/common/mpv/input.conf +++ b/config/common/mpv/input.conf @@ -181,6 +181,8 @@ q quit-watch-later +Alt+l cycle-values loop-file "inf" "no" # toggle infinite looping + # seeking H add chapter -1 L add chapter 1 diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 188b405..fae05d6 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -111,18 +111,19 @@ upfile () { sgd () { d="$PWD" - for dir in ${1:-$HOME/src/*} - do - cd $dir + find $HOME/src -maxdepth 1 -mindepth 1 -type d | + while read -r dir + do + cd "$dir" + git status > /dev/null 2>&1 || continue git fetch > /dev/null 2>&1 - if [ "$(git status --short 2>/dev/null | grep -v "??" | head -1)" ] - then - # There are changes, and this is a git repo - echo "$PWD \e[1;31m*changes\e[0m" - fi + printf "$PWD" + test "$(git status --short 2>/dev/null | grep -v "??" | head -1)" && + printf " \e[1;31m*changes\e[0m" | sed "s#$HOME#~#" >&2 test "$(parse_git_remote)" && - echo "$PWD \e[0;32m*push/pull\e[0m" - done + printf " \e[0;32m*push/pull\e[0m" | sed "s#$HOME#~#" >&2 + printf "\n" + done cd "$d" unset d } |