Commit 5cab5e82 authored by Martin Potier's avatar Martin Potier

Default window name

parent 30257934
......@@ -28,11 +28,14 @@ SESSIONNAME="Ephemere"
# Default shell
DEFAULTSHELL="/bin/zsh"
# Default window name
WINDOWNAME="Unnamed"
# Don't wrap these apps
NOWRAPL="irc"
# Don't start new window but attach these apps (if already started)
PREFERATTACH="mutt agenda playlist alsamixer rtorrent"
PREFERATTACH="mutt agenda playlist alsamixer rtorrent journalctl"
# You shouldn't need to tweak after this comment ###############################
......@@ -71,18 +74,18 @@ then
PREEXSESSIONNAME=`tmux lsw -a | grep $1 | sed 's/^\(.*\):[0-9]:.*/\1/' | head -n 1`
echo "$WINDOWNAME is in session $PREEXSESSIONNAME"
fi
# Enrich the commands with a window name
NEWWC="$NEWWC -n $1"
NEWSC="$NEWSC -n $1"
else
CMD="$DEFAULTSHELL"
fi
# Enrich the commands with a window name
NEWWC="$NEWWC -n $WINDOWNAME"
NEWSC="$NEWSC -n $WINDOWNAME"
# Is there already a window in a session with this $COMMANDNAME?
if [[ ! -z $PREEXSESSIONNAME ]]
then
CMD="tmux attach -t \\\"$PREEXSESSIONNAME:$WINDOWNAME\\\""
CMD="tmux attach -t \"$PREEXSESSIONNAME:$WINDOWNAME\""
echo "I'd rather attach $PREEXSESSIONNAME"
# Is there already a session with this $SESSIONNAME?
elif [[ -z $TMUXS ]]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment