diff options
author | Christophe Coquelet | 2019-08-16 10:14:18 +0200 |
---|---|---|
committer | Christophe Coquelet | 2019-08-16 11:24:32 +0200 |
commit | 0856f5ac6f53140417898d42ad6c1c3177ff4282 (patch) | |
tree | c3711e82962b8a62f7fd25a8b3c0e67abe7cfa9c | |
parent | 5e7024ba94e304e2b23bf6c4bf49349e15870df7 (diff) | |
download | aur-0856f5ac6f53140417898d42ad6c1c3177ff4282.tar.gz |
Init with script
-rwxr-xr-x | rofi-autorandr.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rofi-autorandr.sh b/rofi-autorandr.sh new file mode 100755 index 000000000000..dc308a982a0e --- /dev/null +++ b/rofi-autorandr.sh @@ -0,0 +1,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 |