aboutsummarylogtreecommitdiffstats
path: root/rofi-autorandr.sh
blob: dc308a982a0eb2df33d75a60cb16df8d07f834a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -u
set -e

function get_layouts()
{
    autorandr
}

function main()
{
    local layouts="$(get_layouts)"

    local layout=$( (echo "${layouts}")  | rofi -dmenu -p "Layout:")
    local matching=$( (echo "${layouts}") | grep "^${layout}$")

    autorandr --load $matching
}

main