aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_print_xrandr_modes.fish
blob: bbcade84ec114da6bdc3e428c6beecec23a83ab8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function __fish_print_xrandr_modes --description 'Print xrandr modes'
	set -l out
	xrandr | sed '/^Screen/d; s/^ \+/mode: /' | while read -l output mode misc
		switch $output
		case mode:
			echo $mode\t(echo $misc | sed 's/\(^ \+\)\|\( *$\)//') [$out]
		case '*'
			set out $output
		end
	end


end