From 08845cec6393482a60493e465f0ba13727386f5b Mon Sep 17 00:00:00 2001 From: David Runge Date: Sun, 8 May 2016 20:22:16 +0200 Subject: bin/set_volume: Making script not depend on functions.sh anymore. Introducing bash strict mode. --- bin/atmux | 122 -------------------------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100755 bin/atmux (limited to 'bin/atmux') diff --git a/bin/atmux b/bin/atmux deleted file mode 100755 index 7601693..0000000 --- a/bin/atmux +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -if [ -e $HOME/bin/functions.sh ] -then - . $HOME/bin/functions.sh -else - echo "functions.sh not found" - exit 0 -fi - -# override tmux -tmux='tmux' - -## CONFIGURATION -# session name -sn=${1:-atmux} - -# try to attach earlier session -tmux attach-session -t $sn && exit 0 -#or continue - -# default path -case $sn in - # window definitions - # path:command:custom-name - "thesis") - dpath=/home/konni/dropbox/documents/uni/12ss/BA/breite-quellen/thesis - windows="-:-" - windows+="matlab:echo bla" - ;; - "mako") - dpath=/extra/src/cyanogenmod-10.1 - dcmd=". environment_mako" - windows="-:-" - windows+="-:-" - windows+=" device/lge/mako:-" - windows+=" out/target/product/mako:-" - ;; - "ville_dev") - dpath=/extra/src/cyanogenmod-10.1 - dcmd=". environment_ville" - windows="-:-" - windows+=" -:-" - windows+=" device/htc/ville:-" - windows+=" device/htc/msm8960-common:-" - windows+=" kernel/htc/msm8960:-" - windows+=" vendor/htc:-" - windows+=" out/target/product/ville:-" - ;; - "ville") - dpath=/extra/src/cyanogenmod-jellybean - dcmd=". environment_ville" - windows="-:-" - windows+=" -:-" - windows+=" device/htc/ville:-" - windows+=" device/htc/msm8960-common:-" - windows+=" kernel/htc/msm8960:-" - windows+=" vendor/htc:-" - windows+=" out/target/product/ville:-" - ;; - *) - dpath=$HOME - windows="-:-" -esac - - -# enter default path -mute pushd $dpath - -# prepare windows -num=1 -for window in $windows -do - # parse configuration - read wpath wcmd <<< $(echo $window | sed 's/:/\ /g') - - # set path - unset tpath - if [ $wpath != "-" ] - then - tpath=$wpath - fi - - - if [ $num -eq 1 ] - then - # start new session - $tmux new-session -d -s "$sn" $tname - # set default path for new windows - $tmux set-option -t "$sn" default-path $dpath - else - # create new window in session - $tmux new-window -t "$sn:$num" $tname - fi - - # execute default command - if [ -n "$dcmd" ] - then - $tmux send-keys -t "$n:$num" "$dcmd" C-m - fi - - # change path - if [ -n "$tpath" ] - then - $tmux send-keys -t "$n:$num" "cd $tpath" C-m - fi - - # execute custom command - unset tcmd - if [ "$wcmd" != "-" ] - then - tcmd=$wcmd - $tmux send-keys -t "$n:$num" "$tcmd" C-m - fi - - let num=num+1 -done - -# select window #1 and attach to session -$tmux select-window -t "$sn:1" -$tmux attach-session -t "$sn" - -- cgit v1.2.3-54-g00ecf