From 04d6ee1e283e491ec29590152be2d67d8ff58e04 Mon Sep 17 00:00:00 2001 From: Joe Bloggs Date: Sun, 6 Jul 2014 21:11:30 +0100 Subject: [PATCH] Completion for autorandr https://github.com/wertarbyte/autorandr --- src/_autorandr | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/_autorandr diff --git a/src/_autorandr b/src/_autorandr new file mode 100644 index 0000000..8cbc4a8 --- /dev/null +++ b/src/_autorandr @@ -0,0 +1,20 @@ +#compdef autorandr + +local -a profiles + +profiles=$(ls ~/.autorandr) + +# Example of call to _arguments function with one option and one argument +_arguments : {-h,--help}'[show help]' \ + {-c,--change}'[reload current setup]' \ + '--fingerprint[fingerprint your current hardware setup]' \ + '--force[force (re)loading of a profile]' \ + '--config[dump your current xrandr setup]' \ + {-s,--save}'[save your current setup to profile]:profile:{compadd -X "Profile" ${(f)profiles}}' \ + {-l,--load}'[load profile]:profile:{compadd -X "Profile" ${(f)profiles}}' \ + {-d,--default}'[set the default profile]:profile:{compadd -X "Profile" ${(f)profiles}}' + + +# Local Variables: +# mode:shell-script +# End: