X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/88bb48589c967b7a01e0a5ff0b86e6ca5ede78a3..72f329ba11ec196784418c6436abfe64a4cf9213:/rc.org diff --git a/rc.org b/rc.org index 78afa55..f43e2e8 100644 --- a/rc.org +++ b/rc.org @@ -66,7 +66,7 @@ sent_tag = sent sxhkd & sh ~/.fehbg & xfce4-panel -d & -#compton & +compton & sleep 0.5 && pasystray --notify=all & bspc monitor -d I II III IV V VI VII VIII IX X @@ -85,7 +85,7 @@ bspc config gapless_monocle true bspc config click_to_focus button1 bspc config directional_focus_tightness low -bspc rule -a Firefox desktop='^1' follow=on +#bspc rule -a Firefox desktop='^1' follow=on bspc rule -a Nightly desktop='^1' follow=on bspc rule -a Emacs desktop='^2' state=tiled follow=on #bspc rule -a Chromium desktop='^4' follow=on @@ -204,6 +204,9 @@ super + apostrophe #XF86KbdBrightness{Up,Down} # kbdlight {up,down} +XF86RotateWindows + toggle-tablet + # # bspwm hotkeys # @@ -4546,6 +4549,44 @@ fi xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -T #+end_src +** toggle-tablet +:PROPERTIES: +:header-args+: :tangle ~/.local/bin/toggle-tablet :shebang "#!/bin/bash" +:END: + +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. + +#+begin_src bash +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 +#+end_src + ** unlock-def-gk.py :PROPERTIES: :header-args+: :tangle ~/.local/bin/unlock-def-gk.py :shebang "#!/usr/bin/env python2"