mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-18 00:51:07 +02:00
30946: Robert Kovacsics: use xrandr command to generate completions
This commit is contained in:
parent
edab1d3dbe
commit
a67802ba82
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-01-05 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 30946: Robert Kovacsics: Completion/X/Command/_xrandr: use
|
||||
command to generate completions.
|
||||
|
||||
2013-01-04 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 30941: Completion/bashcompinit: scalars giving status of bash
|
||||
|
@ -426,5 +431,5 @@
|
|||
|
||||
*****************************************************
|
||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||
* $Revision: 1.5781 $
|
||||
* $Revision: 1.5782 $
|
||||
*****************************************************
|
||||
|
|
|
@ -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' \
|
||||
|
|
Loading…
Reference in a new issue