summaryrefslogtreecommitdiffstats
path: root/completions/zsh/_swayidle
diff options
context:
space:
mode:
authorLibravatar Réouven Assouly <reouvenassouly@yahoo.fr>2019-01-01 16:16:11 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-02 21:38:32 -0500
commitcf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b (patch)
tree396cf56d64b974593ec69110a9418e4b9ff02405 /completions/zsh/_swayidle
parentImplement tiling_drag_threshold (diff)
downloadsway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.gz
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.zst
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.zip
zsh: update completions
Diffstat (limited to 'completions/zsh/_swayidle')
-rw-r--r--completions/zsh/_swayidle22
1 files changed, 22 insertions, 0 deletions
diff --git a/completions/zsh/_swayidle b/completions/zsh/_swayidle
new file mode 100644
index 00000000..b419bc2c
--- /dev/null
+++ b/completions/zsh/_swayidle
@@ -0,0 +1,22 @@
1#compdef swayidle
2#
3# Completion script for swayidle
4#
5
6local events=('timeout:Execute timeout command if there is no activity for timeout seconds'
7 'before-sleep:Execute before-sleep command before sleep')
8local resume=('resume:Execute command when there is activity again')
9
10if (($#words <= 2)); then
11 _arguments -C \
12 '(-h --help)'{-h,--help}'[Show help message and quit]' \
13 '(-d)'-d'[Enable debug output]'
14 _describe -t "events" 'swayidle' events
15
16elif [[ "$words[-3]" == before-sleep || "$words[-3]" == resume ]]; then
17 _describe -t "events" 'swayidle' events
18
19elif [[ "$words[-4]" == timeout ]]; then
20 _describe -t "events" 'swayidle' events
21 _describe -t "resume" 'swayidle' resume
22fi