aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/rofidisplay
blob: 26f0f1a0c8ec71ce8c25b69fe098d2840328f5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

if [ "$ROFI_RETV" != 0 ]; then
	swaymsg output $1 toggle > /dev/null
fi

displays="$(swaymsg -t get_outputs | grep -E "name" |
	sed "s/^.*\"name\": \"//g;s/\",$//g;")"

echo -ne "\0prompt\x1fToggle display\n"
for d in $displays; do
	echo -ne "$d\0icon\x1fdisplay\n"
done