2024-10-21 12:31:30 +07:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-06-12 09:54:11 +07:00
|
|
|
let
|
|
|
|
cfg = config.profile.hyprland;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-07-26 20:03:14 +07:00
|
|
|
profile.home.programs.foot.enable = lib.mkForce true;
|
|
|
|
|
2024-06-12 09:54:11 +07:00
|
|
|
home.packages = [
|
2024-06-12 18:09:56 +07:00
|
|
|
pkgs.wl-clipboard
|
|
|
|
pkgs.kcalc
|
2024-06-12 09:54:11 +07:00
|
|
|
];
|
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
2024-10-22 10:23:52 +07:00
|
|
|
systemd.variables = [ "--all" ];
|
2024-06-12 09:54:11 +07:00
|
|
|
settings = {
|
2024-10-21 12:31:30 +07:00
|
|
|
env = [ "DBUS_SESSION_BUS_ADDRESS,unix:path=/run/user/${toString config.profile.user.uid}/bus" ];
|
2024-06-12 09:54:11 +07:00
|
|
|
# window decors
|
|
|
|
general = {
|
|
|
|
gaps_in = 10;
|
|
|
|
gaps_out = 14;
|
|
|
|
border_size = 3;
|
|
|
|
"col.active_border" = "rgba(ffffffff)";
|
|
|
|
layout = "dwindle";
|
|
|
|
};
|
|
|
|
|
2024-08-14 23:13:14 +07:00
|
|
|
master = {
|
|
|
|
mfact = 0.75;
|
|
|
|
new_status = "inherit";
|
|
|
|
};
|
|
|
|
|
2024-06-12 09:54:11 +07:00
|
|
|
dwindle = {
|
|
|
|
pseudotile = true;
|
|
|
|
preserve_split = true;
|
|
|
|
force_split = 2;
|
|
|
|
};
|
|
|
|
|
2024-07-03 15:41:49 +07:00
|
|
|
# master = {
|
|
|
|
# new_is_master = true;
|
|
|
|
# };
|
2024-06-12 09:54:11 +07:00
|
|
|
|
|
|
|
gestures = {
|
|
|
|
workspace_swipe = true;
|
|
|
|
workspace_swipe_create_new = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
workspace = cfg.settings.workspaces;
|
|
|
|
|
|
|
|
decoration = {
|
|
|
|
rounding = 10;
|
|
|
|
blur = {
|
|
|
|
enabled = true;
|
|
|
|
size = 6;
|
|
|
|
passes = 2;
|
|
|
|
new_optimizations = "on";
|
|
|
|
ignore_opacity = true;
|
|
|
|
xray = true;
|
|
|
|
# blurls = waybar
|
|
|
|
};
|
|
|
|
active_opacity = 1.0;
|
|
|
|
inactive_opacity = 0.9;
|
|
|
|
fullscreen_opacity = 1.0;
|
|
|
|
|
|
|
|
drop_shadow = true;
|
|
|
|
shadow_range = 30;
|
|
|
|
shadow_render_power = 3;
|
|
|
|
"col.shadow" = "0x66000000";
|
|
|
|
};
|
|
|
|
|
|
|
|
monitor = cfg.settings.monitors;
|
|
|
|
"$mod" = "SUPER";
|
|
|
|
|
|
|
|
# https://wiki.hyprland.org/Configuring/Binds
|
|
|
|
bind = [
|
|
|
|
# Programs
|
2024-08-14 23:34:51 +07:00
|
|
|
''$mod, RETURN, exec, footclient''
|
2024-10-17 09:00:59 +07:00
|
|
|
"$mod, E, exec, nautilus"
|
2024-09-05 16:22:50 +07:00
|
|
|
"$mod, B, exec, microsoft-edge"
|
2024-06-12 09:54:11 +07:00
|
|
|
"$mod, BackSpace, exec, wlogout"
|
2024-07-26 20:10:32 +07:00
|
|
|
"$mod, S, exec, foot ssh homeserver@vpn.tigor.web.id"
|
2024-06-12 09:54:11 +07:00
|
|
|
|
|
|
|
# Workspaces
|
|
|
|
"$mod, 1, workspace, 1"
|
|
|
|
"$mod, 2, workspace, 2"
|
|
|
|
"$mod, 3, workspace, 3"
|
|
|
|
"$mod, 4, workspace, 4"
|
|
|
|
"$mod, 5, workspace, 5"
|
|
|
|
"$mod, 6, workspace, 6"
|
|
|
|
"$mod, 7, workspace, 7"
|
|
|
|
"$mod, 8, workspace, 8"
|
|
|
|
"$mod, 9, workspace, 9"
|
|
|
|
"$mod, 0, workspace, 10"
|
|
|
|
"$mod SHIFT, 1, movetoworkspace, 1"
|
|
|
|
"$mod SHIFT, 2, movetoworkspace, 2"
|
|
|
|
"$mod SHIFT, 3, movetoworkspace, 3"
|
|
|
|
"$mod SHIFT, 4, movetoworkspace, 4"
|
|
|
|
"$mod SHIFT, 5, movetoworkspace, 5"
|
|
|
|
"$mod SHIFT, 6, movetoworkspace, 6"
|
|
|
|
"$mod SHIFT, 7, movetoworkspace, 7"
|
|
|
|
"$mod SHIFT, 8, movetoworkspace, 8"
|
|
|
|
"$mod SHIFT, 9, movetoworkspace, 9"
|
|
|
|
"$mod SHIFT, 0, movetoworkspace, 10"
|
|
|
|
"$mod, mouse_down, workspace, e+1"
|
|
|
|
"$mod, mouse_up, workspace, e-1"
|
|
|
|
"$mod CTRL, down, workspace, empty"
|
|
|
|
|
|
|
|
# Window Management
|
|
|
|
"$mod, Q, killactive"
|
|
|
|
"$mod, Space, fullscreen"
|
|
|
|
"$mod, H, movefocus, l"
|
|
|
|
"$mod, J, movefocus, d"
|
|
|
|
"$mod, k, movefocus, u"
|
|
|
|
"$mod, l, movefocus, r"
|
|
|
|
"$mod SHIFT, H, movewindow, l"
|
|
|
|
"$mod SHIFT, J, movewindow, d"
|
|
|
|
"$mod SHIFT, k, movewindow, u"
|
|
|
|
"$mod SHIFT, l, movewindow, r"
|
|
|
|
];
|
|
|
|
|
|
|
|
binde = [
|
|
|
|
"$mod CTRL, H, resizeactive, -100 0"
|
|
|
|
"$mod CTRL, J, resizeactive, 0 100"
|
|
|
|
"$mod CTRL, K, resizeactive, 0 -100"
|
|
|
|
"$mod CTRL, L, resizeactive, 100 0"
|
|
|
|
];
|
|
|
|
|
|
|
|
# m -> mouse
|
|
|
|
bindm = [
|
|
|
|
"$mod, mouse:272, movewindow"
|
|
|
|
"$mod, mouse:273, resizewindow"
|
|
|
|
];
|
|
|
|
bindl = [
|
|
|
|
", XF86AudioPlay, exec, playerctl play-pause"
|
|
|
|
", XF86AudioPause, exec, playerctl pause"
|
|
|
|
", XF86AudioNext, exec, playerctl next"
|
|
|
|
", XF86AudioPrev, exec, playerctl previous"
|
|
|
|
", XF86Calculator, exec, qalculate-gtk"
|
|
|
|
];
|
|
|
|
|
|
|
|
input = {
|
|
|
|
follow_mouse = 1;
|
|
|
|
touchpad = {
|
|
|
|
natural_scroll = false;
|
|
|
|
};
|
|
|
|
mouse_refocus = false;
|
|
|
|
sensitivity = 0;
|
|
|
|
kb_options = config.profile.xkb.options;
|
|
|
|
};
|
|
|
|
|
|
|
|
misc = {
|
|
|
|
disable_hyprland_logo = true;
|
|
|
|
disable_splash_rendering = true;
|
|
|
|
focus_on_activate = true;
|
|
|
|
enable_swallow = true;
|
2024-08-14 23:34:51 +07:00
|
|
|
swallow_regex = "^(foot|footclient)$";
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
animations = {
|
|
|
|
enabled = true;
|
|
|
|
bezier = [
|
|
|
|
"wind, 0.05, 0.9, 0.1, 1.05"
|
|
|
|
"winIn, 0.1, 1.1, 0.1, 1.1"
|
|
|
|
"winOut, 0.3, -0.3, 0, 1"
|
|
|
|
"liner, 1, 1, 1, 1"
|
|
|
|
];
|
|
|
|
animation = [
|
|
|
|
"windows, 1, 6, wind, slide"
|
|
|
|
"windowsIn, 1, 6, winIn, slide"
|
|
|
|
"windowsOut, 1, 5, winOut, slide"
|
|
|
|
"windowsMove, 1, 5, wind, slide"
|
|
|
|
"border, 1, 1, liner"
|
|
|
|
"borderangle, 1, 30, liner, loop"
|
|
|
|
"fade, 1, 10, default"
|
|
|
|
"workspaces, 1, 5, wind"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
windowrulev2 = [
|
|
|
|
config.profile.discord.window_rule
|
|
|
|
config.profile.slack.window_rule
|
|
|
|
config.profile.whatsapp.window_rule
|
2024-09-12 14:27:23 +07:00
|
|
|
''opaque,title:(.*)(- YouTube)(.*)$'' # Youtube
|
|
|
|
''opaque,title:^Meet - (.*)$'' # Google Meet
|
2024-08-14 14:38:19 +07:00
|
|
|
''opaque,class:^(mpv)$''
|
2024-08-14 23:13:14 +07:00
|
|
|
''float,class:^(lazygit)$''
|
|
|
|
''center,class:^(lazygit)$''
|
|
|
|
''size 90% 90%,class:^(lazygit)$''
|
|
|
|
''stayfocused,class:^(lazygit)$''
|
2024-06-12 09:54:11 +07:00
|
|
|
];
|
|
|
|
};
|
2024-10-21 12:31:30 +07:00
|
|
|
extraConfig = # hyprlang
|
|
|
|
''
|
|
|
|
exec-once=foot --server
|
2024-06-12 09:54:11 +07:00
|
|
|
|
2024-10-21 12:31:30 +07:00
|
|
|
exec-once=nm-applet
|
|
|
|
exec-once=pasystray
|
2024-06-12 09:54:11 +07:00
|
|
|
|
2024-10-21 12:31:30 +07:00
|
|
|
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
|
|
|
|
'';
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|