aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Coquelet2019-08-16 10:14:18 +0200
committerChristophe Coquelet2019-08-16 11:24:32 +0200
commit0856f5ac6f53140417898d42ad6c1c3177ff4282 (patch)
treec3711e82962b8a62f7fd25a8b3c0e67abe7cfa9c
parent5e7024ba94e304e2b23bf6c4bf49349e15870df7 (diff)
downloadaur-0856f5ac6f53140417898d42ad6c1c3177ff4282.tar.gz
Init with script
-rwxr-xr-xrofi-autorandr.sh21
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