From 5e2abf1ad3707af22cfa1f2ef780f68e3a25a0f5 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 28 Sep 2023 15:02:08 +0200 Subject: Wacom device mapping --- bash/dot-bash_aliases | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bash/dot-bash_aliases b/bash/dot-bash_aliases index f68ed2d..247f096 100644 --- a/bash/dot-bash_aliases +++ b/bash/dot-bash_aliases @@ -61,3 +61,29 @@ alias yt-dlp-playlist="yt-dlp -o '%(playlist_index)s-%(title)s.%(ext)s' $@" alias mail='vim +"set ft=markdown"' alias yt-album-playlist='yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --parse-metadata "playlist_index:%(track_number)s" --add-metadata --embed-metadata --output "%(playlist_autonumber)02d - %(title)s.%(ext)s" --yes-playlist' + +# Wacom mapping +function wacom_map { + for i in $2; do + xsetwacom --set "$1 $i" MapToOutput "$3" + done +} + +function wacom_map_intuos { + local name="Wacom Intuos S Pen" + local opts="stylus eraser" + wacom_map "$name" "$opts" "$1" + + local name_pad="Wacom Intuos S Pad" + local opts_pad="pad" + wacom_map "$name_pad" "$opts_pad" "$1" +} +function wacom_map_cintiq { + local name_touch="Wacom Cintiq Pro 16 Touch Finger" + local opts_touch="touch" + wacom_map "$name_touch" "$opts_touch" "$1" + + local name="Wacom Cintiq Pro 16 Pen" + local opts="stylus eraser" + wacom_map "$name" "$opts" "$1" +} -- cgit v1.2.3