diff --git a/.config/fish/alias.fish b/.config/fish/alias.fish index 2785d5a..ef9206f 100644 --- a/.config/fish/alias.fish +++ b/.config/fish/alias.fish @@ -54,7 +54,6 @@ alias paur "pacman -Qm" alias porphan "pacman -Qtdq" # Tmux -alias t "tmux" alias ta "tmux attach" alias td "tmux detach" alias tl "tmux ls" diff --git a/.config/fish/functions/t.fish b/.config/fish/functions/t.fish new file mode 100644 index 0000000..6f3f549 --- /dev/null +++ b/.config/fish/functions/t.fish @@ -0,0 +1,15 @@ +function t + if not tmux has-session -t main 2>/dev/null + init_session + end + + tmux attach-session -t main +end + +function init_session + tmux new-session -d -s main -d -x (tput cols) -y (tput lines) + tmux split-window -v -l 10 journalctl -f + tmux select-pane -t 0 + tmux split-window -h -l 50 btop + tmux select-pane -t 0 +end \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6aac852..d075eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /* +*.log !.gitignore !/.config /.config/*