From 98d76b0abbfe933092f2cdfee247faf659ddf73f Mon Sep 17 00:00:00 2001 From: afonso Date: Sat, 1 Jun 2024 19:57:07 +0100 Subject: [PATCH] [scripts] added csgores, desktopres, mouserotation and made sessions uppercase in tms --- .local/bin/csgores | 2 ++ .local/bin/desktopres | 2 ++ .local/bin/mouserotation.sh | 6 ++++++ .local/bin/tms | 1 + 4 files changed, 11 insertions(+) create mode 100755 .local/bin/csgores create mode 100755 .local/bin/desktopres create mode 100755 .local/bin/mouserotation.sh diff --git a/.local/bin/csgores b/.local/bin/csgores new file mode 100755 index 0000000..1967928 --- /dev/null +++ b/.local/bin/csgores @@ -0,0 +1,2 @@ +#!/bin/sh +nvidia-settings --assign CurrentMetaMode="DP-0: nvidia-auto-select +0+0 {viewportin=1920x1440, AllowGSYNCCompatible=On}, HDMI-0: nvidia-auto-select +1920+0 {rotation=right}" diff --git a/.local/bin/desktopres b/.local/bin/desktopres new file mode 100755 index 0000000..6c42ae8 --- /dev/null +++ b/.local/bin/desktopres @@ -0,0 +1,2 @@ +#!/bin/sh +nvidia-settings --assign CurrentMetaMode="DP-0: nvidia-auto-select +0+0 {AllowGSYNCCompatible=On}, HDMI-0: nvidia-auto-select +2560+0 {rotation=right}" diff --git a/.local/bin/mouserotation.sh b/.local/bin/mouserotation.sh new file mode 100755 index 0000000..d6663e0 --- /dev/null +++ b/.local/bin/mouserotation.sh @@ -0,0 +1,6 @@ +#!/bin/sh +for id in `xinput --list | awk '/Razer Razer DeathAdder V3 Pro .*pointer/ {print $8}' | sed 's/id=\(.*\)/\1/'`; do + notify-send "Applied Mouse Rotation" + xinput set-prop $id "Coordinate Transformation Matrix" 0.9848 0.1736 0 -0.1736 0.9848 0 0 0 1 + sleep 1 +done diff --git a/.local/bin/tms b/.local/bin/tms index 6b9c737..f4c7a5d 100755 --- a/.local/bin/tms +++ b/.local/bin/tms @@ -16,6 +16,7 @@ if [[ -z $selected ]]; then fi selected_name=$(basename "$selected" | tr . _) +selected_name=${selected_name^^} tmux_running=$(pgrep tmux) if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then