diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completions/_fan | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/etc/completions/_fan b/etc/completions/_fan new file mode 100644 index 0000000..ca74639 --- /dev/null +++ b/etc/completions/_fan @@ -0,0 +1,20 @@ +#compdef fan +## vim:ft=zsh +## fan completion +## Daniel Friesel <derf@derf.homelinux.org> +## https://derf.homelinux.org/~derf/dotfiles/zsh/completions/_fan + +local arguments_thinkpad arguments_generic + +arguments_thinkpad=( + ':fan level:(low med high auto)' +) +arguments_generic=( + ':fan state:(on off)' +) + +if [[ -w /proc/acpi/ibm/fan ]] { + _arguments -s $arguments_thinkpad +} elif [[ -w /proc/acpi/fan/FAN/state ]] { + _arguments -s $arguments_generic +} |