home/bin/autoFocus.sh

9 lines
153 B
Bash
Executable file

#! /bin/bash
swaymsg -t get_outputs|grep 'eDP-1' > /dev/null
if [ $? == 0 ]; then
swaymsg focus output eDP-1
else
swaymsg focus output HDMI-A-3
fi