mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Prevent screen switching on emulationstation
This commit is contained in:
@@ -2,12 +2,20 @@
|
||||
|
||||
source /etc/profile
|
||||
|
||||
# Get the active app_id
|
||||
ACTIVE_APPID=$(swaymsg -t get_tree | awk '
|
||||
/"focused": true/ {focused=1}
|
||||
focused && /app_id/ {gsub(/.*"app_id": *"/,""); gsub(/".*/,""); print; exit}
|
||||
focused && /"app_id":/ {
|
||||
gsub(/.*"app_id": *"/,""); gsub(/".*/,""); print; exit
|
||||
}
|
||||
')
|
||||
|
||||
UDSI=$(swaymsg -t get_tree | jq -r '.. | objects | select(.type == "output" and .name != "__i3") | select(.nodes[].nodes | length == 0) | .name')
|
||||
UDSI=$(swaymsg -t get_tree | jq -r '
|
||||
.. | objects
|
||||
| select(.type == "output" and .name != "__i3")
|
||||
| select(.nodes[].nodes | length == 0)
|
||||
| .name
|
||||
')
|
||||
|
||||
swaymsg [app_id=\"${ACTIVE_APPID}\"] move window to output ${UDSI}
|
||||
if [[ -n "$ACTIVE_APPID" && "$ACTIVE_APPID" != "emulationstation" && -n "$UDSI" ]]; then
|
||||
swaymsg "[app_id=\"${ACTIVE_APPID}\"]" move window to output "${UDSI}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user