royally messed up tmux script. removing auto start until i bother to fix it
This commit is contained in:
		
							parent
							
								
									cf1efac675
								
							
						
					
					
						commit
						5062ae7d36
					
				@ -24,5 +24,5 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_qotd # sets quote and author
 | 
					get_qotd # sets quote and author
 | 
				
			||||||
printf '"%s" - %s\n' "$quote" "$author"
 | 
					printf '\n"%s"\n   - %s\n' "$quote" "$author" | fold -s
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -15,33 +15,57 @@ set_greeting() {
 | 
				
			|||||||
    fi
 | 
					    fi
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
session="doormat"
 | 
					lay_doormat(){
 | 
				
			||||||
 | 
					    # formats a tmux session stored under $session
 | 
				
			||||||
session_exists=$(tmux list-sessions  2>/dev/null | grep $session) # get rid of "no server" error
 | 
					    set_greeting # set $Greeting based on TOD
 | 
				
			||||||
 | 
					 | 
				
			||||||
if [[ -z $session_exists ]] ; then
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    tmux new-session -d -s $session
 | 
					 | 
				
			||||||
    set_greeting
 | 
					 | 
				
			||||||
    window="Good $Greeting"
 | 
					    window="Good $Greeting"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    tmux select-window -t $session:0
 | 
					    tmux select-window -t $session:0
 | 
				
			||||||
 | 
					    # creating a weather view on right quater
 | 
				
			||||||
    tmux split-window -h -p 25
 | 
					    tmux split-window -h -p 25
 | 
				
			||||||
    tmux send-keys 'cd && clear && curl --silent -fL https://wttr.in?Fn' Enter
 | 
					    tmux send-keys 'cd && clear && curl --silent -fL https://wttr.in?Fn' Enter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # creating a central vim pane taking up half the screen and a little box on the top left
 | 
				
			||||||
    tmux select-pane -t 0
 | 
					    tmux select-pane -t 0
 | 
				
			||||||
    tmux split-window -h -p 66
 | 
					    tmux split-window -h -p 66
 | 
				
			||||||
    tmux select-pane -t 0
 | 
					    tmux select-pane -t 0
 | 
				
			||||||
    tmux split-window -v -p 90
 | 
					    tmux split-window -v -p 90
 | 
				
			||||||
    tmux select-pane -t 0
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    tmux send-keys 'cd && clear && quote.sh' Enter
 | 
					    # clearing bottom left
 | 
				
			||||||
    tmux select-pane -t 1
 | 
					    tmux select-pane -t 1
 | 
				
			||||||
    tmux send-keys 'cd && clear' C-m
 | 
					    tmux send-keys 'cd && clear' C-m
 | 
				
			||||||
 | 
					    # writing quote to top left
 | 
				
			||||||
 | 
					    tmux select-pane -t 0
 | 
				
			||||||
 | 
					    tmux send-keys 'cd && clear && ~/.dotfiles/bin/startup/quote.sh' Enter
 | 
				
			||||||
 | 
					    # opening vim
 | 
				
			||||||
    tmux select-pane -t 2
 | 
					    tmux select-pane -t 2
 | 
				
			||||||
    tmux send-keys 'cd && clear && vim' C-m
 | 
					    tmux send-keys 'cd && clear && vim' C-m
 | 
				
			||||||
 | 
					    # renaming based on TOD
 | 
				
			||||||
    tmux rename-window -t $session:0 "$window"
 | 
					    tmux rename-window -t $session:0 "$window"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					session="doormat"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ ! tmuxhas-session -t $session 2>/d ]] ; then
 | 
				
			||||||
 | 
					    # no server
 | 
				
			||||||
 | 
					    tmux new-session -d -t "$session" 
 | 
				
			||||||
 | 
					    lay_doormat
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    # existing server
 | 
				
			||||||
 | 
					    cur_session=$(tmux list-sessions 2>/dev/null | awk '{print $1}' | cut -d ":" -f 1)
 | 
				
			||||||
 | 
					    if [[ "$cur_session" == "$session" ]] ; then
 | 
				
			||||||
 | 
					        # check to see if window is set up
 | 
				
			||||||
 | 
					        cur_window=$(tmux list-windows -t "$session" 2>/dev/null | grep Good)
 | 
				
			||||||
 | 
					        if [[ -z $cur_window ]] ; then
 | 
				
			||||||
 | 
					            # no window active
 | 
				
			||||||
 | 
					            lay_doormat
 | 
				
			||||||
 | 
					            #tmux -2 attach-session -t "$session"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        # doormat exists get window
 | 
				
			||||||
 | 
					        tmux new-session -d -t "$session"
 | 
				
			||||||
 | 
					        lay_doormat
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#tmux -2 attach-session -t "$session"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
@ -24,7 +24,7 @@
 | 
				
			|||||||
        path: oh-my-zsh/custom/plugins/zsh-autosuggestions
 | 
					        path: oh-my-zsh/custom/plugins/zsh-autosuggestions
 | 
				
			||||||
    ~/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme: oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme
 | 
					    ~/.oh-my-zsh/custom/themes/powerlevel10k.zsh-theme: oh-my-zsh/custom/themes/powerlevel10k/powerlevel10k.zsh-theme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 shell:
 | 
					- shell:
 | 
				
			||||||
    - [$HOME/.dotfiles/bin/weather/symbol_test.sh, Testing weather symbols]
 | 
					    - [$HOME/.dotfiles/bin/weather/symbol_test.sh, Testing weather symbols]
 | 
				
			||||||
    - [cp ./vim/hybrid/colors/hybrid.vim ./vim/colors/hybrid.vim, Setting up theme]
 | 
					    - [cp ./vim/hybrid/colors/hybrid.vim ./vim/colors/hybrid.vim, Setting up theme]
 | 
				
			||||||
    - [tmux/plugins/tpm/bin/install_plugins, Installing Tmux Plugins]
 | 
					    - [tmux/plugins/tpm/bin/install_plugins, Installing Tmux Plugins]
 | 
				
			||||||
 | 
				
			|||||||
