Source

uniq-xmonad-settings / startupHook.sh

#! /bin/sh

#
# ----------------------------------------------------------------------------
# "THE MATE-WARE LICENSE":
# <uniq@h4x.at> created this file. As long as you retain this
# notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy me a club mate in return.
# - uniq <https://metalab.at/wiki/user:uniq>
# ----------------------------------------------------------------------------
#


start_if_not_running (){

  MYAPP="$1"

  if [ `pidof "$MYAPP"` ]; then
    echo "$MYAPP already running, will do nothing"
  else
    set +e
    echo "$MYAPP not running, will run it now"
    ($* > /dev/null 2>&1 || true ) & # execute and continue if an application crashes
    set -e
  fi


}


# tray
start_if_not_running trayer --edge top --align right --height 18 --widthtype request --SetDockType true --margin 180 --alpha 0 --transparent ture --tint 0
start_if_not_running /usr/bin/xmobar

# gnome stuff
start_if_not_running /usr/bin/gnome-keyring-daemon --start --components=secrets,ssh,pkcs11,gpg
start_if_not_running /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
start_if_not_running /usr/lib/gnome-settings-daemon/gnome-settings-daemon
start_if_not_running /usr/lib/gnome-disk-utility/gdu-notification-daemon
start_if_not_running /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-immediately
start_if_not_running gsettings-data-convert
start_if_not_running /usr/lib/gnome-settings-daemon/gnome-fallback-mount-helper
start_if_not_running /usr/lib/evolution/3.4/evolution-alarm-notify

start_if_not_running start-pulseaudio-x11

start_if_not_running vidalia
start_if_not_running /usr/lib/notification-daemon/notification-daemon
start_if_not_running bluetooth-applet
start_if_not_running nm-applet
start_if_not_running volti # audio mixer applet

start_if_not_running nautilus -n --no-desktop

#start_if_not_running gnome-screensaver
start_if_not_running xscreensaver -no-splash



# pidgin

pidgin &

# keepassx

start_if_not_running keepassx




# turn bell off

(sleep 3 && xset b off) &