Skip to content

Instantly share code, notes, and snippets.

@shikendon
Last active March 7, 2024 15:23
Show Gist options
  • Save shikendon/29a2827a25a490bb62a5360e090b68d8 to your computer and use it in GitHub Desktop.
Save shikendon/29a2827a25a490bb62a5360e090b68d8 to your computer and use it in GitHub Desktop.
Generate 4 vertically panes tmux.conf
#!/bin/bash
# Author: Shi-Ken Don <[email protected]>
# Source: https://git.io/debian-bootstrap.sh
# License: MIT
set -e
sudo -V > /dev/null || apt -y install sudo
curl -fsSL git.io/vpeYx | sed 's/eth0/enp1s0/' | bash
sed -ri 's/^#\s*alias/alias/' ${HOME}/.bashrc
sed -ri 's/^#\s*export/export/' ${HOME}/.bashrc
sed -ri 's/^#\s*eval/eval/' ${HOME}/.bashrc
sudo systemctl reload ssh || true
sudo apt -y install vim tmux wget conntrack telnet dnsutils
cat <<'END' > $HOME/tmux.conf
new-session -d
split-window -v
split-window -v
send-keys 'dmesg -Tw' Enter
select-pane -D
send-keys 'top' Enter
split-window -v
send-keys 'watch ip -s -h link show eth0' Enter
select-pane -D
END
cat <<'END' | crontab
# ┌────────────────────── Min (0 - 59)
# │ ┌───────────────── Hour (0 - 23)
# │ │ ┌──────────── Day of month (1 - 31)
# │ │ │ ┌─────── Month (1 - 12)
# │ │ │ │ ┌── Day of week (0 - 6) (Sun to Sat, 7 is Sun)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command to execute # PATH=/usr/bin:/bin
@reboot SHELL=/bin/bash tmux start \; source $HOME/tmux.conf
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment