Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Changes to xrandr completion
- X-seq: zsh-workers 30946
- From: Kovacsics Robert <kovirobi@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Changes to xrandr completion
- Date: Sat, 5 Jan 2013 19:14:45 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:x-mailer:mime-version :content-type; bh=c6fNE1EW9BbdGT9C/O0X3bm7DMpZZeHrJzzg0rwqfLo=; b=dwF/N9hudIJ3bfOO4R9AfTiGpKpdclC1ZWKxBlGyCoxyLfikiGADsH/V1BnRGQspAx p4rOqB3LNvCvowG8F7UOk+ai3wojxr08r3foGSs7bkKkktwSfiPjT7MzUYgNv8Uehtxw Mr4fdTxx8BjkvIgtifMpLaTPNlqpMzmyVkvD05Ovv3Bl+Xk5/zA6YQeKX25NAxL/MWji EI2xcT9GVDN0dTefWNFB2UAG4gZ82I0JDPpCJRa804FTklIKKklsaTHaItv5iSXMTPVp SQNeBRD8p3CJrWI5kFnbMyB1muwHYN0wrHdMz4IXlryz9PUH/vb9+5/4W86eVRXuXse6 Z5KQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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