From 7f7fcfc8870e62798351cac5f826e4742271d863 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 10 Aug 2012 16:25:22 +0900 Subject: [PATCH] add func tmux_main still wip --- bashrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bashrc b/bashrc index c1fb14b..9bdd95e 100755 --- a/bashrc +++ b/bashrc @@ -122,6 +122,7 @@ alias sh="ENV=$HOME/.shrc PS1=\$\ PROMPT_COMMAND="" sh" alias mpg123="mpg123 -C -v --title" export PLAYER="mpg123 -C -v --title" alias screen="screen -e^z^z" +alias zcd="cd \`zenity --file-selection --directory\`" alias pad=notepad null type gedit && alias pad=gedit @@ -182,6 +183,19 @@ then || complete -o default -o nospace -F _git g fi +tmux_main(){ + if tmux has -t main + then + if tmux lsc -t main + tmux new + else + tmux attach -t main + fi + else + tmux new -s main + fi + } + __my_moc_state(){ type mocp >/dev/null 2>&1 || return test "`mocp -Q %state 2>/dev/null`" == PLAY || return