2024-07-07 01:36:41 -04:00
|
|
|
{
|
2024-07-19 09:58:45 -04:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.ar.home;
|
2024-07-19 12:37:11 -04:00
|
|
|
inherit (import ./scripts.nix {inherit config lib pkgs;}) clamshell idleD tablet wallpaperD;
|
|
|
|
inherit
|
|
|
|
(import ./helpers.nix {inherit config lib pkgs;})
|
|
|
|
brightness
|
|
|
|
defaultApps
|
|
|
|
defaultWorkspaces
|
|
|
|
media
|
|
|
|
screenshot
|
|
|
|
volume
|
|
|
|
windowManagerBinds
|
|
|
|
;
|
2024-07-19 09:58:45 -04:00
|
|
|
in {
|
2024-07-19 12:37:11 -04:00
|
|
|
"$mod" = "SUPER";
|
|
|
|
|
|
|
|
animations = {
|
|
|
|
enabled = true;
|
|
|
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
|
|
|
|
|
|
|
animation = [
|
|
|
|
"border, 1, 10, default"
|
|
|
|
"borderangle, 1, 8, default"
|
|
|
|
"fade, 1, 7, default"
|
|
|
|
"specialWorkspace, 1, 6, default, slidevert"
|
|
|
|
"windows, 1, 7, myBezier"
|
|
|
|
"windowsOut, 1, 7, default, popin 80%"
|
|
|
|
"workspaces, 1, 6, default"
|
|
|
|
];
|
2024-07-19 09:58:45 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
bind =
|
|
|
|
[
|
|
|
|
"$mod CONTROL, F12, exec, ${screenshot.region}"
|
|
|
|
"$mod CONTROL, L, exec, ${defaultApps.lock}"
|
|
|
|
"$mod SHIFT, S, movetoworkspace, special:magic"
|
|
|
|
"$mod SHIFT, V, togglefloating"
|
|
|
|
"$mod SHIFT, W, fullscreen"
|
|
|
|
"$mod SHIFT, backslash, togglesplit"
|
|
|
|
"$mod SHIFT, comma, exec, ${lib.getExe pkgs.hyprnome} --previous --move"
|
|
|
|
"$mod SHIFT, period, exec, ${lib.getExe pkgs.hyprnome} --move"
|
|
|
|
"$mod, B, exec, ${defaultApps.browser}"
|
|
|
|
"$mod, C, killactive"
|
|
|
|
"$mod, E, exec, ${defaultApps.editor}"
|
|
|
|
"$mod, F, exec, ${defaultApps.fileManager}"
|
|
|
|
"$mod, F11, exec, pkill -SIGUSR1 waybar"
|
|
|
|
"$mod, M, exec, ${defaultApps.logout}"
|
|
|
|
"$mod, PRINT, exec, ${screenshot.region}"
|
|
|
|
"$mod, R, exec, ${defaultApps.launcher}"
|
|
|
|
"$mod, S, togglespecialworkspace, magic"
|
|
|
|
"$mod, T, exec, ${defaultApps.terminal}"
|
|
|
|
"$mod, comma, exec, ${lib.getExe pkgs.hyprnome} --previous"
|
|
|
|
"$mod, mouse_down, workspace, +1"
|
|
|
|
"$mod, mouse_up, workspace, -1"
|
|
|
|
"$mod, period, exec, ${lib.getExe pkgs.hyprnome}"
|
|
|
|
", PRINT, exec, ${screenshot.screen}"
|
|
|
|
"CONTROL, F12, exec, ${screenshot.screen}"
|
|
|
|
"CTRL ALT,M,submap,move"
|
|
|
|
"CTRL ALT,R,submap,resize"
|
|
|
|
]
|
|
|
|
++ builtins.map (x: "$mod, ${toString x}, workspace, ${toString x}") defaultWorkspaces
|
|
|
|
++ builtins.map (x: "$mod SHIFT, ${toString x}, movetoworkspace, ${toString x}") defaultWorkspaces
|
|
|
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod, ${key}, movefocus, ${direction}") windowManagerBinds
|
|
|
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod SHIFT, ${key}, movewindow, ${direction}") windowManagerBinds
|
|
|
|
++ lib.attrsets.mapAttrsToList (key: direction: "$mod CONTROL SHIFT, ${key}, movecurrentworkspacetomonitor, ${direction}") windowManagerBinds;
|
|
|
|
|
|
|
|
bindm = [
|
|
|
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
|
|
|
"$mod, mouse:272, movewindow"
|
|
|
|
"$mod, mouse:273, resizewindow"
|
|
|
|
];
|
|
|
|
|
|
|
|
bindl =
|
|
|
|
[
|
|
|
|
# Volume, microphone, and media keys.
|
|
|
|
", xf86audiomute, exec, ${volume.mute}"
|
|
|
|
", xf86audiomicmute, exec, ${volume.micMute}"
|
|
|
|
", xf86audioplay, exec, ${media.play}"
|
|
|
|
", xf86audioprev, exec, ${media.prev}"
|
|
|
|
", xf86audionext, exec, ${media.next}"
|
|
|
|
]
|
|
|
|
++ builtins.map (switch: ",switch:${switch},exec,${tablet}") cfg.desktop.hyprland.tabletMode.tabletSwitches
|
|
|
|
++ lib.lists.optionals (cfg.desktop.hyprland.laptopMonitors != [])
|
|
|
|
[
|
|
|
|
",switch:on:Lid Switch,exec,${clamshell} on"
|
|
|
|
",switch:off:Lid Switch,exec,${clamshell} off"
|
|
|
|
];
|
|
|
|
|
|
|
|
bindle = [
|
|
|
|
# Display, volume, microphone, and media keys.
|
|
|
|
", xf86monbrightnessup, exec, ${brightness.up}"
|
|
|
|
", xf86monbrightnessdown, exec, ${brightness.down}"
|
|
|
|
", xf86audioraisevolume, exec, ${volume.up}"
|
|
|
|
", xf86audiolowervolume, exec, ${volume.down}"
|
|
|
|
];
|
|
|
|
|
|
|
|
decoration = {
|
|
|
|
blur = {
|
|
|
|
enabled = true;
|
|
|
|
passes = 1;
|
|
|
|
size = 8;
|
|
|
|
};
|
|
|
|
|
|
|
|
"col.shadow" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.shadow}EE)";
|
|
|
|
dim_special = 0.5;
|
|
|
|
drop_shadow = true;
|
|
|
|
|
|
|
|
layerrule = [
|
|
|
|
"blur, launcher"
|
|
|
|
"blur, logout_dialog"
|
|
|
|
"blur, notifications"
|
|
|
|
"blur, swayosd"
|
|
|
|
"blur, waybar"
|
|
|
|
"ignorezero, notifications"
|
|
|
|
"ignorezero, swayosd"
|
|
|
|
"ignorezero, waybar"
|
|
|
|
];
|
|
|
|
|
|
|
|
rounding = 10;
|
|
|
|
shadow_range = 4;
|
|
|
|
shadow_render_power = 3;
|
2024-07-19 09:58:45 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
dwindle.preserve_split = true;
|
|
|
|
|
|
|
|
env = [
|
|
|
|
"QT_QPA_PLATFORMTHEME,qt6ct"
|
|
|
|
"XCURSOR_SIZE,${toString config.home.pointerCursor.size}"
|
2024-07-19 11:10:34 -04:00
|
|
|
];
|
2024-07-07 01:36:41 -04:00
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
exec-once =
|
|
|
|
[
|
|
|
|
wallpaperD
|
|
|
|
(lib.getExe pkgs.waybar)
|
|
|
|
idleD
|
|
|
|
(lib.getExe pkgs.wayland-pipewire-idle-inhibit)
|
|
|
|
(lib.getExe' pkgs.blueman "blueman-applet")
|
|
|
|
(lib.getExe' pkgs.networkmanagerapplet "nm-applet")
|
|
|
|
(lib.getExe' pkgs.playerctl "playerctld")
|
|
|
|
(lib.getExe' pkgs.swayosd "swayosd-server")
|
|
|
|
(lib.getExe pkgs.mako)
|
|
|
|
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
|
|
|
]
|
|
|
|
++ lib.lists.optional (cfg.desktop.hyprland.redShift)
|
|
|
|
"${lib.getExe pkgs.gammastep} -l 33.74:-84.38";
|
|
|
|
|
|
|
|
input = {
|
|
|
|
follow_mouse = 1;
|
|
|
|
kb_layout = "us";
|
|
|
|
kb_variant = "altgr-intl";
|
|
|
|
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
|
|
|
|
|
|
|
|
touchpad = {
|
|
|
|
clickfinger_behavior = true;
|
|
|
|
drag_lock = true;
|
|
|
|
middle_button_emulation = true;
|
|
|
|
natural_scroll = true;
|
|
|
|
tap-to-click = true;
|
|
|
|
};
|
2024-07-19 09:58:45 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
general = {
|
|
|
|
"col.active_border" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.secondary}EE) rgba(${lib.strings.removePrefix "#" cfg.theme.colors.primary}EE) 45deg";
|
|
|
|
"col.inactive_border" = "rgba(${lib.strings.removePrefix "#" cfg.theme.colors.inactive}AA)";
|
|
|
|
allow_tearing = false;
|
|
|
|
border_size = 2;
|
|
|
|
gaps_in = 5;
|
|
|
|
gaps_out = 6;
|
|
|
|
layout = "dwindle";
|
|
|
|
};
|
2024-07-07 01:36:41 -04:00
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
workspace_swipe_touch = true;
|
2024-07-19 09:58:45 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
master = {
|
|
|
|
always_center_master = true;
|
|
|
|
new_status = false;
|
2024-07-19 09:58:45 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
misc = {
|
|
|
|
disable_hyprland_logo = true;
|
|
|
|
disable_splash_rendering = true;
|
|
|
|
focus_on_activate = true;
|
|
|
|
vfr = true;
|
2024-07-07 01:36:41 -04:00
|
|
|
};
|
|
|
|
|
2024-07-19 12:37:11 -04:00
|
|
|
monitor =
|
|
|
|
[",preferred,auto,auto"]
|
|
|
|
++ cfg.desktop.hyprland.laptopMonitors
|
|
|
|
++ cfg.desktop.hyprland.monitors;
|
|
|
|
|
2024-07-19 12:01:43 -04:00
|
|
|
windowrulev2 = [
|
2024-07-19 11:10:34 -04:00
|
|
|
"center(1),class:(.blueman-manager-wrapped)"
|
|
|
|
"center(1),class:(com.github.wwmm.easyeffects)"
|
|
|
|
"center(1),class:(pavucontrol)"
|
|
|
|
"float, class:^(firefox)$, title:^(Picture-in-Picture)$"
|
|
|
|
"float,class:(.blueman-manager-wrapped)"
|
|
|
|
"float,class:(com.github.wwmm.easyeffects)"
|
|
|
|
"float,class:(pavucontrol)"
|
|
|
|
"move 70% 20%, class:^(firefox)$, title:^(Picture-in-Picture)$"
|
|
|
|
"pin, class:^(firefox)$, title:^(Picture-in-Picture)$"
|
|
|
|
"size 40% 60%,class:(.blueman-manager-wrapped)"
|
|
|
|
"size 40% 60%,class:(com.github.wwmm.easyeffects)"
|
|
|
|
"size 40% 60%,class:(pavucontrol)"
|
|
|
|
"suppressevent maximize, class:.*"
|
|
|
|
];
|
2024-07-19 12:37:11 -04:00
|
|
|
|
|
|
|
xwayland.force_zero_scaling = true;
|
2024-07-07 01:36:41 -04:00
|
|
|
}
|