dotfiles

Personal dotfiles.
Log | Files | Refs | LICENSE

stt (414B)


      1 #!/bin/sh
      2 #
      3 # See the LICENSE file for copyright and license details. 
      4 #
      5 
      6 xidfile="$HOME/.tmp/tabbed-st.xid"
      7 
      8 # tabbed -r 2 st -w '' -e tmux
      9 
     10 runtabbed() 
     11 {
     12 	tabbed -c -dn tabbed-st -r 2 st -w '' >"$xidfile" \
     13 		2>/dev/null &
     14 }
     15 
     16 if [ ! -r "$xidfile" ];
     17 then
     18 	runtabbed
     19 else
     20 	xid=$(cat "$xidfile")
     21 	xprop -id "$xid" >/dev/null 2>&1
     22 	if [ $? -gt 0 ];
     23 	then
     24 		runtabbed
     25 	else
     26 		st -w "$xid" >/dev/null 2>&1 &
     27 	fi
     28 fi
     29