updated cmux to use a default session name! Less arguments = happy life
This commit is contained in:
parent
648c3312da
commit
6b7c9b68d7
3
env/env
vendored
3
env/env
vendored
@ -1,4 +1,3 @@
|
||||
|
||||
DOTWRYN="$HOME/.wryn"
|
||||
SCHOOL_PATH="$HOME/School"
|
||||
RD_PATH="$HOME/RentDynamics"
|
||||
@ -14,3 +13,5 @@ MEDIA_ENGINE='canberra-gtk-play -f'
|
||||
|
||||
# default applications
|
||||
WEBBROWSER='google-chrome-stable'
|
||||
|
||||
TMUX_DEFAULT_SESSION_NAME='main'
|
||||
|
@ -30,8 +30,8 @@ PS1="$PREVIOUS_COMMAND_CONDITION $USER $SEPARATOR $DIRECTORY $GIT_BRANCH $PROMPT
|
||||
|
||||
######################################################################################
|
||||
|
||||
alias change_kitty_theme='KITTY_CHANGE_THEME default'
|
||||
alias change_alternate_kitty_theme='KITTY_CHANGE_THEME alternate'
|
||||
alias kitty_change_theme='KITTY_CHANGE_THEME default'
|
||||
alias kitty_change_theme_alternate='KITTY_CHANGE_THEME alternate'
|
||||
function KITTY_CHANGE_THEME () {
|
||||
[ ! $2 ] && echo no filename given :c && return 1;
|
||||
[ ! -f "$DOTWRYN/config/colorschemes/kitty/$2" ] \
|
||||
|
12
zsh/ssh
12
zsh/ssh
@ -82,13 +82,13 @@ WRYN_SCP_PARSE_ARGS() {
|
||||
|
||||
WRYN_REMOTE_TMUX() {
|
||||
local SSH_ID="$1"
|
||||
local TMUX_UTF8_FLAG=$(locale charmap | grep -q 'UTF-8' && echo '-u')
|
||||
local DEFAULT_TMUX_SESSION_NAME='main'
|
||||
local UTF8_FLAG=$(locale charmap | grep -q 'UTF-8' && echo '-u')
|
||||
|
||||
[ ! $2 ] \
|
||||
&& ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux new-session -A -s $DEFAULT_TMUX_SESSION_NAME;
|
||||
|
||||
&& ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux $UTF8_FLAG new-session -As $TMUX_DEFAULT_SESSION_NAME \
|
||||
|| {
|
||||
[ $3 ] \
|
||||
&& ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux $TMUX_UTF8_FLAG ${@:2} \
|
||||
|| ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux $TMUX_UTF8_FLAG a -t $2;
|
||||
&& ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux $UTF8_FLAG ${@:2} \
|
||||
|| ssh $(WRYN_SSH_PARSE_ARGS $SSH_ID) -t tmux $UTF8_FLAG a -t $2;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user