2024-02-06 06:24:31 +00:00
|
|
|
{ pkgs, lib, config, osConfig, ... }:
|
2024-01-22 02:55:41 +00:00
|
|
|
|
|
|
|
{
|
2024-01-22 03:31:14 +00:00
|
|
|
config = lib.mkIf (builtins.elem "hyprland" osConfig.desktop) (
|
2024-01-22 02:55:41 +00:00
|
|
|
let startup = pkgs.writeShellScript "startup.sh" ''
|
|
|
|
hyprctl setcursor Bibata-Original-Classic 24
|
|
|
|
waybar &
|
2024-01-26 03:08:29 +00:00
|
|
|
hyprpaper &
|
2024-01-22 02:55:41 +00:00
|
|
|
|
|
|
|
swayidle -w \
|
2024-01-30 05:14:01 +00:00
|
|
|
timeout 300 'swaylock -f' \
|
|
|
|
timeout 330 'hyprctl dispatch dpms off' \
|
|
|
|
resume 'hyprctl dispatch dpms on' \
|
|
|
|
before-sleep 'swaylock -f; sleep 1' &
|
2024-01-22 02:55:41 +00:00
|
|
|
'';
|
|
|
|
in { wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
"$mod" = "SUPER";
|
2024-02-06 06:24:31 +00:00
|
|
|
"$term" = "${config.term}";
|
2024-01-22 02:55:41 +00:00
|
|
|
"$browser" = "firefox";
|
|
|
|
"$menu" = "dmenu_path | wmenu -p 'Run:' -l 10 | xargs hyprctl dispatch exec";
|
|
|
|
|
|
|
|
|
2024-01-22 07:36:11 +00:00
|
|
|
exec-once = "${startup}";
|
2024-01-22 02:55:41 +00:00
|
|
|
|
|
|
|
monitor = [
|
2024-01-22 07:36:11 +00:00
|
|
|
",preferred,auto,auto"
|
|
|
|
"desc:BOE 0x095F,preferred,0x0,1.566667"
|
2024-01-22 02:55:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
env = [
|
|
|
|
"XCURSOR_SIZE,24"
|
|
|
|
"DEFAULT_TERM,$term"
|
|
|
|
];
|
|
|
|
|
|
|
|
input = {
|
|
|
|
kb_layout = "us";
|
|
|
|
numlock_by_default = true;
|
|
|
|
accel_profile = "flat";
|
|
|
|
scroll_method = "2fg";
|
|
|
|
follow_mouse = 2;
|
|
|
|
|
|
|
|
touchpad = {
|
|
|
|
natural_scroll = true;
|
|
|
|
tap-to-click = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
general = {
|
2024-02-04 23:05:26 +00:00
|
|
|
gaps_in = 3;
|
|
|
|
gaps_out = 6;
|
2024-01-22 02:55:41 +00:00
|
|
|
border_size = 2;
|
|
|
|
|
2024-02-04 23:05:26 +00:00
|
|
|
"col.active_border" = "rgba(ff970aff) rgba(ff830aff) 45deg";
|
2024-01-22 02:55:41 +00:00
|
|
|
"col.inactive_border" = "rgba(595959aa)";
|
|
|
|
|
|
|
|
layout = "dwindle";
|
|
|
|
};
|
|
|
|
|
|
|
|
decoration = {
|
|
|
|
rounding = 2;
|
|
|
|
drop_shadow = true;
|
|
|
|
shadow_range = 4;
|
|
|
|
shadow_render_power = 3;
|
|
|
|
"col.shadow" = "rgba(1a1a1aee)";
|
|
|
|
|
|
|
|
blur = {
|
|
|
|
enabled = true;
|
|
|
|
size = 3;
|
|
|
|
passes = 1;
|
|
|
|
new_optimizations = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
animations = {
|
|
|
|
enabled = true;
|
|
|
|
|
|
|
|
bezier = [
|
|
|
|
"myBezier, 0.05, 0.9, 0.1, 1.05"
|
|
|
|
];
|
|
|
|
|
|
|
|
animation = [
|
|
|
|
"windows, 1, 7, myBezier"
|
|
|
|
"windowsOut, 1, 7, default, popin 80%"
|
|
|
|
"border, 1, 10, default"
|
|
|
|
"borderangle, 1, 8, default"
|
|
|
|
"fade, 1, 7, default"
|
|
|
|
"workspaces, 1, 6, default"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
dwindle = {
|
|
|
|
pseudotile = true;
|
|
|
|
preserve_split = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
master = {
|
|
|
|
new_is_master = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
gestures = {
|
|
|
|
workspace_swipe = "on";
|
|
|
|
};
|
|
|
|
|
|
|
|
misc = {
|
|
|
|
force_default_wallpaper = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
windowrulev2 = [
|
2024-03-27 02:23:55 +00:00
|
|
|
"suppressevent fullscreen maximize, class:.*"
|
2024-01-22 02:55:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
bindr = [
|
|
|
|
"$mod, SUPER_L, exec, pkill wmenu || $menu"
|
|
|
|
"$mod SHIFT, E, exec, ${./hypr-scripts/logout.sh}"
|
|
|
|
|
|
|
|
"$mod, Escape, exec, swaylock"
|
|
|
|
"$mod SHIFT, Escape, exec, swaylock -f && sleep 2 && hyprctl dispatch dpms off"
|
|
|
|
];
|
|
|
|
|
|
|
|
bind = [
|
2024-02-06 06:40:43 +00:00
|
|
|
"$mod, Return, exec, ${config.runInTerm} ${pkgs.tmux}/bin/tmux"
|
2024-04-01 05:40:51 +00:00
|
|
|
"$mod, backslash, exec, ${config.runInDangerTerm} ${pkgs.tmux}/bin/tmux new-session -e DANGER=1"
|
2024-01-22 02:55:41 +00:00
|
|
|
"$mod, B, exec, $browser"
|
|
|
|
"$mod, E, killactive,"
|
2024-02-04 23:05:26 +00:00
|
|
|
"$mod, Q, exec, hyprctl kill"
|
2024-01-22 02:55:41 +00:00
|
|
|
|
|
|
|
"$mod, left, movefocus, l"
|
|
|
|
"$mod, right, movefocus, r"
|
|
|
|
"$mod, up, movefocus, u"
|
|
|
|
"$mod, down, movefocus, d"
|
|
|
|
|
|
|
|
"$mod, H, movefocus, l"
|
|
|
|
"$mod, L, movefocus, r"
|
|
|
|
"$mod, K, movefocus, u"
|
|
|
|
"$mod, J, movefocus, d"
|
|
|
|
|
|
|
|
"$mod SHIFT, left, movewindow, l"
|
|
|
|
"$mod SHIFT, right, movewindow, r"
|
|
|
|
"$mod SHIFT, up, movewindow, u"
|
|
|
|
"$mod SHIFT, down, movewindow, d"
|
|
|
|
|
|
|
|
"$mod SHIFT, H, movewindow, l"
|
|
|
|
"$mod SHIFT, L, movewindow, r"
|
|
|
|
"$mod SHIFT, K, movewindow, u"
|
|
|
|
"$mod SHIFT, J, movewindow, d"
|
|
|
|
] ++ (
|
|
|
|
# workspaces
|
|
|
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
|
|
|
builtins.concatLists (builtins.genList (
|
|
|
|
x: let
|
|
|
|
ws = let
|
|
|
|
c = (x + 1) / 10; # (This is integer division)
|
|
|
|
in
|
|
|
|
builtins.toString (x + 1 - (c * 10));
|
|
|
|
in [
|
|
|
|
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
|
|
|
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
|
|
|
]
|
|
|
|
)
|
|
|
|
10)
|
|
|
|
);
|
|
|
|
|
|
|
|
}; # settings
|
|
|
|
};});
|
|
|
|
}
|