Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Default script for e16 session start/restart/stop management
- #
- # Assuming misc.session.enable_script is set and misc.session.script
- # points to this script it will be called with parameter
- #
- # - "init" first time an X-session (with e16) starts
- # - "start" every time e16 (re)starts
- # - "stop" when e16 exits without restarting
- #
- # On init, start, and stop the script will run any executable found in
- # ~/.e16/Init/, ~/.e16/Start/, and ~/.e16/Stop/, respectively.
- # These executables do not have to exit as they are called with '&' from here.
- #
- # NOTE:
- # In multi-display/screen setups the DISPLAY environment variable can be used
- # to differentiate.
- #
- #echo $DISPLAY
- RunApps() {
- local d;
- d="$ECONFDIR/$1"
- test -d "$d" || return
- for f in "$d"/*
- do
- if [ -x "$f" ]; then
- # echo $f
- case "$f" in
- *~) # Assume this is crap - skip
- ;;
- *.sh) # Scripts are executed in foreground
- "$f"
- ;;
- *) # Anything else is executed in background
- "$f" &
- ;;
- esac
- fi
- done
- }
- case "$1" in
- init)
- RunApps Init
- # Start DBUS session bus:
- if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
- {
- eval `dbus-launch --sh-syntax --exit-with-session`
- echo "setting: $DBUS_SESSION_BUS_ADDRESS" > ~/e16.log
- export $DBUS_SESSION_BUS_ADDRESS
- }
- else
- echo "alldone $DBUS_SESSION_BUS_ADDRESS" > ~/e16.log
- fi
- #Shutoff touch pad and touch screen
- xinput set-prop $(xinput | awk '/TouchPad/ {print $6}' | cut -d= -f2) "Device Enabled" 0 &
- xinput set-prop $(xinput | awk '/Digitizer/ {print $7}' | cut -d= -f2) "Device Enabled" 0 &
- wmix &
- wmCalClock &
- gkrellm &
- nm-applet &
- [[ -x /usr/bin/dropbox ]] && dropbox start &
- [[ -x /usr/bin/dropboxd ]] && dropboxd start &
- blueman-applet &
- qbittorrent &
- conky -c /home/userx/.config/conky/wo-conky-system-lua/WO-conky-system-lua-v3.conkyrc &
- ;;
- start)
- RunApps Start
- ;;
- stop)
- RunApps Stop
- pkill -u $USER
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment