diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/default.nix b/scripts/default.nix index 20808e7..72d0235 100644 --- a/scripts/default.nix +++ b/scripts/default.nix | |||
@@ -60,6 +60,21 @@ let | |||
60 | fi | 60 | fi |
61 | ''; | 61 | ''; |
62 | 62 | ||
63 | touchscreen = "ELAN9008:00 04F3:2ED6"; | ||
64 | stylus = "ELAN9008:00 04F3:2ED6 Stylus Pen (0)"; | ||
65 | portait-transform = builtins.toString [ 0 (-1) 1 1 0 0 0 0 1 ]; | ||
66 | landscape-transform = builtins.toString [ 0 0 0 0 0 0 0 0 0 ]; | ||
67 | portrait = pkgs.writeScriptBin "portrait" '' | ||
68 | ${pkgs.xorg.xrandr}/bin/xrandr -o left | ||
69 | ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${portait-transform} | ||
70 | ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${portait-transform} | ||
71 | ''; | ||
72 | landscape = pkgs.writeScriptBin "landscape" '' | ||
73 | ${pkgs.xorg.xrandr}/bin/xrandr -o normal | ||
74 | ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${landscape-transform} | ||
75 | ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${landscape-transform} | ||
76 | ''; | ||
77 | |||
63 | in | 78 | in |
64 | [ | 79 | [ |
65 | webcam | 80 | webcam |
@@ -69,4 +84,6 @@ in | |||
69 | uploader | 84 | uploader |
70 | battery | 85 | battery |
71 | tmux-fzf | 86 | tmux-fzf |
87 | portrait | ||
88 | landscape | ||
72 | ] | 89 | ] |