dump screen in favor of tmux

This commit is contained in:
Martin Sekera 2022-02-02 00:49:42 +01:00
parent 5170fda321
commit 33b6bc653d
5 changed files with 123 additions and 28 deletions

View file

@ -1,6 +0,0 @@
#! /bin/zsh
screen -wipe
sudo echo "Rooted."
sleep .5
screen -S Main -c /etc/screenrc.over

24
bin/tmux-main Executable file
View file

@ -0,0 +1,24 @@
#! /bin/zsh
NICE_ROOT_CMD="sudo ionice -c 3 nice su -"
ANGRY_ROOT_CMD="sudo su -"
# spawn the session but don't attach yet
tmux new-session -d -s Main
# first window is already there
tmux send-keys -l "${NICE_ROOT_CMD}" $'\n'
# three more
for i in {1..3}
do
tmux new-window
tmux send-keys -l "${NICE_ROOT_CMD}" $'\n'
done
# one angry window
tmux new-window
tmux send-keys -l "${ANGRY_ROOT_CMD}" $'\n'
# attach, finally
tmux attach-session -t Main