=== renamed file 'tmux-autoattach' => 'autoattach.sh' --- tmux-autoattach 2012-08-08 05:11:51 +0000 +++ autoattach.sh 2011-11-03 15:42:11 +0000 @@ -1,29 +1,7 @@ -#!/bin/zsh +#!/bin/bash unset TMUX pidof urxvtd &>/dev/null || urxvtd -q -f -o - -if [[ -n "$XDG_DATA_HOME" ]]; then - tmux_sesssion_dir=$XDG_DATA_HOME/tmux_session -else - tmux_sesssion_dir=$HOME/.local/share/tmux_session -fi - -typeset -A sessions - -if [[ -f $tmux_sesssion_dir/$DISPLAY ]]; then - while IFS=: read session workspace; do - sessions[${session}]=$workspace - done <$tmux_sesssion_dir/$DISPLAY -fi - -tmux list-sessions -F "#{session_attached} #{session_name}" | \ -while read attached session; do - if ! (($attached)); then - if ((${+sessions[${session}]})); then - wmctrl -s ${sessions[${session}]} - urxvtc -name "tmux_$S" -e tmux-workspace-attach ${sessions[${session}]} $session - else - urxvtc -name "tmux_$S" -e tmux attach -t $S - fi - fi +for S in `tmux list-sessions | egrep -v 'attached|background' | awk -F ': ' '{print $1}'` +do + urxvtc -name "tmux_$S" -e tmux attach -t $S done === removed file 'tmux-session-restore' --- tmux-session-restore 2012-08-08 05:11:51 +0000 +++ tmux-session-restore 1970-01-01 00:00:00 +0000 @@ -1,32 +0,0 @@ -#!/bin/zsh -if [[ -z "$DISPLAY" ]]; then - echo "no DISPLAY set" >/dev/stderr - exit 1 -fi - -if [[ -n "$XDG_DATA_HOME" ]]; then - tmux_sesssion_dir=$XDG_DATA_HOME/tmux_session -else - tmux_sesssion_dir=$HOME/.local/share/tmux_session -fi - -typeset -A sessions - -wmctrl -l | while read winid workspace host title; do - case $title in - (*tmux::*:*) - session=${${title##*tmux::}%%:*} - sessions[${session}]=$winid - ;; - esac -done - -while IFS=: read session workspace; do - if ((${+sessions[${session}]})); then -# wmctrl -s $workspace -# wmctrl -R ${sessions[${session}]} - wmctrl -r ${sessions[${session}]} -t $workspace - fi -done <$tmux_sesssion_dir/$DISPLAY - - === removed file 'tmux-session-save' --- tmux-session-save 2012-08-08 05:11:51 +0000 +++ tmux-session-save 1970-01-01 00:00:00 +0000 @@ -1,32 +0,0 @@ -#!/bin/zsh -if [[ -z "$DISPLAY" ]]; then - echo "no DISPLAY set" >/dev/stderr - exit 1 -fi - -if [[ -n "$XDG_DATA_HOME" ]]; then - tmux_sesssion_dir=$XDG_DATA_HOME/tmux_session -else - tmux_sesssion_dir=$HOME/.local/share/tmux_session -fi - -typeset -A sessions - -if [[ -f $tmux_sesssion_dir/$DISPLAY ]]; then - while IFS=: read session workspace; do - sessions[${session}]=$workspace - done <$tmux_sesssion_dir/$DISPLAY -fi - -wmctrl -l | while read winid workspace host title; do - case $title in - (*tmux::*:*) - session=${${title##*tmux::}%%:*} - sessions[${session}]=$workspace - ;; - esac -done - -for session in ${(ko)sessions}; do - print -r -- "${session}:${sessions[${session}]}" -done >$tmux_sesssion_dir/$DISPLAY === removed file 'tmux-workspace-attach' --- tmux-workspace-attach 2012-08-08 05:11:51 +0000 +++ tmux-workspace-attach 1970-01-01 00:00:00 +0000 @@ -1,3 +0,0 @@ -#!/bin/zsh -wmctrl -r $WINDOWID -t $1 -exec tmux attach -t $2