summaryrefslogtreecommitdiff
path: root/Completion/X/Command/_xrandr
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X/Command/_xrandr')
-rw-r--r--Completion/X/Command/_xrandr11
1 files changed, 8 insertions, 3 deletions
diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr
index 67045b33d..2551e1958 100644
--- a/Completion/X/Command/_xrandr
+++ b/Completion/X/Command/_xrandr
@@ -1,6 +1,6 @@
#compdef xrandr
-local curcontext="$curcontext" state line expl
+local curcontext="$curcontext" state line expl state_descr
typeset -A opt_args
_arguments -C \
@@ -36,6 +36,7 @@ _arguments -C \
'*--set:property:(Backlight scaling\ mode):value:->value' \
'*--scale:output scaling:' \
'*--transform:transformation matrix:' \
+ '*--filter:mode:(nearest bilinear)' \
'*--off[disable the output]' \
'*--crtc:crtc to use:' \
'*--panning:panning:' \
@@ -47,8 +48,8 @@ _arguments -C \
"*--addmode:output:->outputs:name" \
"*--delmode:output:->outputs:name" \
'--listproviders' \
- '--setprovideroutputsource:provider: :source' \
- '--setprovideroffloadsink:provider: :sink' \
+ '--setprovideroutputsource:provider:->providers:source:->providers' \
+ '--setprovideroffloadsink:provider:->providers:sink:->providers' \
'--listmonitors' \
'--listactivemonitors' \
'--setmonitor:name' \
@@ -75,4 +76,8 @@ case $state in
_wanted modes expl mode compadd \
${(Mun)$(_call_program modes xrandr):#[0-9]##x[0-9]##} && return 0
;;
+ providers)
+ local -a xrandr_providers=(${(f)"$(_call_program providers xrandr --listproviders)"})
+ _wanted xrandr-providers expl $state_descr compadd ${${xrandr_providers}[2,-1]##*:} && return 0
+ ;;
esac