From bc97060419c4f70bd88f4b91eab82e0bb09e11c8 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 7 Oct 2024 23:03:26 +0200 Subject: checkpoint --- config/essentials/shell/aliases.sh | 2 +- config/essentials/shell/functions.sh | 4 ++-- config/essentials/zsh/.zshrc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'config/essentials') diff --git a/config/essentials/shell/aliases.sh b/config/essentials/shell/aliases.sh index c6bb139..c2c6342 100644 --- a/config/essentials/shell/aliases.sh +++ b/config/essentials/shell/aliases.sh @@ -139,7 +139,7 @@ alias ss4='ss -tln4p' alias mdb='mariadb -u admin -ppass admindb' alias mdbw='mariadb -h 0.0.0.0 -u padmin -pbulbizarre padmindb' alias mdbwa='mariadb -h 10.3.50.5 -u padmin -pbulbizarre padmindb' -alias tmux='pgrep tmux && tmux attach || tmux new-session' +alias tmux='tmux list-sessions && tmux attach || tmux new-session' # ssh alias sha='ssh-add' diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 0f12206..030778f 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -350,13 +350,13 @@ nvim_bindings() { prj() { pfx="$HOME/proj" d="$(find "$pfx" -mindepth 1 -maxdepth 1 -type d | sed "s@$pfx/@@" |fzf)" - [ -d "$pfx/$d" ] || return 1 + { [ "$d" ] && [ -d "$pfx/$d" ]; } || return 1 cd "$pfx/$d" } prje() { prj || return 1 f="$(git ls-files | fzf)" - [ "$f" ] || exit 1 + [ "$f" ] || return 1 if [ -f "$f" ] then "$EDITOR" "$f" diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 878f04d..91fef35 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -6,7 +6,7 @@ if [ "$(id -u)" -ne 0 ] then [ "${TTY%%tty*}" = '/dev/' ] && clear case "${TTY#/dev/tty}" in - 1) exec startx > /dev/null 2>&1 ;; + 2) exec startx > /dev/null 2>&1 ;; *) false ;; esac && exit fi -- cgit v1.2.3