1

feat: script to rotate screen on kde

This commit is contained in:
Himadri Bhattacharjee
2026-02-11 10:20:46 +05:30
parent f15c6801f5
commit 0b53dd9d0c

View File

@@ -8,6 +8,16 @@
kdePackages.karousel
notify-desktop
klassy
(pkgs.writeShellScriptBin "kde-rotate" ''
#!/usr/bin/env sh
case $(${pkgs.kdePackages.libkscreen}/bin/kscreen-doctor --json | ${pkgs.jq}/bin/jq .outputs[0].rotation) in
1) direction=left ;;
2) direction=inverted ;;
4) direction=right ;;
8) direction=none ;;
esac
${pkgs.kdePackages.libkscreen}/bin/kscreen-doctor output.eDP-1.rotation.$direction
'')
];
home.file.".config/kglobalshortcutsrc".source = ./sources/kglobalshortcutsrc;
home.file.".config/kwinrc".source = ./sources/kwinrc;