From e9ad41f94f3c0f122e164b25d01b0c9aebdb096d Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Thu, 2 Jan 2025 21:32:52 +0100 Subject: [PATCH] Remove sketch (or wacom) scripts --- .bin/fzf-sketch | 7 ---- .bin/set-wacom-draw-area | 89 ---------------------------------------- .bin/sketch | 41 ------------------ 3 files changed, 137 deletions(-) delete mode 100755 .bin/fzf-sketch delete mode 100755 .bin/set-wacom-draw-area delete mode 100755 .bin/sketch diff --git a/.bin/fzf-sketch b/.bin/fzf-sketch deleted file mode 100755 index 6d91eb0..0000000 --- a/.bin/fzf-sketch +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -# Find and open Xournal sketch - -selected=$(ls ~/sketches/*.xopp | fzf) - -xournalpp "$selected" & diff --git a/.bin/set-wacom-draw-area b/.bin/set-wacom-draw-area deleted file mode 100755 index ea6b9c5..0000000 --- a/.bin/set-wacom-draw-area +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash - -# Note: this script gets called from $HOME/.config/autorandr/docked/postswitch, -# default drawing area on 4K monitor - -# Centered draw area: -# -# x_offset = screen_width/2 - draw_width/2 -# y_offset = screen_height/2 - draw_height/2 - -# -# Drawing area -# TODO: w,h,x,y parameters w/ these defaults -# call script from autorandr with corresponding parameters. -# - -# Get screen resolution (TODO: test external monitor) -resolution=$(xrandr --current | grep "connected primary" | awk '{print $4}' | sed 's/x/ /g' | sed 's/+[0-9]//g') -screen_w=$(echo "$resolution" | awk '{print $1}') -screen_h=$(echo "$resolution" | awk '{print $2}') - -w=1920 # Width -h=1080 # Height -x="$((screen_w - 1920))" # Horizontal offset -y="$((screen_h - 1080))" # Vertical offset -orientation="landscape" # Portrait/landscape - -# Get rotation setting -rotate=`[[ "$orientation" == "landscape" ]] && echo "half" || echo "ccw"` - -# -# Wacom tablet -# - -# Right bottom -xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate "$rotate" -xsetwacom set "Wacom Intuos Pro M Finger touch" rotate "$rotate" -xsetwacom set "Wacom Intuos Pro M Pen eraser" rotate "$rotate" -xsetwacom set "Wacom Intuos Pro M Pen cursor" rotate "$rotate" -xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate "$rotate" -xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput "$w"x"$h"+"$x"+"$y" -xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput "$w"x"$h"+"$x"+"$y" -xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput "$w"x"$h"+"$x"+"$y" -xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput "$w"x"$h"+"$x"+"$y" -xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput "$w"x"$h"+"$x"+"$y" - -# Centered -# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" -# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1920x1080+"$(w/2)"+"$(h/2)" - -# # Rotate drawing are for vertical drawing -# # (physical controls above drawing area) -# xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate ccw -# xsetwacom set "Wacom Intuos Pro M Finger touch" rotate ccw -# xsetwacom set "Wacom HID 5214 Pen stylus" rotate ccw -# xsetwacom set "Wacom HID 5214 Finger touch" rotate ccw -# xsetwacom set "Wacom Intuos Pro M Pen eraser" rotate ccw -# xsetwacom set "Wacom Intuos Pro M Pen cursor" rotate ccw -# xsetwacom set "Wacom HID 5214 Pen eraser" rotate ccw -# xsetwacom set "Wacom Intuos Pro M Pen stylus" rotate ccw - -# # Set drawing area to left side on 3840x2160 monitor -# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom Intuos Pro M Finger touch" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom Intuos Pro M Pen eraser" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom Intuos Pro M Pen cursor" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1080x1920+130+130 -# xsetwacom set "Wacom Intuos Pro M Pen stylus" MapToOutput 1080x1920+130+130 - -# -# Laptop touch display -# - -xsetwacom set "Wacom HID 5214 Pen stylus" rotate none -xsetwacom set "Wacom HID 5214 Finger touch" rotate none -xsetwacom set "Wacom HID 5214 Pen eraser" rotate none -xsetwacom set "Wacom HID 5214 Pen eraser" MapToOutput 1920x1080+0+0 -xsetwacom set "Wacom HID 5214 Pen stylus" MapToOutput 1920x1080+0+0 -xsetwacom set "Wacom HID 5214 Finger touch" MapToOutput 1920x1080+0+0 - -xsetwacom --set "Wacom Intuos Pro M Finger touch" TOUCH off diff --git a/.bin/sketch b/.bin/sketch deleted file mode 100755 index 519804c..0000000 --- a/.bin/sketch +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash - -# Open xournal in wacom drawing area - -# xdotool key "Super_L+f" - -function start_xournal() { - # Prevent multiple xournalpp instances - if pgrep -x "xournalpp" > /dev/null - then - echo "Xournal is already running" - else - xournalpp & - fi -} - -function resize_xournal() { - # Resize xournalpp window to draw area - sleep 1 - xournal_id=$(xdotool search --onlyvisible --name xournal) - resize-for-wacom-horizontal - - # FIXME: Automate for different resolutions - - # Bottom centered - # xdotool windowsize "$xournal_id" 1920 1080 - # xdotool windowmove "$xournal_id" 1920 1080 - - # Centered - xdotool windowsize "$xournal_id" 1920 1080 - xdotool windowmove "$xournal_id" 960 540 - - # Vertical - # xournal_id=$(xdotool search --onlyvisible --name xournal) - # xdotool windowsize "$xournal_id" 1080 1920 - # xdotool windowmove "$xournal_id" 130 540 -} - -set-wacom-draw-area -start_xournal -resize_xournal