Initial
This commit is contained in:
commit
24a865004a
94 changed files with 6074 additions and 0 deletions
27
modules/home/hyprland/animations-def.nix
Normal file
27
modules/home/hyprland/animations-def.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"wind, -1.05, 0.9, 0.1, 1.05"
|
||||
"winIn, -1.1, 1.1, 0.1, 1.1"
|
||||
"winOut, -1.3, -0.3, 0, 1"
|
||||
"liner, 0, 1, 1, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 0, 6, wind, slide"
|
||||
"windowsIn, 0, 6, winIn, slide"
|
||||
"windowsOut, 0, 5, winOut, slide"
|
||||
"windowsMove, 0, 5, wind, slide"
|
||||
"border, 0, 1, liner"
|
||||
"fade, 0, 10, default"
|
||||
"workspaces, 0, 5, wind"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
31
modules/home/hyprland/animations-dynamic.nix
Normal file
31
modules/home/hyprland/animations-dynamic.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# name "Dynamic"
|
||||
# credit https://github.com/mylinuxforwork/dotfiles
|
||||
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"
|
||||
];
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
43
modules/home/hyprland/animations-end4.nix
Normal file
43
modules/home/hyprland/animations-end4.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix);
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# Name: END-4
|
||||
# Credit: END-4 project https://github.com/end-4/dots-hyprland
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"linear, 0, 0, 1, 1"
|
||||
"md3_standard, 0.2, 0, 0, 1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"crazyshot, 0.1, 1.5, 0.76, 0.92 "
|
||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
||||
"menu_decel, 0.1, 1, 0, 1"
|
||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
||||
"md2, 0.4, 0, 0.2, 1 # use with .2s duration"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, md3_decel, popin 60%"
|
||||
"windowsIn, 1, 3, md3_decel, popin 60%"
|
||||
"windowsOut, 1, 3, md3_accel, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 3, md3_decel"
|
||||
"layersIn, 1, 3, menu_decel, slide"
|
||||
"layersOut, 1, 1.6, menu_accel"
|
||||
"fadeLayersIn, 1, 2, menu_decel"
|
||||
"fadeLayersOut, 1, 4.5, menu_accel"
|
||||
"workspaces, 1, 7, menu_decel, slide"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
76
modules/home/hyprland/binds.nix
Normal file
76
modules/home/hyprland/binds.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
browser
|
||||
terminal
|
||||
;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
"$modifier,Return,exec,${terminal}"
|
||||
"$modifier,K,exec,list-keybinds"
|
||||
"$modifier SHIFT,Return,exec,rofi-launcher"
|
||||
"$modifier ALT,W,exec,centerwindow"
|
||||
"$modifier,W,exec,${browser}"
|
||||
"$modifier,Y,exec,thunar"
|
||||
"$modifier,S,exec,screenshotit"
|
||||
"$modifier,D,exec,vesktop"
|
||||
"$modifier,C,exec,hyprpicker -a"
|
||||
"$modifier,Q,killactive,"
|
||||
"$modifier,F,fullscreen,"
|
||||
"$modifier,V,togglefloating,"
|
||||
"$modifier,L,exec,hyprlock --immediate -q"
|
||||
"$modifier SHIFT,M,exit,"
|
||||
"$modifier SHIFT,left,movewindow,l"
|
||||
"$modifier SHIFT,right,movewindow,r"
|
||||
"$modifier SHIFT,up,movewindow,u"
|
||||
"$modifier SHIFT,down,movewindow,d"
|
||||
"$modifier ALT, left, swapwindow,l"
|
||||
"$modifier ALT, right, swapwindow,r"
|
||||
"$modifier ALT, up, swapwindow,u"
|
||||
"$modifier ALT, down, swapwindow,d"
|
||||
"$modifier,left,movefocus,l"
|
||||
"$modifier,right,movefocus,r"
|
||||
"$modifier,up,movefocus,u"
|
||||
"$modifier,down,movefocus,d"
|
||||
"$modifier,1,workspace,1"
|
||||
"$modifier,2,workspace,2"
|
||||
"$modifier,3,workspace,3"
|
||||
"$modifier,4,workspace,4"
|
||||
"$modifier,5,workspace,5"
|
||||
"$modifier,6,workspace,6"
|
||||
"$modifier,7,workspace,7"
|
||||
"$modifier,8,workspace,8"
|
||||
"$modifier,9,workspace,9"
|
||||
"$modifier,0,workspace,10"
|
||||
"$modifier SHIFT,1,movetoworkspace,1"
|
||||
"$modifier SHIFT,2,movetoworkspace,2"
|
||||
"$modifier SHIFT,3,movetoworkspace,3"
|
||||
"$modifier SHIFT,4,movetoworkspace,4"
|
||||
"$modifier SHIFT,5,movetoworkspace,5"
|
||||
"$modifier SHIFT,6,movetoworkspace,6"
|
||||
"$modifier SHIFT,7,movetoworkspace,7"
|
||||
"$modifier SHIFT,8,movetoworkspace,8"
|
||||
"$modifier SHIFT,9,movetoworkspace,9"
|
||||
"$modifier SHIFT,0,movetoworkspace,10"
|
||||
"$modifier CONTROL,right,workspace,e+1"
|
||||
"$modifier CONTROL,left,workspace,e-1"
|
||||
"$modifier,mouse_down,workspace, e+1"
|
||||
"$modifier,mouse_up,workspace, e-1"
|
||||
"ALT,Tab,cyclenext"
|
||||
"ALT,Tab,bringactivetotop"
|
||||
",XF86AudioRaiseVolume,exec,volumeup"
|
||||
",XF86AudioLowerVolume,exec,volumedown"
|
||||
",XF86AudioMute,exec,volumemute"
|
||||
",XF86MonBrightnessDown,exec,brightnessctl set 5%-"
|
||||
",XF86MonBrightnessUp,exec,brightnessctl set +5%"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$modifier, mouse:272, movewindow"
|
||||
"$modifier, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
13
modules/home/hyprland/default.nix
Normal file
13
modules/home/hyprland/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ imports, host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) animChoice;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
animChoice
|
||||
./binds.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./windowrules.nix
|
||||
];
|
||||
}
|
161
modules/home/hyprland/hyprland.nix
Normal file
161
modules/home/hyprland/hyprland.nix
Normal file
|
@ -0,0 +1,161 @@
|
|||
{ host, profile, config, pkgs, ... }:
|
||||
let
|
||||
inherit
|
||||
(import ../../../hosts/${host}/variables.nix)
|
||||
extraMonitorSettings
|
||||
keyboardLayout
|
||||
stylixImage
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
swappy
|
||||
hyprpolkitagent
|
||||
hyprland-qtutils
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
systemd = {
|
||||
enable = true;
|
||||
enableXdgAutostart = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
xwayland.enable = true;
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
"killall -q swww; sleep .5 && swww init"
|
||||
"killall -q waybar; sleep .5 && waybar"
|
||||
"nm-applet --indicator"
|
||||
"sleep 1.5 && swww img ${stylixImage}"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "${keyboardLayout}";
|
||||
numlock_by_default = true;
|
||||
repeat_delay = 300;
|
||||
follow_mouse = 1;
|
||||
float_switch_override_focus = 0;
|
||||
sensitivity = -0.5;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
scroll_factor = 0.8;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = 1;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_distance = 500;
|
||||
workspace_swipe_invert = 1;
|
||||
workspace_swipe_min_speed_to_force = 30;
|
||||
workspace_swipe_cancel_ratio = 0.5;
|
||||
workspace_swipe_create_new = 1;
|
||||
workspace_swipe_forever = 1;
|
||||
};
|
||||
|
||||
general = {
|
||||
"$modifier" = "SUPER";
|
||||
layout = "dwindle";
|
||||
gaps_in = 6;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
resize_on_border = true;
|
||||
"col.active_border" = "rgb(${config.lib.stylix.colors.base08}) rgb(${config.lib.stylix.colors.base0C}) 45deg";
|
||||
"col.inactive_border" = "rgb(${config.lib.stylix.colors.base01})";
|
||||
};
|
||||
|
||||
misc = {
|
||||
layers_hog_keyboard_focus = true;
|
||||
initial_workspace_tracking = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
#disable_swallow = false;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 3;
|
||||
ignore_opacity = false;
|
||||
new_optimizations = true;
|
||||
};
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
sync_gsettings_theme = true;
|
||||
no_hardware_cursors = 1;
|
||||
enable_hyprcursor = false;
|
||||
warp_on_change_workspace = 2;
|
||||
no_warps = true;
|
||||
};
|
||||
|
||||
render = {
|
||||
explicit_sync = 1; # 1 = disable
|
||||
explicit_sync_kms = 1;
|
||||
direct_scanout = 0;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
new_on_top = 1;
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
"NIXPKGS_ALLOW_UNFREE, 1"
|
||||
"XDG_CURRENT_DESKTOP, Hyprland"
|
||||
"XDG_SESSION_TYPE, wayland"
|
||||
"XDG_SESSION_DESKTOP, Hyprland"
|
||||
"GDK_BACKEND, wayland, x11"
|
||||
"CLUTTER_BACKEND, wayland"
|
||||
"QT_QPA_PLATFORM=wayland;xcb"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR, 1"
|
||||
"SDL_VIDEODRIVER, wayland"
|
||||
"MOZ_ENABLE_WAYLAND, 1"
|
||||
"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1"#,/dev/dri/card1:/dev/dri/card0"
|
||||
"GDK_SCALE,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
"EDITOR,vim"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
]; #++ (if profile == "nvidia" || profile == "nvidia-laptop" then [ "LIBVA_DRIVER_NAME,nvidia" "__GLX_VENDOR_LIBRARY_NAME,nvidia" ] else []); #++ (if profile == "nvidia" || profile == "nvidia-laptop" then [ "LIBVA_DRIVER_NAME,nvidia" "GBM_BACKEND,nvidia-drm" "WLR_DRM_NO_ATOMIC,1" "__GLX_VENDOR_LIBRARY_NAME,nvidia" "__NV_PRIME_RENDER_OFFLOAD,1" "__VK_LAYER_NV_optimus,NVIDIA_onky" "WLR_NO_HARDWARE_CURSORS,1" "WLR_RENDERER_ALLOW_SOFTWARE,1" "MOZ_DISABLE_RDD_SANDBOX,1" "EGL_PLATFORM,wayland" ] else []);
|
||||
};
|
||||
|
||||
extraConfig = if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}";
|
||||
#extraConfig = "opengl { nvidia_anti_flicker=false }";
|
||||
#extraConfig = "" + (if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}") + (if profile == "nvidia" || profile == "nvidia-laptop" then "opengl { nvidia_anti_flicker=false }" else "");
|
||||
#extraConfig = "" + (if extraMonitorSettings == "" then "monitor=,preferred,auto,auto" else "${extraMonitorSettings}") + (if profile == "nvidia" || profile == "nvidia-laptop" then "cursor { no_hardware_cursors = true }" else "");
|
||||
};
|
||||
}
|
39
modules/home/hyprland/hyprlock.nix
Normal file
39
modules/home/hyprland/hyprlock.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ username, ... }:
|
||||
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
#no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "/home/${username}/Pictures/Wallpapers/hyprlock.jpg";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_color = "rgb(CFE6F4)";
|
||||
inner_color = "rgb(657DC2)";
|
||||
outer_color = "rgb(0D0E15)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
75
modules/home/hyprland/windowrules.nix
Normal file
75
modules/home/hyprland/windowrules.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ host, ... }:
|
||||
let
|
||||
inherit (import ../../../hosts/${host}/variables.nix) extraMonitorSettings;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
windowrulev2 = [
|
||||
"tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$"
|
||||
"tag +terminal, class:^(Alacritty|kitty|kitty-dropterm)$"
|
||||
"tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Ff]irefox|org.mozilla.firefox|[Ff]irefox-esr)$"
|
||||
"tag +browser, class:^([Gg]oogle-chrome(-beta|-dev|-unstable)?)$"
|
||||
"tag +browser, class:^([Tt]horium-browser|[Cc]achy-browser)$"
|
||||
"tag +projects, class:^(codium|codium-url-handler|VSCodium)$"
|
||||
"tag +projects, class:^(VSCode|code-url-handler)$"
|
||||
"tag +projects, class:^(zed)$"
|
||||
"tag +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$"
|
||||
"tag +games, class:^(gamescope)$"
|
||||
"tag +games, class:^(steam_app_\d+)$"
|
||||
"tag +gamestore, class:^([Ss]team)$"
|
||||
"tag +gamestore, title:^([Ll]utris)$"
|
||||
"tag +settings, class:^([Rr]ofi)$"
|
||||
"tag +settings, class:^(file-roller|org.gnome.FileRoller)$"
|
||||
"tag +settings, class:^(nm-applet|nm-connection-editor|blueman-manager)$"
|
||||
"tag +settings, class:(xdg-desktop-portal-gtk)"
|
||||
"move 72% 7%,title:^(Picture-in-Picture)$"
|
||||
"center, title:^(Authentication Required)$"
|
||||
"center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
||||
"idleinhibit fullscreen, class:^(*)$"
|
||||
"idleinhibit fullscreen, title:^(*)$"
|
||||
"idleinhibit fullscreen, fullscreen:1"
|
||||
"float, tag:settings*"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"float, title:^(Authentication Required)$"
|
||||
"float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*)"
|
||||
"float, class:^([Ss]team)$, title:negative:^([Ss]team)$"
|
||||
"float, initialTitle:(Add Folder to Workspace)"
|
||||
"float, initialTitle:(Open Files)"
|
||||
"float, initialTitle:(wants to save)"
|
||||
"size 70% 60%, initialTitle:(Open Files)"
|
||||
"size 70% 60%, initialTitle:(Add Folder to Workspace)"
|
||||
"size 70% 70%, tag:settings*"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
"keepaspectratio, title:^(Picture-in-Picture)$"
|
||||
"noblur, tag:games*"
|
||||
"fullscreen, tag:games*"
|
||||
];
|
||||
|
||||
#env = [
|
||||
# "NIXOS_OZONE_WL, 1"
|
||||
# "NIXPKGS_ALLOW_UNFREE, 1"
|
||||
# "XDG_CURRENT_DESKTOP, Hyprland"
|
||||
# "XDG_SESSION_TYPE, wayland"
|
||||
# "XDG_SESSION_DESKTOP, Hyprland"
|
||||
# "GDK_BACKEND, wayland, x11"
|
||||
# "CLUTTER_BACKEND, wayland"
|
||||
# "QT_QPA_PLATFORM=wayland;xcb"
|
||||
# "QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
|
||||
# "QT_AUTO_SCREEN_SCALE_FACTOR, 1"
|
||||
# "SDL_VIDEODRIVER, x11"
|
||||
# "MOZ_ENABLE_WAYLAND, 1"
|
||||
# "AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0"
|
||||
# "GDK_SCALE,1"
|
||||
# "QT_SCALE_FACTOR,1"
|
||||
# "EDITOR,vim"
|
||||
#];
|
||||
};
|
||||
|
||||
#extraConfig = "
|
||||
# monitor=,preferred,auto,auto
|
||||
# ${extraMonitorSettings}
|
||||
#";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue