2024-08-02 22:32:29 -04:00
|
|
|
hyprgrass: {
|
2024-06-16 14:33:58 -04:00
|
|
|
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-08-02 22:32:29 -04:00
|
|
|
in {
|
|
|
|
config = mkIf cfg.isTouchscreen {
|
2024-06-16 14:33:58 -04:00
|
|
|
wayland.windowManager.hyprland = {
|
2024-07-30 02:03:55 -04:00
|
|
|
plugins = [hyprgrass.packages.${pkgs.system}.default];
|
2024-06-16 14:33:58 -04:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2024-10-30 20:32:05 -04:00
|
|
|
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
|
|
|
|
# and can be used at the same time
|
|
|
|
# possible values: l, r, u, or d
|
|
|
|
# to disable it set it to anything else
|
|
|
|
# workspace_swipe_edge = "d";
|
|
|
|
|
|
|
|
# in milliseconds
|
|
|
|
long_press_delay = 400;
|
|
|
|
|
|
|
|
# resize windows by long-pressing on window borders and gaps.
|
|
|
|
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
|
|
|
|
# windows
|
|
|
|
resize_on_border_long_press = true;
|
|
|
|
|
|
|
|
# in pixels, the distance from the edge that is considered an edge
|
|
|
|
edge_margin = 10;
|
|
|
|
|
2024-11-07 10:39:28 -05:00
|
|
|
# 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
|
|
|
|
experimental.send_cancel = 0;
|
|
|
|
|
|
|
|
hyprgrass-bind = [
|
|
|
|
", edge:u:d, exec, ags request 'open win-applauncher'"
|
|
|
|
", edge:d:u, exec, ags request 'osk open'"
|
|
|
|
", swipe:3:d, exec, hyprctl dispatch hyprexpo:expo on"
|
|
|
|
];
|
|
|
|
hyprgrass-bindm = [", longpress:2, movewindow"];
|
2024-06-16 14:33:58 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
workspace_swipe_fingers = 3;
|
|
|
|
workspace_swipe_touch = false;
|
|
|
|
workspace_swipe_cancel_ratio = 0.15;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-08-02 22:32:29 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./hyprgrass.nix;
|
|
|
|
}
|