Created
October 12, 2025 08:02
-
-
Save scarf005/3b5406f2c28bab95cde205c08e3861a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # TO USE | |
| # 1. clone github.com/dustinkirkland/hollywood | |
| # 2. cd to hollywood | |
| # 3. install errno/speedometer/cmatrix/apg/hexdump...etc | |
| # 4. download this script into root of hollywood (so hollywood/peace-comes-at-a-price.bash) | |
| # 5. chmod+x peace-comes-at-a-price.bash then launch it | |
| HOLLY=${HOLLY:-$PWD} | |
| if [ ! -d "$HOLLY" ]; then | |
| echo "Error: HOLLY directory does not exist at: $HOLLY" | |
| exit 1 | |
| fi | |
| if ! tput cols &>/dev/null; then | |
| echo "Error: Not running in a TTY. Cannot determine terminal size." | |
| exit 1 | |
| fi | |
| SESSION_NAME="peace_comes_at_a_price" | |
| LEFT_COMMAND="lib/hollywood/htop" | |
| RIGHT_COMMANDS=( | |
| "lib/hollywood/logs" | |
| "lib/hollywood/errno" | |
| "lib/hollywood/speedometer" | |
| "lib/hollywood/cmatrix" | |
| "lib/hollywood/code" | |
| "lib/hollywood/apg" | |
| "lib/hollywood/hexdump" | |
| "lib/hollywood/man" | |
| "lib/hollywood/stat" | |
| "lib/hollywood/tree" | |
| ) | |
| if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then | |
| echo "Killing existing session '$SESSION_NAME'." | |
| tmux kill-session -t "$SESSION_NAME" | |
| fi | |
| TERM_WIDTH=$(tput cols) | |
| TERM_HEIGHT=$(tput lines) | |
| LINE_HEIGHT=$(( TERM_HEIGHT / 10 - 1 )) | |
| echo "Starting new tmux session: $SESSION_NAME in directory: $HOLLY" | |
| tmux new-session -d -s "$SESSION_NAME" -c "$HOLLY" \ | |
| -x "$TERM_WIDTH" -y "$TERM_HEIGHT" | |
| tmux set-option -t "$SESSION_NAME" status off | |
| tmux split-window -h -t "$SESSION_NAME:0.0" -c "$HOLLY" | |
| for ((i=1; i<${#RIGHT_COMMANDS[@]}; i++)); do | |
| tmux split-window -v -d -t "$SESSION_NAME:0.1" -c "$HOLLY" -l $LINE_HEIGHT | |
| done | |
| # Left Panes | |
| tmux send-keys -t "$SESSION_NAME:0.0" "$LEFT_COMMAND" C-m | |
| # Right Panes | |
| PANE_INDEX=1 | |
| for CMD in "${RIGHT_COMMANDS[@]}"; do | |
| tmux send-keys -t "$SESSION_NAME":0."$PANE_INDEX" "$CMD" C-m | |
| PANE_INDEX=$((PANE_INDEX + 1)) | |
| done | |
| tmux select-pane -t "$SESSION_NAME:0.0" | |
| echo "Attaching to the session..." | |
| tmux attach-session -t "$SESSION_NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment