2024-06-16 14:33:58 -04:00
|
|
|
{
|
|
|
|
hyprgrass,
|
|
|
|
lib,
|
2024-06-27 00:56:27 -04:00
|
|
|
osConfig,
|
2024-06-16 14:33:58 -04:00
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-06-27 00:56:27 -04:00
|
|
|
inherit (lib) mkIf;
|
2024-06-16 14:33:58 -04:00
|
|
|
|
2024-06-27 00:56:27 -04:00
|
|
|
cfg = osConfig.roles.desktop;
|
2024-06-16 14:33:58 -04:00
|
|
|
in
|
2024-06-27 00:56:27 -04:00
|
|
|
mkIf cfg.isTouchscreen {
|
2024-06-16 14:33:58 -04:00
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
plugins = [hyprgrass.packages.${pkgs.system}.default];
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
plugin = {
|
|
|
|
touch_gestures = {
|
|
|
|
# The default sensitivity is probably too low on tablet screens,
|
|
|
|
# I recommend turning it up to 4.0
|
|
|
|
sensitivity = 4.0;
|
|
|
|
|
|
|
|
# must be >= 3
|
|
|
|
workspace_swipe_fingers = 3;
|
|
|
|
|
|
|
|
experimental = {
|
|
|
|
# send proper cancel events to windows instead of hacky touch_up events,
|
|
|
|
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
|
|
|
|
send_cancel = 0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
workspace_swipe_fingers = 3;
|
|
|
|
workspace_swipe_touch = false;
|
|
|
|
workspace_swipe_cancel_ratio = 0.15;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|