]> git.lizzy.rs Git - bspwm.git/blobdiff - contrib/lightdm/bspwm-session
Apply tab conversion to contrib/
[bspwm.git] / contrib / lightdm / bspwm-session
index f3a31e88f2722bc6515347af38e81df1bcde0e76..d6b678e5c573870e4278565f38a1b5c420b119a3 100755 (executable)
@@ -6,9 +6,9 @@
 # It is based on similar scripts included with Openbox.
 
 if [ -n "$1" ]; then
-    echo "Usage: bspwm-session"
-    echo
-    exit 1
+       echo "Usage: bspwm-session"
+       echo
+       exit 1
 fi
 
 # Multi-user support:
@@ -16,21 +16,21 @@ state_prefix=${XDG_CACHE_HOME:-"$HOME/.cache"}
 mkdir -p "${state_prefix}"
 
 if [ ! -d "${state_prefix}" ]; then
-    echo "bspwm-session: cache directory ‘${state_prefix}‘ is missing."
-    echo
-    exit 1
+       echo "bspwm-session: cache directory ‘${state_prefix}‘ is missing."
+       echo
+       exit 1
 elif [ ! -w "${state_prefix}" ]; then
-    echo "bspwm-session: cache directory ‘${state_prefix}‘ is not writable."
-    echo
-    exit 1
+       echo "bspwm-session: cache directory ‘${state_prefix}‘ is not writable."
+       echo
+       exit 1
 fi
 
 state_path=$(mktemp -d "${state_prefix}/bspwm-session.XXXXXX")
 
 if [ $? -ne 0 ]; then
-    echo "bspwm-session: failed to create state directory ‘${state_path}‘."
-    echo
-    exit 1
+       echo "bspwm-session: failed to create state directory ‘${state_path}‘."
+       echo
+       exit 1
 fi
 
 export BSPWM_SOCKET=${state_path}/bspwm-socket
@@ -38,24 +38,24 @@ export BSPWM_SOCKET=${state_path}/bspwm-socket
 # Trap: make sure everything started in ~/.config/bspwm/autostart is
 # signalled when this script exits or dies. Also clean up $state_path.
 function on_exit {
-    for child in $(jobs -p); do
-        jobs -p | grep -q $child && kill $child
-    done
-    # Extra paranoia
-    [[ -d "${state_path}" && -w "${state_path}" ]] && rm -rf -- "${state_path}"
+       for child in $(jobs -p); do
+               jobs -p | grep -q $child && kill $child
+       done
+       # Extra paranoia
+       [[ -d "${state_path}" && -w "${state_path}" ]] && rm -rf -- "${state_path}"
 }
 
 trap on_exit EXIT SIGHUP SIGINT SIGTERM
 
 # Environment and autostart:
 source_these=(
-    "/etc/profile",
-    "${HOME}/.profile",
-    "${XDG_CONFIG_HOME:-"$HOME/.config"}/bspwm/autostart"
+       "/etc/profile",
+       "${HOME}/.profile",
+       "${XDG_CONFIG_HOME:-"$HOME/.config"}/bspwm/autostart"
 )
 
 for file in "${source_these[@]}"; do
-    [ -r "${file}" ] && . "${file}"
+       [ -r "${file}" ] && . "${file}"
 done
 
 # Launch sxhkd: