diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2013-01-05 20:46:45 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2013-01-05 20:46:45 +0000 |
commit | a67802ba824ca3a7d27cbb54a5d3bcd13c14677a (patch) | |
tree | 3908399c02796fcca927c62cea4049fd6399be81 /Completion/X/Command | |
parent | edab1d3dbe61da7efe5f1ac0e40444b2ec9b9570 (diff) | |
download | zsh-a67802ba824ca3a7d27cbb54a5d3bcd13c14677a.tar.gz zsh-a67802ba824ca3a7d27cbb54a5d3bcd13c14677a.tar.xz zsh-a67802ba824ca3a7d27cbb54a5d3bcd13c14677a.zip |
30946: Robert Kovacsics: use xrandr command to generate completions
Diffstat (limited to 'Completion/X/Command')
-rw-r--r-- | Completion/X/Command/_xrandr | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr index 2e51d0d23..9058610b2 100644 --- a/Completion/X/Command/_xrandr +++ b/Completion/X/Command/_xrandr @@ -4,8 +4,8 @@ typeset -A opt_args 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' \ |