From 5ffcbbffccc2910675549f3a2aac1923edf58b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 20 Sep 2025 11:30:07 +0200 Subject: [PATCH] shell: improve tmux and edit aliases --- shell/.config/shellconfig/aliases.sh | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/shell/.config/shellconfig/aliases.sh b/shell/.config/shellconfig/aliases.sh index 4154552..d840545 100644 --- a/shell/.config/shellconfig/aliases.sh +++ b/shell/.config/shellconfig/aliases.sh @@ -1,9 +1,6 @@ -alias v=nvim +alias v=vis alias ll='ls -l' -alias ta='tmux attach -t' alias tl='tmux list-sessions' -alias tn='tmux new -s' -alias fv='fzf --preview="bat --color=always --theme=Nord {}" --bind="enter:become(nvim {})"' alias rgh='rg -.' alias fdh='fd -H' @@ -15,10 +12,22 @@ fi alias nocaps='setxkbmap pl -option ctrl:nocaps' alias fixdp='xrandr --output DP-0 --right-of DP-2' -vf() { - if [ -z "$1" ]; then - vis $(fzf) +tn() { + if [ $# -eq 0 ]; then + tmux new else - vis $(fzf -q $1) + tmux new -s "$@" fi } + +ta() { + if [ $# -eq 0 ]; then + tmux attach + else + tmux attach -t "$@" + fi +} + +vf() { + fzf --bind 'enter:become:vis {}' -q "$1" +}