summaryrefslogtreecommitdiffstats
path: root/.local/bin/toggle-tablet
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2020-04-11 22:45:06 -0400
committerAmin Bandali <bandali@gnu.org>2020-04-11 22:45:06 -0400
commit5d3bd4099ecff7b02454efcb6f6bb355a992aef8 (patch)
tree542fdedd6259e91cec7ada5fc3783b9476c29c33 /.local/bin/toggle-tablet
parente5e4450f889a82197d845cc06a63fcb3e740583d (diff)
downloadconfigs-5d3bd4099ecff7b02454efcb6f6bb355a992aef8.tar.gz
configs-5d3bd4099ecff7b02454efcb6f6bb355a992aef8.tar.xz
configs-5d3bd4099ecff7b02454efcb6f6bb355a992aef8.zip
move scripts from ~/.local/bin to rc.org
Diffstat (limited to '.local/bin/toggle-tablet')
-rwxr-xr-x.local/bin/toggle-tablet32
1 files changed, 0 insertions, 32 deletions
diff --git a/.local/bin/toggle-tablet b/.local/bin/toggle-tablet
deleted file mode 100755
index 819af42..0000000
--- a/.local/bin/toggle-tablet
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# This script toggles between a 'normal' mode and a 'tablet' mode, doing
-# a few things:
-
-# - rotates the screen using =xrandr=, so that rotating the physical
-# display of my X220t would have the laptop's battery on the right
-# hand side,
-# - enables touch screen,
-# - properly rotates the stylus pen and touch screen pointers, and
-# - toggles between RGB and Vertical BGR sub-pixel order.
-
-case $(xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation) in
- 0) # Screen is not rotated, we should rotate it right (90°)
- xrandr -o 3
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 1
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 1
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 1
- xfconf-query -c xsettings -p /Xft/RGBA -s vbgr
- ;;
- 1) # Currently top is rotated right, we should set it normal (0°)
- xrandr -o 0
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation -s 0
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Wacom_Rotation -s 0
- xfconf-query -c pointers -p /Wacom_ISDv4_E6_Finger_touch/Properties/Device_Enabled -s 0
- xfconf-query -c xsettings -p /Xft/RGBA -s rgb
- ;;
- *)
- echo "Unknown result from 'xfconf-query -c pointers -p /Wacom_ISDv4_E6_Pen_stylus/Properties/Wacom_Rotation'" >&2
- exit 1
- ;;
-esac