mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-15 09:27:38 +00:00
11 lines
329 B
Fish
11 lines
329 B
Fish
function __fish_print_xrandr_modes --description 'Print xrandr modes'
|
|
set -l output
|
|
xrandr | string match -v -r '^(Screen|\s{4,})' | while read line
|
|
switch $line
|
|
case ' *'
|
|
string trim $line | string replace -r '^(\S+)\s+(.*)$' "\$1\t\$2 [$output]"
|
|
case '*'
|
|
set output (string match -r '^\S+' $line)
|
|
end
|
|
end
|
|
end
|