From 93d2743e3864e9eab0699b1bb1ea5f01c10bdbc1 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Mon, 23 Sep 2019 06:32:38 +0300 Subject: initial commit --- dotfiles/.scripts/menudisplay | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 dotfiles/.scripts/menudisplay (limited to 'dotfiles/.scripts/menudisplay') diff --git a/dotfiles/.scripts/menudisplay b/dotfiles/.scripts/menudisplay new file mode 100755 index 0000000..626f97c --- /dev/null +++ b/dotfiles/.scripts/menudisplay @@ -0,0 +1,14 @@ +#!/bin/sh + +# Source settings from .bemenurc +. $HOME/.bemenurc + +display=$(swaymsg -t get_outputs | grep -E "name" | sed "s/^.*\"name\": \"//g;s/\",$//g;" | bemenu -p "Select output: " $BEMENU_OPTIONS) + +if [ -z $display ]; then + exit 0 +fi + +action=$(printf "enable\ndisable\n" | bemenu -p "Choose action: " $BEMENU_OPTIONS) + +swaymsg output $display $action -- cgit v1.2.3