zsh-workers
 help / color / mirror / code / Atom feed
* Changes to xrandr completion
@ 2013-01-05 19:14 Kovacsics Robert
  2013-01-05 20:15 ` Christian Neukirchen
  2013-01-15 18:50 ` gi1242+zsh
  0 siblings, 2 replies; 4+ messages in thread
From: Kovacsics Robert @ 2013-01-05 19:14 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 120 bytes --]

Hi!
I would like to add the changes in the patch file for a smarter xrandr
completion.
Thank you,
Robert Kovacsics

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: zsh_xrandr_completion.patch --]
[-- Type: text/x-patch, Size: 573 bytes --]

--- 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-18 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-05 19:14 Changes to xrandr completion Kovacsics Robert
2013-01-05 20:15 ` Christian Neukirchen
2013-01-15 18:50 ` gi1242+zsh
2013-01-18 11:26   ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).