aboutsummaryrefslogtreecommitdiffstats
path: root/completions/zsh/_swaybar
diff options
context:
space:
mode:
Diffstat (limited to 'completions/zsh/_swaybar')
-rw-r--r--completions/zsh/_swaybar13
1 files changed, 13 insertions, 0 deletions
diff --git a/completions/zsh/_swaybar b/completions/zsh/_swaybar
new file mode 100644
index 00000000..4fdfdd8a
--- /dev/null
+++ b/completions/zsh/_swaybar
@@ -0,0 +1,13 @@
1#compdef swaybar
2#
3# Completion script for swaybar
4#
5
6local bars=($(swaymsg -t get_bar_config | sed -e '/^\[/,/\]$/{//d;s/^ *"\(.*\)",\?.*$/\1/}'))
7
8_arguments -s \
9 '(-h --help)'{-h,--help}'[Show help message and quit]' \
10 '(-v --version)'{-v,--version}'[Show version and quit]' \
11 '(-s --socket)'{-s,--socket}'[Connect to sway via socket]:filename:_files' \
12 '(-b --bar_id)'{-b,--bar-id}'[Bar ID for which to get the configuration]:filename:($bars)'\
13 '(-d --debug)'{-d,--debug}'[Enable debugging]'