aboutsummaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
Diffstat (limited to 'completions')
-rw-r--r--completions/bash/swayidle48
-rw-r--r--completions/fish/swayidle.fish3
-rw-r--r--completions/zsh/_swayidle22
3 files changed, 0 insertions, 73 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
diff --git a/completions/fish/swayidle.fish b/completions/fish/swayidle.fish
deleted file mode 100644
index 71279925..00000000
--- a/completions/fish/swayidle.fish
+++ /dev/null
@@ -1,3 +0,0 @@
-# swayidle
-complete -c swayidle -s h --description 'show help'
-complete -c swayidle -s d --description 'debug'
diff --git a/completions/zsh/_swayidle b/completions/zsh/_swayidle
deleted file mode 100644
index b419bc2c..00000000
--- a/completions/zsh/_swayidle
+++ /dev/null
@@ -1,22 +0,0 @@
-#compdef swayidle
-#
-# Completion script for swayidle
-#
-
-local events=('timeout:Execute timeout command if there is no activity for timeout seconds'
- 'before-sleep:Execute before-sleep command before sleep')
-local resume=('resume:Execute command when there is activity again')
-
-if (($#words <= 2)); then
- _arguments -C \
- '(-h --help)'{-h,--help}'[Show help message and quit]' \
- '(-d)'-d'[Enable debug output]'
- _describe -t "events" 'swayidle' events
-
-elif [[ "$words[-3]" == before-sleep || "$words[-3]" == resume ]]; then
- _describe -t "events" 'swayidle' events
-
-elif [[ "$words[-4]" == timeout ]]; then
- _describe -t "events" 'swayidle' events
- _describe -t "resume" 'swayidle' resume
-fi