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
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
session="doormat"
|
||||
|
||||
session_exists=$(tmux list-sessions 2>/dev/null | grep $session) # get rid of "no server" error
|
||||
|
||||
if [[ -z $session_exists ]] ; then
|
||||
|
||||
|
||||
tmux new-session -d -s $session
|
||||
set_greeting
|
||||
lay_doormat(){
|
||||
# formats a tmux session stored under $session
|
||||
set_greeting # set $Greeting based on TOD
|
||||
window="Good $Greeting"
|
||||
|
||||
tmux select-window -t $session:0
|
||||
# creating a weather view on right quater
|
||||
tmux split-window -h -p 25
|
||||
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 split-window -h -p 66
|
||||
tmux select-pane -t 0
|
||||
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 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 send-keys 'cd && clear && vim' C-m
|
||||
# renaming based on TOD
|
||||
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
|
||||
|
||||
#tmux -2 attach-session -t "$session"
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
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
|
||||
|
||||
shell:
|
||||
- shell:
|
||||
- [$HOME/.dotfiles/bin/weather/symbol_test.sh, Testing weather symbols]
|
||||
- [cp ./vim/hybrid/colors/hybrid.vim ./vim/colors/hybrid.vim, Setting up theme]
|
||||
- [tmux/plugins/tpm/bin/install_plugins, Installing Tmux Plugins]
|
||||
|
@ -34,8 +34,6 @@ set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
||||
# ressurct config
|
||||
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-strategy-vim 'session'
|
||||
|
||||
|
6
zshrc
6
zshrc
@ -18,7 +18,8 @@ export GOBIN=$GOPATH/bin
|
||||
export PATH=$PATH:$GOBIN:$GOPATH:$GOROOT:$GOROOT/bin
|
||||
|
||||
# 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
|
||||
# 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
|
||||
@ -149,3 +150,6 @@ alias water="$HOME/.dotfiles/bin/water/water.sh"
|
||||
|
||||
# setting up location variables
|
||||
# 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