From 98595d39c87096032740b8ec12aeaa66d3e7203e Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 29 May 2025 17:10:35 +0200 Subject: [PATCH] added screenrotation scripts for implementing touch rotation --- desktopenvs/hyprland/scripts/screenrotation.sh | 0 desktopenvs/hyprland/scripts/screenrotationacw.sh | 15 +++++++++++++++ desktopenvs/hyprland/scripts/screenrotationwcw.sh | 15 +++++++++++++++ 3 files changed, 30 insertions(+) delete mode 100644 desktopenvs/hyprland/scripts/screenrotation.sh create mode 100755 desktopenvs/hyprland/scripts/screenrotationacw.sh create mode 100755 desktopenvs/hyprland/scripts/screenrotationwcw.sh diff --git a/desktopenvs/hyprland/scripts/screenrotation.sh b/desktopenvs/hyprland/scripts/screenrotation.sh deleted file mode 100644 index e69de29..0000000 diff --git a/desktopenvs/hyprland/scripts/screenrotationacw.sh b/desktopenvs/hyprland/scripts/screenrotationacw.sh new file mode 100755 index 0000000..a6c0e9d --- /dev/null +++ b/desktopenvs/hyprland/scripts/screenrotationacw.sh @@ -0,0 +1,15 @@ +#!/bin/bash +curmon=$(hyprctl monitors | grep -B11 "focused: yes" | head -n1 | awk '{print $2}') +currot=$(hyprctl monitors | grep -B1 "focused: yes" | head -n1 | awk '{print $2}') + +newrot="" +if [ $currot == "3" ]; then + newrot="0" +else + newrot=$(($currot + 1)) +fi +echo $newrot + +hyprctl keyword monitor $curmon,preferred,auto,1,transform,$newrot + +eww reload diff --git a/desktopenvs/hyprland/scripts/screenrotationwcw.sh b/desktopenvs/hyprland/scripts/screenrotationwcw.sh new file mode 100755 index 0000000..05ac3c8 --- /dev/null +++ b/desktopenvs/hyprland/scripts/screenrotationwcw.sh @@ -0,0 +1,15 @@ +#!/bin/bash +curmon=$(hyprctl monitors | grep -B11 "focused: yes" | head -n1 | awk '{print $2}') +currot=$(hyprctl monitors | grep -B1 "focused: yes" | head -n1 | awk '{print $2}') + +newrot="" +if [ $currot == "0" ]; then + newrot="3" +else + newrot=$(($currot - 1)) +fi +echo $newrot + +hyprctl keyword monitor $curmon,preferred,auto,1,transform,$newrot + +eww reload