blob: a2f8b883920c7f74096d41040aaf83f587b13f09 [file] [log] [blame]
Skyler Greya0da6b22024-02-11 22:53:41 +00001{ pkgs, config, inputs, system, ... }: let
2 lock = "${pkgs.waylock}/bin/waylock";
3in {
4
5 # TODO: Eww, SwayNC, hyprland-per-window-layout, waylock, hy3, anyrun, hypr-empty
6
7 home.packages = [ pkgs.hyprpicker ];
8
9 minion.touchpadGestures.enable = true;
10
11 services.fusuma.settings.swipe = let
12 hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
13 jq = "${pkgs.jq}/bin/jq";
14 awk = "${pkgs.gawk}/bin/awk";
15 in {
16 "3".up.command = "${hyprctl} dispatch fullscreen 0";
17 "3".down.command = "${hyprctl} dispatch fullscreen 0";
18 "4".down.command = lock;
19 "3".left.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1+1}')";
20 "3".right.command = "${hyprctl} dispatch workspace $(${hyprctl} activeworkspace -j | ${jq} .id | ${awk} '{print $1-1}')";
21 };
22
23 wayland.windowManager.hyprland = {
24 enable = true;
25
26 xwayland.enable = true;
27 systemd.enable = true;
28
29 settings = let
30 mod = "SUPER";
31 terminal = "${pkgs.kitty}/bin/kitty";
32 menu = "${inputs.anyrun.packages.${system}.anyrun}/bin/anyrun";
33 in {
34 misc = {
35 disable_hyprland_logo = true;
36 disable_splash_rendering = true;
37 };
38
39 exec-once = "${pkgs.hyprpaper}/bin/hyprpaper";
40
41 monitor = [
42 "eDP-1,preferred,0x0,1"
43 "desc:Dell Inc. DELL P2715Q V7WP95AV914L,preferred,2256x-1956,1,transform,1"
44 "desc:AOC 2460G5 0x00023C3F,preferred,336x-1080,1"
45 ",preferred,auto,1" # https://wiki.hyprland.org/Configuring/Monitors/
46 ];
47
48 input = {
49 kb_layout = "us";
50 kb_variant = "dvorak";
51 natural_scroll = true;
52
53 touchpad = {
54 natural_scroll = true;
55 };
56 };
57
58 xwayland = {
59 force_zero_scaling = true;
60 };
61
62 bind = [
63 "${mod}, Q, killactive"
64 "${mod}, SPACE, togglefloating"
65 "${mod}, RETURN, exec, ${terminal}"
66 "${mod}, down, movefocus, d"
67 "${mod}, up, movefocus, u"
68 "${mod}, right, movefocus, r"
69 "${mod}, left, movefocus, l"
70 "${mod}, L, exec, ${lock}"
71 "${mod}, D, exec, ${menu}"
72 ] ++ (
73 builtins.concatLists (builtins.genList (
74 x: let
75 ws = let
76 c = (x + 1) / 10;
77 in
78 builtins.toString (x + 1 - (c * 10));
79 in [
80 "${mod}, ${ws}, workspace, ${toString (x + 1)}"
81 "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
82 ]
83 )
84 10)
85 );
86
87 bindm = [
88 "${mod}, mouse:272, movewindow"
89 "${mod}, mouse:273, resizewindow"
90 ];
91 };
92 };
93}