diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-21 16:06:25 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-06-21 16:06:25 +0200 |
commit | 10e12bbe481af7974739060f51210f7948fc1df9 (patch) | |
tree | 83722aca11901a5bf7ad433aac6a6b0ba05cf79a /bin | |
parent | 4775688e796faece72c6621bcd94f6eb4ebac5ff (diff) | |
parent | c9cc72113521b793d1baa0d2f558b97478a6acf4 (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common/gt | 8 | ||||
-rwxr-xr-x | bin/extra/clock | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/bin/common/gt b/bin/common/gt index 53d2cab..c679b23 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -5,7 +5,6 @@ # dependencies: # - git # - $EDITOR: -e -# - herbe (optional): -s repos=$HOME/sync/share/git-track.txt # prevent file not found errors @@ -47,7 +46,8 @@ status() { >&2 printf '\r\033[0K' status="$(git status --porcelain 2> /dev/null | awk '{print $1}' | uniq | tr -d '\n')" - remote="$(git branch -v 2>/dev/null | sed 's/ahead/↑/;s/behind/↓/;s/[^↓↑]*//g')" + remote="$(git branch -v 2>/dev/null | + sed '/^*/!d;s/ahead/↑/;s/behind/↓/;s/[^↓↑]*//g')" printf '%s %s %s\n' "$repo_pretty" "$status" "$remote" done < "$repos" @@ -116,6 +116,6 @@ fi if [ "$f_status" ] then status - which herbe > /dev/null 2>&1 && - eval "herbe $(status | sed 's/"/\"/g;s/.*/"&"/' | tr '\n' ' ')" & fi + +# eval "herbe $(status | sed 's/"/\"/g;s/.*/"&"/' | tr '\n' ' ')" diff --git a/bin/extra/clock b/bin/extra/clock index fdffae0..bd6efd2 100755 --- a/bin/extra/clock +++ b/bin/extra/clock @@ -7,7 +7,8 @@ then printf 'start,end,message\n' > "$clocks" fi -if [ "$1" = "-c" ] +# print clocks file prettily +if [ "$1" = "-p" ] then # empty [ "$(wc -l < "$clocks")" -eq 1 ] && exit @@ -23,6 +24,7 @@ then exit fi +# edit clocks file in $EDITOR if [ "$1" = "-e" ] then $EDITOR "$clocks" |