#!/bin/bash

MODE_NAME="OSRS"
CURRENT=$(swaymsg -r -t get_binding_state 2>/dev/null | jq -r '.name // "default"')

if [ "$CURRENT" = "$MODE_NAME" ]; then
    swaymsg mode default >/dev/null
else
    swaymsg mode "$MODE_NAME" >/dev/null
fi
