aboutsummaryrefslogtreecommitdiff
path: root/completions/bash
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-12 09:40:09 -0500
committerBrian Ashworth <bosrsf04@gmail.com>2019-01-12 11:24:06 -0500
commitbc808680b173d5a3c4732265b33e2e8bd81e4d9b (patch)
tree800d9f0ba88f37c2dd35aae09fcdbec91c0532c3 /completions/bash
parentd256182f492c3d8a6803fa2a5880b1283fbe1e4c (diff)
Split swayidle from sway
Diffstat (limited to 'completions/bash')
-rw-r--r--completions/bash/swayidle48
1 files changed, 0 insertions, 48 deletions
diff --git a/completions/bash/swayidle b/completions/bash/swayidle
deleted file mode 100644
index a0cdc8b2..00000000
--- a/completions/bash/swayidle
+++ /dev/null
@@ -1,48 +0,0 @@
-# swaymsg(1) completion
-
-_swayidle()
-{
- local cur prev
- _get_comp_words_by_ref -n : cur prev
- local prev2=${COMP_WORDS[COMP_CWORD-2]}
- local prev3=${COMP_WORDS[COMP_CWORD-3]}
-
- events=(
- 'timeout'
- 'before-sleep'
- )
-
- short=(
- -h
- -d
- )
-
- if [ "$prev" = timeout ]; then
- # timeout <timeout>
- return
- elif [ "$prev2" = timeout ]; then
- # timeout <timeout> <timeout command>
- COMPREPLY=($(compgen -c -- "$cur"))
- return
- elif [ "$prev3" = timeout ]; then
- # timeout <timeout> <timeout command> [resume <resume command>]
- COMPREPLY=(resume)
- # optional argument; no return here as user may skip 'resume'
- fi
-
- case "$prev" in
- resume)
- COMPREPLY=($(compgen -c -- "$cur"))
- return
- ;;
- before-sleep)
- COMPREPLY=($(compgen -c -- "$cur"))
- return
- ;;
- esac
-
- COMPREPLY+=($(compgen -W "${events[*]}" -- "$cur"))
- COMPREPLY+=($(compgen -W "${short[*]}" -- "$cur"))
-
-} &&
-complete -F _swayidle swayidle