Omarchy runs perfectly on a Framework 13 out of the box.
However, it gets ALMOST there on a Framework 12. If you follow the Framework Arch install guide (essentially installing the Framework specific stuff for the rotation functionality, etc.) then the driver needed for rotation will be installed and will be functional.
Hyprland, however, does not have any automatic mechanisms in place to do anything with the info the sensor is outputting.
You can write a sh script that you can have hyprland exec-once on start up that will handle all of this for you. This script contains elements necessary to rotate touch inputs as well.
Couple this with a key combo to toggle a file to enable or disable rotation and it will work fully.
Here is the rotate-screen.sh contents which should be placed in ~/.config/hyrp/:
#!/bin/bash
# File to store rotation toggle state (0 = off, 1 = on)
TOGGLE_FILE="$HOME/.config/hypr/rotation-toggle"
# Ensure toggle file exists, default to enabled (1)
[ -f "$TOGGLE_FILE" ] || echo "1" > "$TOGGLE_FILE"
# Monitor sensor and adjust screen based on orientation
monitor-sensor | while read -r line; do
# Check if rotation is enabled
if [ "$(cat "$TOGGLE_FILE")" -eq 1 ]; then
if [[ $line == *"orientation changed: normal"* ]]; then
hyprctl keyword monitor "eDP-1,1920x1200@60,0x0,1.2,transform,0"
hyprctl keyword input:touchdevice:transform 0
hyprctl keyword input:tablet:transform 0
elif [[ $line == *"orientation changed: right-up"* ]]; then
hyprctl keyword monitor "eDP-1,1920x1200@60,0x0,1.2,transform,3"
hyprctl keyword input:touchdevice:transform 3
hyprctl keyword input:tablet:transform 3
elif [[ $line == *"orientation changed: left-up"* ]]; then
hyprctl keyword monitor "eDP-1,1920x1200@60,0x0,1.2,transform,1"
hyprctl keyword input:touchdevice:transform 1
hyprctl keyword input:tablet:transform 1
elif [[ $line == *"orientation changed: bottom-up"* ]]; then
hyprctl keyword monitor "eDP-1,1920x1200@60,0x0,1.2,transform,2"
hyprctl keyword input:touchdevice:transform 2
hyprctl keyword input:tablet:transform 2
fi
fi
done
Technically you should only need “eDP-1,transform,1”, but in my testing this did not work. Note that the 1.2 here sets scaling. You will want this to match whatever you have set in the monitor.conf, which is found in the same folder all of these files are in. Makes sure this matches or you’ll be changing your scaling every time you rotate.
Make sure you make this script executable and set the proper permissions:
chmod +x ~/.config/hypr/rotate-screen.sh
Then you’ll need to add the following to your exec-once area of hyprland.conf:
exec-once = ~/.config/hypr/rotate-screen.sh
Next you’ll need to create the toggle script to allow you to enable and disable rotation. So create another sh script in the same folder (~/.config/hypr/). Call this file toggle-rotation.sh:
#!/bin/bash
TOGGLE_FILE="$HOME/.config/hypr/rotation-toggle"
# Toggle between 0 (off) and 1 (on)
if [ "$(cat "$TOGGLE_FILE")" -eq 1 ]; then
echo "0" > "$TOGGLE_FILE"
notify-send "Auto-rotation disabled"
else
echo "1" > "$TOGGLE_FILE"
notify-send "Auto-rotation enabled"
fi
Save and set permissions on it as well:
chmod +x ~/.config/hypr/toggle-rotation.sh
Lastly we can create the keyboard combo that will allow us to enable and disable rotation. When enabling or disabling you will get a notification about the status of rotation that you just set.
So add the following binding to your hyprland.conf file in the same folder:
bind = SUPER, R, exec, ~/.config/hypr/toggle-rotation.sh
You can make this whatever key binding you wish. This is probably already used under a normal unmodified Omarchy install, just FYI.
Save everything. You can force hyprland to relaunch through a super+esc and selecting relaunch, or you can just reboot.
Rotation should now work. Try it out just to confirm.
The last thing to add is a possible icon on the waybar that you can click to change rotation (ie: on or off) and to have a visual indicator that it is enabled or not. I have not been able to get that working just yet, but will add to this whenever I manage it.
