xrandr: Add more option completions.
This commit is contained in:
parent
5051b1787a
commit
2a7db4d988
@ -10,7 +10,7 @@ _xrandr()
|
|||||||
local output modes
|
local output modes
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--output)
|
--output|--left-of|--right-of|--above|--below|--same-as)
|
||||||
local outputs=$(xrandr|awk '/connected/ {print $1}')
|
local outputs=$(xrandr|awk '/connected/ {print $1}')
|
||||||
COMPREPLY=( $(compgen -W "$outputs" -- "$cur"))
|
COMPREPLY=( $(compgen -W "$outputs" -- "$cur"))
|
||||||
return 0
|
return 0
|
||||||
@ -27,21 +27,36 @@ _xrandr()
|
|||||||
COMPREPLY=( $( compgen -W "$modes" -- "$cur"))
|
COMPREPLY=( $( compgen -W "$modes" -- "$cur"))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
-o|--orientation)
|
||||||
|
COMPREPLY=( $( compgen -W 'normal inverted left right 0 1 2 3' -- \
|
||||||
|
"$cur" ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--reflect)
|
||||||
|
COMPREPLY=( $( compgen -W 'normal x y xy' -- \
|
||||||
|
"$cur" ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--rotate)
|
||||||
|
COMPREPLY=( $( compgen -W 'normal inverted left right' -- \
|
||||||
|
"$cur" ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case $cur in
|
case $cur in
|
||||||
*)
|
*)
|
||||||
COMPREPLY=( $(compgen -W '-display -help --orientation --query \
|
COMPREPLY=( $(compgen -W '-display -help --orientation --query \
|
||||||
--size --rate --version -x -y --screen --verbose --dryrun \
|
--size --rate --version -x -y --screen --verbose --dryrun \
|
||||||
--prop --fb --fbmm --dpi --output --auto --mode --preferred \
|
--q1 --q12 --nograb --prop --properties --fb --fbmm --dpi \
|
||||||
--pos --reflect --rotate --left-of --right-of --above --below \
|
--output --auto --mode --preferred --pos --rate --refresh \
|
||||||
--same-as --set --off --crtc --newmode --rmmode --addmode \
|
--reflect --rotate --left-of --right-of --above --below \
|
||||||
--delmode' -- "$cur") )
|
--same-as --set --scale --transform --off --crtc --panning \
|
||||||
|
--gamma --brightness --primary --noprimary --newmode --rmmode \
|
||||||
|
--addmode --delmode' -- "$cur") )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 0
|
|
||||||
} &&
|
} &&
|
||||||
complete -F _xrandr xrandr
|
complete -F _xrandr xrandr
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user