updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / fbsplash-themes-arch-banner / svc_event
blobc9791bcf5853497d738ffc7f3ee4bad55dfc524f
1 #!/bin/bash
3 # svc_event
4 # args: <svc-name>
7 # Allow to source this for speed even when symlinked
8 hook_name=${SPLASH_HOOK:-${0##*/}}
9 event=${hook_name%-*}
11 work_dir_hooks=$spl_cachedir/hook-data-$SPLASH_THEME
13 # Lookup icon position for service
14 if [[ $event = svc_stop* ]]
15 then num_file=$work_dir_hooks/svcicon_num_${1}_stop
16 else num_file=$work_dir_hooks/svcicon_num_${1}_start
18 if [[ -f $num_file ]]; then
19 read num <"${num_file}"
20 # Avoid writing to profile
21 # Hooks are also run by splash_manager replay, so
22 # there is no need to include things done here
23 # and we don't want it to append something to the profile.
24 unset SPLASH_PROFILE
25 splash_comm_send update_svc _icon_svc_"${num}" $event