From 77930b3931184b2b7c9ac12f97c03a1536f57440 Mon Sep 17 00:00:00 2001 From: Rocco Himel Date: Sun, 7 Dec 2025 00:05:59 -0500 Subject: [PATCH] Added startup.rc, startup.sh --- startup.rc | 2 ++ startup.sh | 32 ++++++++++++++++++++++++++++++++ tmux.c | 1 + 3 files changed, 35 insertions(+) create mode 100644 startup.rc create mode 100644 startup.sh diff --git a/startup.rc b/startup.rc new file mode 100644 index 00000000..68daac8b --- /dev/null +++ b/startup.rc @@ -0,0 +1,2 @@ +run-shell "/usr/lib/etmux/startup.sh" + diff --git a/startup.sh b/startup.sh new file mode 100644 index 00000000..e15bbf43 --- /dev/null +++ b/startup.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +# starts new tmux session if not in tmux already +if [ -z "$TMUX" ]; then + tmux new-session -d + tmux send-keys "$0 inside" C-m + tmux attach + exit +fi + +# all the configs +if [ "$1" = "inside" ]; then + tmux rename-session lay # session name + tmux set -g status-style bg=black,fg=white # term colors + tmux set -g window-style bg=black # window colors + tmux set -g window-active-style bg=black # active window colors + tmux set -g pane-border-style fg=blue # pane colors + tmux set -g pane-active-border-style fg=cyan # active pane colors + tmux set -g status-bg blue # status bar color + tmux set -g status-fg white # status bar text color + # select panes / rc + tmux split-window -h + tmux send-keys "clear" C-m + tmux send-keys "ls ~" C-m + tmux select-pane -L + tmux send-keys "clear" C-m + tmux send-keys "fastfetch" C-m + tmux split-window -v + tmux send-keys "clear" C-m + tmux send-keys "htop" C-m + tmux select-pane -R +fi diff --git a/tmux.c b/tmux.c index 8d390203..2a618866 100644 --- a/tmux.c +++ b/tmux.c @@ -537,4 +537,5 @@ main(int argc, char **argv) /* Pass control to the client. */ exit(client_main(osdep_event_init(), argc, argv, flags, feat)); + load_cfg("/usr/lib/etmux/startup.rc", NULL, 0); }