@ -34,8 +34,6 @@ set -g @plugin 'tmux-plugins/tmux-continuum'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# ressurct config
 | 
					# ressurct config
 | 
				
			||||||
set -g @continuum-save-interval 10
 | 
					set -g @continuum-save-interval 10
 | 
				
			||||||
set -g @continuum-boot 'on'
 | 
					 | 
				
			||||||
set -g @continuum-systemd-start-cmd '~/.dotfiles/bin/startup/tmux_startup.sh'
 | 
					 | 
				
			||||||
set -g @resurrect-capture-pane-contents 'on'
 | 
					set -g @resurrect-capture-pane-contents 'on'
 | 
				
			||||||
set -g @resurrect-strategy-vim 'session'
 | 
					set -g @resurrect-strategy-vim 'session'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								zshrc
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								zshrc
									
									
									
									
									
								
							@ -18,7 +18,8 @@ export GOBIN=$GOPATH/bin
 | 
				
			|||||||
export PATH=$PATH:$GOBIN:$GOPATH:$GOROOT:$GOROOT/bin
 | 
					export PATH=$PATH:$GOBIN:$GOPATH:$GOROOT:$GOROOT/bin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# adding scripts to path
 | 
					# adding scripts to path
 | 
				
			||||||
export PATH=$PATH:$HOME/.dotfiles/bin/startup:$HOME/.dotfiles/bin
 | 
					export PATH=$PATH:$HOME/.dotfiles/bin/startup:$HOME/.dotfiles/bin:$HOME/.dotfiles/bin/weather
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set name of the theme to load --- if set to "random", it will
 | 
					# Set name of the theme to load --- if set to "random", it will
 | 
				
			||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
 | 
					# load a random theme each time oh-my-zsh is loaded, in which case,
 | 
				
			||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
 | 
					# to know which specific one was loaded, run: echo $RANDOM_THEME
 | 
				
			||||||
@ -149,3 +150,6 @@ alias water="$HOME/.dotfiles/bin/water/water.sh"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# setting up location variables
 | 
					# setting up location variables
 | 
				
			||||||
# source "$HOME/.dotfiles/bin/weather/location.sh"
 | 
					# source "$HOME/.dotfiles/bin/weather/location.sh"
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# tmux doormat script
 | 
				
			||||||
 | 
					# source "$HOME/.dotfiles/bin/startup/tmux_startup.sh"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user