/ scripts / flipdisplay.sh
flipdisplay.sh
 1  transform=$(niri msg outputs | grep Transform)
 2  rotation=$(echo $transform | cut -d ' ' -f 2)
 3  if [[ $rotation == "normal" ]]; then
 4    niri msg output eDP-1 transform 90
 5  elif [[ $rotation == "90°" ]]; then
 6    niri msg output eDP-1 transform 180
 7  elif [[ $rotation == "180°" ]]; then
 8    niri msg output eDP-1 transform 270
 9  elif [[ $rotation == "270°" ]]; then
10    niri msg output eDP-1 transform normal
11  else
12    niri msg output eDP-1 transform normal
13  fi