aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/rofidisplay
blob: 77efa5bd210ea5ce69b8bead0a0867328b254042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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 "\0no-custom\x1ftrue\n"
echo -ne "\0prompt\x1fToggle display\n"
for d in $displays; do
	echo -ne "$d\0icon\x1fdisplay\n"
done