aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <david.runge@frqrec.com>2014-04-08 18:18:45 +0200
committerDavid Runge <david.runge@frqrec.com>2014-04-08 18:18:45 +0200
commitec2ff4b798294fc1e2e2fec6c41d3399d9be3d22 (patch)
treeec408642f85db34603e041ed15b1f92590805e23
parent4c6b3f139661bccd67d8ad4c3edda2c71cecc6b3 (diff)
downloaddotfiles-ec2ff4b798294fc1e2e2fec6c41d3399d9be3d22.tar.gz
dotfiles-ec2ff4b798294fc1e2e2fec6c41d3399d9be3d22.tar.bz2
dotfiles-ec2ff4b798294fc1e2e2fec6c41d3399d9be3d22.tar.xz
dotfiles-ec2ff4b798294fc1e2e2fec6c41d3399d9be3d22.zip
Added better per environment starting of programs.
-rwxr-xr-xbin/autostart12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/autostart b/bin/autostart
index f1f4f6e..8a9db47 100755
--- a/bin/autostart
+++ b/bin/autostart
@@ -6,11 +6,19 @@ export XAUTHORITY=/home/dave/.Xauthority
KERNEL_NAME=$(uname -r)
if [[ "$KERNEL_NAME" != *rt* ]]; then
- dropbox start &
- owncloud &
+ pid=$(pidof dropbox)
+ re='^[0-9]+$'
+ if [[ $pid =~ $re ]];then
+ echo "Dropbox alread running. Restarting..."
+ dropbox stop && dropbox start &
+ else
+ dropbox start &
+ fi
+ pulseaudio --start &
nm-applet &
firewall-applet &
urxvt &
+ owncloud &
else
pulseaudio --kill &
qjackctl &