From 80e6474a7c300be9c55f34c0c18994ee1b93b271 Mon Sep 17 00:00:00 2001 From: Guilherme Rugai Freire Date: Sun, 20 Mar 2022 19:13:26 -0300 Subject: [PATCH] create autoxsetwacom script --- autoxsetwacom/README.md | 7 +++++++ autoxsetwacom/autoxsetwacom.sh | 9 +++++++++ bin/autoxsetwacom | 1 + 3 files changed, 17 insertions(+) create mode 100644 autoxsetwacom/README.md create mode 100755 autoxsetwacom/autoxsetwacom.sh create mode 120000 bin/autoxsetwacom diff --git a/autoxsetwacom/README.md b/autoxsetwacom/README.md new file mode 100644 index 0000000..40888d8 --- /dev/null +++ b/autoxsetwacom/README.md @@ -0,0 +1,7 @@ +# autoxsetwacom + +## About +List wacom STYLUS device and set its area to the first monitor, while respection the 16/9 aspect ratio + +## Requirements +- xf86-input-wacom diff --git a/autoxsetwacom/autoxsetwacom.sh b/autoxsetwacom/autoxsetwacom.sh new file mode 100755 index 0000000..07c480e --- /dev/null +++ b/autoxsetwacom/autoxsetwacom.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# List wacom STYLUS device and set its area to the first monitor, while respection the 16/9 aspect ratio + +device_id="$(xsetwacom list devices | grep STYLUS | cut -f2 | cut -d' ' -f2)" + +xsetwacom set "$device_id" MapToOutput 1920x1080+0+0 +xsetwacom set "$device_id" Area 0 0 15200 8550 + diff --git a/bin/autoxsetwacom b/bin/autoxsetwacom new file mode 120000 index 0000000..86464a8 --- /dev/null +++ b/bin/autoxsetwacom @@ -0,0 +1 @@ +../autoxsetwacom/autoxsetwacom.sh \ No newline at end of file