]> git.lizzy.rs Git - bspwm.git/commitdiff
Apply tab conversion to contrib/
authorBastien Dejean <nihilhill@gmail.com>
Tue, 21 Jan 2014 19:51:02 +0000 (20:51 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Tue, 21 Jan 2014 19:51:02 +0000 (20:51 +0100)
contrib/bash_completion
contrib/lightdm/bspwm-session
contrib/zsh_completion

index bd170ca395fc39eba8578b444ced174d9a12f251..a9e36797c80656b7075e85d1ec721ab21d7d7bc4 100644 (file)
@@ -1,27 +1,27 @@
 _bspc() {
-    local commands='window desktop monitor query pointer rule restore control config quit'
+       local commands='window desktop monitor query pointer rule restore control config quit'
 
-    local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus ignore_ewmh_focus remove_disabled_monitor'
+       local settings='external_rules_command status_prefix focused_border_color active_border_color normal_border_color presel_border_color focused_locked_border_color active_locked_border_color normal_locked_border_color focused_sticky_border_color normal_sticky_border_color focused_private_border_color active_private_border_color normal_private_border_color urgent_border_color border_width window_gap top_padding right_padding bottom_padding left_padding split_ratio borderless_monocle gapless_monocle focus_follows_pointer pointer_follows_monitor apply_floating_atom auto_alternate auto_cancel history_aware_focus ignore_ewmh_focus remove_disabled_monitor'
 
-    COMPREPLY=()
+       COMPREPLY=()
 
-    if [[ $COMP_CWORD -ge 1 ]] ; then
-        local current_word="${COMP_WORDS[COMP_CWORD]}"
-        if [[ $COMP_CWORD -eq 1 ]] ; then
-            COMPREPLY=( $(compgen -W "$commands" -- "$current_word") )
-            return 0
-        else
-            local second_word=${COMP_WORDS[1]}
-            case $second_word in
-                config)
-                    if [[ $COMP_CWORD -eq 2 ]] ; then
-                        COMPREPLY=( $(compgen -W "$settings" -- "$current_word") )
-                        return 0
-                    fi
-                    ;;
-            esac
-        fi
-    fi
+       if [[ $COMP_CWORD -ge 1 ]] ; then
+               local current_word="${COMP_WORDS[COMP_CWORD]}"
+               if [[ $COMP_CWORD -eq 1 ]] ; then
+                       COMPREPLY=( $(compgen -W "$commands" -- "$current_word") )
+                       return 0
+               else
+                       local second_word=${COMP_WORDS[1]}
+                       case $second_word in
+                               config)
+                                       if [[ $COMP_CWORD -eq 2 ]] ; then
+                                               COMPREPLY=( $(compgen -W "$settings" -- "$current_word") )
+                                               return 0
+                                       fi
+                                       ;;
+                       esac
+               fi
+       fi
 }
 
 complete -F _bspc bspc
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:
index 9c98b91924d0c2fc3b2c56d7b1f5c94bcc4f3703..203b88401451424a9183c04b71087500a11d1dbf 100644 (file)
@@ -1,23 +1,23 @@
 #compdef bspc
 
 _bspc() {
-    local -a commands settings
-    commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
-    settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'ignore_ewmh_focus' 'remove_disabled_monitor')
-    if (( CURRENT == 2 )) ; then
-        _values 'command' "$commands[@]"
-    elif (( CURRENT == 3 )) ; then
-        case $words[2] in
-            config)
-                _values 'setting' "$settings[@]"
-                ;;
-            *)
-                return 1
-                ;;
-        esac
-    else
-        return 1
-    fi
+       local -a commands settings
+       commands=('window' 'desktop' 'monitor' 'query' 'pointer' 'rule' 'restore' 'control' 'config' 'quit')
+       settings=('external_rules_command' 'status_prefix' 'focused_border_color' 'active_border_color' 'normal_border_color' 'presel_border_color' 'focused_locked_border_color' 'active_locked_border_color' 'normal_locked_border_color' 'focused_sticky_border_color' 'normal_sticky_border_color' 'focused_private_border_color' 'active_private_border_color' 'normal_private_border_color' 'urgent_border_color' 'border_width' 'window_gap' 'top_padding' 'right_padding' 'bottom_padding' 'left_padding' 'split_ratio' 'borderless_monocle' 'gapless_monocle' 'focus_follows_pointer' 'pointer_follows_monitor' 'apply_floating_atom' 'auto_alternate' 'auto_cancel' 'history_aware_focus' 'ignore_ewmh_focus' 'remove_disabled_monitor')
+       if (( CURRENT == 2 )) ; then
+               _values 'command' "$commands[@]"
+       elif (( CURRENT == 3 )) ; then
+               case $words[2] in
+                       config)
+                               _values 'setting' "$settings[@]"
+                               ;;
+                       *)
+                               return 1
+                               ;;
+               esac
+       else
+               return 1
+       fi
 }
 
 _bspc "$@"