fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

calfcalfcalfdFixed typo in xrandr completionse41ba6a2b

master
4.8 KiB71 linesraw
1function __fish_print_xrandr_outputs --description 'Print xrandr outputs'
2    xrandr | string replace -r --filter '^(\S+)\s+(.*)$' '$1\t$2' | string match -v -e Screen
3end
4
5function __fish_print_xrandr_modes --description 'Print xrandr modes'
6    set -l output
7    xrandr | string match -v -r '^(Screen|\s{4,})' | while read -l line
8        switch $line
9            case '  *'
10                string trim $line | string replace -r '^(\S+)\s+(.*)$' "\$1\t\$2 [$output]"
11            case '*'
12                set output (string match -r '^\S+' $line)
13        end
14    end
15end
16
17complete -c xrandr -l verbose -d 'Be more verbose'
18complete -c xrandr -l dryrun -d 'Make no changes'
19complete -c xrandr -l nograb -d 'Apply modifications without grabbing the screen'
20complete -c xrandr -o help -l help -d 'Print out a summary of the usage and exit'
21complete -c xrandr -s v -l version -d 'Print out the RandR version reported by the X server and exit'
22complete -c xrandr -s q -l query -d 'Display the current state of the system'
23complete -c xrandr -s d -o display -l display -d 'Select X display to use' -x
24complete -c xrandr -l screen -d 'Select which screen to manipulate' -x
25complete -c xrandr -l q1 -d 'Use RandR version 1.1 protocol'
26complete -c xrandr -l q12 -d 'Use RandR version 1.2 protocol'
27complete -c xrandr -s s -l size -d 'Set the screen size (index or width x height)' -x
28complete -c xrandr -s r -l rate -l refresh -d 'Set the refresh rate closest to the specified value' -x
29complete -c xrandr -s o -l orientation -d 'Specify the orientation of the screen' -xa 'normal inverted left right'
30complete -c xrandr -s x -d 'Reflect across the X axis'
31complete -c xrandr -s y -d 'Reflect across the Y axis'
32complete -c xrandr -l listmonitors -d 'Print all defined monitors'
33complete -c xrandr -l listactivemonitors -d 'Print all active monitors'
34complete -c xrandr -l setmonitor -d 'Define new monitor' -x
35complete -c xrandr -l delmonitor -d 'Delete monitor' -x
36complete -c xrandr -l listproviders -d 'Print all available providers'
37complete -c xrandr -l setprovideroutputsource -d 'Set source for a given provider'
38complete -c xrandr -l setprovideroffloadsink -d 'Set provider for a given sink'
39complete -c xrandr -l noprimary -d "Don't define a primary output"
40complete -c xrandr -l current -d 'Print current screen configuration'
41complete -c xrandr -l panning -d 'Set panning parameters' -x
42complete -c xrandr -l transform -d 'Set transformation matrix' -x
43complete -c xrandr -l scale -d 'Set screen scale' -x
44complete -c xrandr -l primary -d 'Set the output as primary'
45complete -c xrandr -l filter -d 'Set scaling filter method' -xa 'bilinear nearest'
46complete -c xrandr -l prop -l properties -d 'Display the contents of properties for each output'
47complete -c xrandr -l fb -d 'Set screen size' -x
48complete -c xrandr -l fbmm -d 'Set reported physical screen size' -x
49complete -c xrandr -l dpi -d 'Set dpi to calculate reported physical screen size'
50complete -c xrandr -l newmode -d 'Add new mode' -r
51complete -c xrandr -l rmmode -d 'Removes a mode from the server' -xa '(__fish_print_xrandr_modes)'
52complete -c xrandr -l addmode -d 'Add a mode to the set of valid modes for an output' -xa '(__fish_print_xrandr_outputs)'
53complete -c xrandr -l delmode -d 'Remove a mode from the set of valid modes for an output' -xa '(__fish_print_xrandr_outputs)'
54complete -c xrandr -l output -d 'Selects an output to reconfigure' -xa '(__fish_print_xrandr_outputs)'
55complete -c xrandr -l auto -d 'Enable connected but disabled outputs'
56complete -c xrandr -l mode -d 'This selects a mode' -xa '(__fish_print_xrandr_modes)'
57complete -c xrandr -l preferred -d 'Select the same mode as --auto, but it do not automatically enable or disable the output'
58complete -c xrandr -l pos -d 'Set output position within the secreen in pixels' -x
59complete -c xrandr -l rate -d 'Set refresh rate' -x
60complete -c xrandr -l reflect -d 'Set reflection' -xa 'normal x y xy'
61complete -c xrandr -l rotate -d 'Set rotation' -xa 'normal left right inverted'
62complete -c xrandr -l left-of -d 'Set position relative to the output' -xa '(__fish_print_xrandr_outputs)'
63complete -c xrandr -l right-of -d 'Set position relative to the output' -xa '(__fish_print_xrandr_outputs)'
64complete -c xrandr -l above -d 'Set position relative to the output' -xa '(__fish_print_xrandr_outputs)'
65complete -c xrandr -l below -d 'Set position relative to the output' -xa '(__fish_print_xrandr_outputs)'
66complete -c xrandr -l same-as -d 'Set position relative to the output' -xa '(__fish_print_xrandr_outputs)'
67complete -c xrandr -l set -d 'Set the property value: --set <prop> <value>' -x
68complete -c xrandr -l off -d 'Disables the output'
69complete -c xrandr -l crtc -d 'Set the crtc' -x
70complete -c xrandr -l gamma -d 'Set gamma correction [red:green:blue]' -x
71complete -c xrandr -l brightness -d 'Set brightness. Multiplies gamma values by brightness value'