big overhaul

This commit is contained in:
Ryan Wolfe
2023-03-05 11:59:23 -05:00
parent fa3fd3e373
commit 0b91dd8235
1165 changed files with 2107 additions and 8 deletions

38
.local/bin/xos Normal file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
usage_exit () {
local name="${0##*/}"
echo "\
Usage: $name
$name off
$name 1.0
$name 1.5
$name 2.0"
exit 1
}
if [[ -n "$2" ]]; then
usage_exit
fi
scale_go () {
local pointer_dev=$(xinput | sed -nr '/Virtual core/d;s/^.*id=([0-9]+).*slave +pointer.*$/\1/p')
local output_dev=$(xrandr | sed -nr 's/^(.*) connected primary.*$/\1/p')
for x in $output_dev; do
xrandr --output $x --scale ${1}x${1}
done
for x in $pointer_dev ; do
xinput set-prop $x 'Coordinate Transformation Matrix' ${1} 0 0 0 ${1} 0 0 0 1
done
}
case "$1" in
(off|1|1.0)
scale_go 1 ;;
(1.5)
scale_go 1.5 ;;
(2|2.0)
scale_go 2 ;;
(*)
usage_exit ;;
esac