rename omni tmux session files; renumber windows for easier navigation
This commit is contained in:
parent
c5163cc424
commit
181688ef7c
@ -22,12 +22,12 @@ OMNI_TMUX list-sessions 2>/dev/null | grep -v omni-manager | grep -qi omni || {
|
||||
STATUS "initializing omni server"
|
||||
OMNI_TMUX kill-session -t=omni-manager >/dev/null 2>&1
|
||||
|
||||
OMNI_TMUX -f "$SCWRYPTS_ROOT__remote/omni.tmux.conf" new -d -s omni \
|
||||
OMNI_TMUX -f "$SCWRYPTS_ROOT__remote/omni/tmux.conf" new -d -s omni \
|
||||
"echo searching for first connection...; sleep 30" \; \
|
||||
split-window "sleep 3; TMUX= tmux -L $OMNI_SOCKET a -t=omni-manager" \; \
|
||||
move-window -t 99 \;
|
||||
|
||||
OMNI_TMUX new -d -s omni-manager "$SCWRYPTS_ROOT__remote/omni-manager"
|
||||
OMNI_TMUX new -d -s omni-manager "$SCWRYPTS_ROOT__remote/omni/manager"
|
||||
}
|
||||
|
||||
STATUS 'connecting to omni server'
|
30
scwrypts/ssh/omni/spawn
Executable file
30
scwrypts/ssh/omni/spawn
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/zsh
|
||||
|
||||
#####################################################################
|
||||
|
||||
DEPENDENCIES+=()
|
||||
REQUIRED_ENV+=()
|
||||
|
||||
CHECK_ENVIRONMENT
|
||||
|
||||
#####################################################################
|
||||
|
||||
[[ $TERM =~ tmux ]] && FAIL 69 "\n Cannot run tmux-omni within a tmux session!\n "
|
||||
|
||||
OMNI_SOCKET="omni.socket"
|
||||
OMNI_TMUX() { tmux -L $OMNI_SOCKET $@; }
|
||||
|
||||
OMNI_TMUX list-sessions 2>/dev/null | grep -v omni-manager | grep -qi omni || {
|
||||
STATUS "initializing omni server"
|
||||
OMNI_TMUX kill-session -t=omni-manager >/dev/null 2>&1
|
||||
|
||||
OMNI_TMUX -f "$SCWRYPTS_ROOT__remote/omni/tmux.conf" new -d -s omni \
|
||||
"echo searching for first connection...; sleep 30" \; \
|
||||
split-window "sleep 3; TMUX= tmux -L $OMNI_SOCKET a -t=omni-manager" \; \
|
||||
move-window -t 99 \;
|
||||
|
||||
OMNI_TMUX new -d -s omni-manager "$SCWRYPTS_ROOT__remote/omni/manager"
|
||||
}
|
||||
|
||||
STATUS 'connecting to omni server'
|
||||
OMNI_TMUX a -t=omni
|
@ -40,9 +40,21 @@ bind-key -n M-w send-keys C-M-w
|
||||
|
||||
unbind-key C-b
|
||||
bind-key C-b send-prefix
|
||||
set-option -g prefix C-a
|
||||
set-option -g prefix C-s
|
||||
|
||||
# force reload now
|
||||
bind-key -n M-R send-keys -t omni-manager ENTER
|
||||
|
||||
set -g status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT0/capacity)% "
|
||||
|
||||
set -g base-index 1
|
||||
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
@ -25,12 +25,17 @@ SCWRYPTS__LIST_AVAILABLE_SCWRYPTS__remote() {
|
||||
done
|
||||
|
||||
echo "$SCWRYPTS_TYPE__remote/tmux/omni"
|
||||
echo "$SCWRYPTS_TYPE__remote/tmux/spawn"
|
||||
echo "$SCWRYPTS_TYPE__remote/remote/configure"
|
||||
}
|
||||
|
||||
SCWRYPTS__GET_RUNSTRING__remote__$SCWRYPTS_TYPE__remote() {
|
||||
[[ $SCWRYPT_NAME =~ tmux/omni ]] \
|
||||
&& echo "source $SCWRYPTS_ROOT__remote/omni" \
|
||||
&& echo "source $SCWRYPTS_ROOT__remote/omni/launcher" \
|
||||
&& return 0
|
||||
|
||||
[[ $SCWRYPT_NAME =~ tmux/spawn ]] \
|
||||
&& echo "source $SCWRYPTS_ROOT__remote/omni/spawn" \
|
||||
&& return 0
|
||||
|
||||
[[ $SCWRYPT_NAME =~ remote/configure ]] \
|
||||
|
Loading…
Reference in New Issue
Block a user