-
Notifications
You must be signed in to change notification settings - Fork 0
/
stmux_sh
executable file
·70 lines (59 loc) · 1.76 KB
/
stmux_sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/zsh
#
# ------------------------------------------------------
# 2023-10-17 (deprecated)
# USEAGE > tmux new-session -tX which uses ~/.tmux.conf
# creates new session called "X"
# ------------------------------------------------------
#
#
#
# ------------------------------------------------------
# THIS CODE for REFERENCE ONlY - do not use
# ------------------------------------------------------
#
# - changed status-style
# PURPOSE: Replaces ~/.tmux.conf with zsh script
# NOTE: Be sure no ~/.tmux.conf
# Be sure no other sessions
#
# TODO: !so how does -A work?
# 2023-06-01
# - escape-time?
j
SESSION=jimSession
## experimental
set-option -sg escape-time 10
# -d detach all other sessions
# -A if $SESSION exits, attach to it
# -s create $SESSIION othewise
tmux new-session -d -A -s $SESSION
# tmux creates first window when session created;
tmux rename-window -t $SESSION:0 ZERO
tmux new-window -t $SESSION:1 -n NVIM
tmux new-window -t $SESSION:2 -n TWO
tmux new-window -t $SESSION:3 -n THREE
tmux new-window -t $SESSION:4 -n FOUR
tmux new-window -t $SESSION:5 -n free
tmux select-window -t $SESSION:1
## BIND-KEY
## USAGE: hold control & shift key, tap left or right arrow
# FAIL: (why?)
#
# -n normal, ie do not use prefix
# tmux bind-key -n C-S-Left previous-window
# tmux bind-key -n C-S-Right next-window
# Not sure
tmux bind-key r source-file ~/.tmux.conf \; display-message " Config reloaded.."
# Works
tmux bind-key -n C-Left previous-window
tmux bind-key -n C-Right next-window
#
tmux -2 attach-session -t $SESSION
#
# ---------------------
# set-option status-style
# ---------------------
# -a adds
tmux set-option -g status-style fg=red # on acer
tmux set-option -ga status-style bg=black # on acer