From e703f1332a590e07273dbb821711c9ce9a7e927e Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sun, 23 Aug 2020 12:23:37 +0200 Subject: [PATCH] Add shell auxiliary function to start default tmux session --- config/bash/scripts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/bash/scripts.sh b/config/bash/scripts.sh index 5abfbf8..5d366be 100755 --- a/config/bash/scripts.sh +++ b/config/bash/scripts.sh @@ -19,3 +19,12 @@ function run-remote-apt-upgrade() { ssh "$host" -t "tmux new-session -d -A -s apt-updates \; send-keys 'sudo apt clean && sudo apt update && sudo apt upgrade && sudo apt autoremove && tripwire --check --interactive' ENTER \; attach" } + +function tmux-main() { + tmux attach -t main || \ + tmux new-session -d -A -s main \; \ + send-keys 'journalctl --follow' ENTER \; \ + split-window \; \ + send-keys 'htop -t' ENTER \; \ + attach-session -t main +}