| 1 | #! /bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | |
| 6 | launch_common() { |
| 7 | xbindkeys |
| 8 | xscreensaver & |
| 9 | mpd --kill || true |
| 10 | mpd |
| 11 | for script in ~/.xlaunch.d/*; do |
| 12 | "$script" |
| 13 | done |
| 14 | } |
| 15 | |
| 16 | launch_specialized() { |
| 17 | # XXX dunst lazily started by dbus |
| 18 | local -r scripts_dir=~/.xlaunch.d."$(hostname)" |
| 19 | |
| 20 | if test -d "$scripts_dir" |
| 21 | then |
| 22 | for script in "$scripts_dir"/*; do |
| 23 | "$script" |
| 24 | done |
| 25 | else |
| 26 | printf '[error] scripts_dir not found: %s\n' "$scripts_dir" >&2 |
| 27 | fi |
| 28 | } |
| 29 | |
| 30 | launch_common |
| 31 | launch_specialized |
| 32 | |
| 33 | exec dwm |