Skip to content

Instantly share code, notes, and snippets.

@GabrielLasso
GabrielLasso / choose_display
Last active April 11, 2021 01:15
Script to choose the display using xrandr and dmenu
#!/bin/ruby
output=(`xrandr | grep " connected" | cut -f1 -d" "`).split(' ')
arr = []
for i in 1..(output.length)
arr = arr + output.combination(i).to_a
end
for i in 0...arr.size
arr[i]=arr[i].join("+")
end