From 0531bc802ae436d75c73ff2d1171235b69d59f0e Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 25 May 2020 17:41:08 +0200 Subject: Add osu-mode script to lock pointer to screen --- bin/hibiki/osu-mode | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/hibiki/osu-mode (limited to 'bin/hibiki/osu-mode') diff --git a/bin/hibiki/osu-mode b/bin/hibiki/osu-mode new file mode 100755 index 0000000..92d6214 --- /dev/null +++ b/bin/hibiki/osu-mode @@ -0,0 +1,13 @@ +#!/bin/sh +set -ex + +case "$1" in + off) + swaymsg input \$pen map_to_output \* + ;; + on|*) + out="$(swq current output)" + swaymsg input \$pen map_to_output "$out" + swaymsg input \$pen map_from_region 0.0x0.0 0.5x0.5 + ;; +esac -- cgit 1.4.1