Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Changes to xrandr completion



Hi!
I would like to add the changes in the patch file for a smarter xrandr
completion.
Thank you,
Robert Kovacsics
--- a/zsh-5.0.2/Completion/X/Command/_xrandr	2011-01-08 20:24:47.000000000 +0000
+++ b/zsh-5.0.2/Completion/X/Command/_xrandr	2013-01-05 19:09:53.564221743 +0000
@@ -4,8 +4,8 @@
 local outputs modes expl
 
 # User configurable. TODO -- styles?
-outputs=(LVDS1 TV1 VGA1)
-modes=(1280x800 1024x768 800x600 640x480)
+outputs=($(xrandr|sed -ne 's/^\([^[[:space:]]\+]*\) connected .*$/\1/p'))
+modes=($(xrandr|sed -ne 's/^[[:space:]]\+\([[:digit:]]\+x[[:digit:]]\+\).*$/\1/p'|sort -nr|uniq))
 
 _arguments \
   '(-d -display)'{-d,-display}':X display:_x_display' \

Attachment: signature.asc
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author