From 949d2f7025cbfe4db316a3fc13199ac5c82d4b5b Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Sun, 13 Aug 2023 20:18:46 +0200 Subject: [zshrc] use exec and keychain identity Add keychain identity on startup, this is more useful because with suspend I will only type the password once per day. Also it makes adding with keyadd faster. Also use exec to have less processes, don't know if it works though... --- config/essentials/zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/essentials/zsh/.zshrc') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index d8675d4..0665533 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -5,9 +5,9 @@ then clear if [ "/dev/tty1" = "$TTY" ] then - startw > /dev/null 2>&1 + exec startw > /dev/null 2>&1 else - startx > /dev/null 2>&1 + exec startx > /dev/null 2>&1 fi exit fi -- cgit v1.2.3 From 63c16da0da3e9b0cdc3fb6f9cd3031dc2297a09c Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 15 Aug 2023 15:26:23 +0200 Subject: [.zshrc] refactored git_parse_remote use cut instead of sed to get the state of the remote, now you could use this command: git branch -v 2> /dev/null | sed '/^*/!d;s/^[^[]*\[\([^ ]*\).*$/\1/' but at this point, it feels more like intellectual masturbation. --- config/essentials/zsh/.zshrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/essentials/zsh/.zshrc') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 0665533..769c805 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -121,13 +121,13 @@ RPROMPT='%F{blue}$(parse_git_remote)%f%F{red}$(parse_git_status)%f%F{green}$(par setopt prompt_subst parse_git_remote() { - b="$(git branch -v 2> /dev/null | grep "^*" | sed 's/.\+\[\([^ ]\+\).*$/\1/')" + b="$(git branch -v 2>/dev/null | grep "^*" | cut -f2 -d'[' | cut -f1 -d' ')" if [ "$b" = "behind" ] then - echo -n "↓ " + printf "↓ " elif [ "$b" = "ahead" ] then - echo -n "↑ " + printf "↑ " fi } parse_git_branch() { -- cgit v1.2.3 From 2e9c5c77562d5aabc1b1f89641fc9eb75b3c9292 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 25 Aug 2023 00:31:24 +0200 Subject: [zshrc] fixed highlight bug --- config/essentials/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/essentials/zsh/.zshrc') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 769c805..eeb4439 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -89,7 +89,7 @@ rehash_precmd() { # window title hooks add-zsh-hook -Uz precmd rehash_precmd set_wt_action () { - print -Pn '\e]0;$1\a' + print -Pn "\e]0;$1\a\033[0m" } add-zsh-hook -Uz preexec set_wt_action set_wt () { -- cgit v1.2.3