mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-03-10 19:18:17 +01:00
273 lines
9.9 KiB
Nix
273 lines
9.9 KiB
Nix
{ host,
|
|
username,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (import ../../../hosts/${host}/variables.nix)
|
|
browser
|
|
terminal
|
|
extraMonitorSettings
|
|
keyboardLayout
|
|
;
|
|
in
|
|
{
|
|
wayland.windowManager.hyprland = {
|
|
settings = {
|
|
exec-once = [
|
|
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
|
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
|
"killall -q swww;sleep .5 && swww init"
|
|
"killall -q waybar;sleep .5 && waybar"
|
|
"killall -q swaync;sleep .5 && swaync"
|
|
"nm-applet --indicator"
|
|
"lxqt-policykit-agent"
|
|
"sleep 1.5 && swww img /home/${username}/Pictures/Wallpapers/zaney-wallpaper.jpg"
|
|
];
|
|
|
|
input = {
|
|
kb_layout = "${keyboardLayout}";
|
|
kb_options = [
|
|
"grp:alt_caps_toggle"
|
|
"caps:super"
|
|
];
|
|
numlock_by_default = true;
|
|
repeat_delay = 300;
|
|
follow_mouse = 1;
|
|
sensitivity = 0;
|
|
touchpad = {
|
|
natural_scroll = true;
|
|
disable_while_typing = true;
|
|
scroll_factor = 0.8;
|
|
};
|
|
};
|
|
|
|
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;
|
|
mouse_move_enables_dpms = true;
|
|
key_press_enables_dpms = 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)";
|
|
};
|
|
};
|
|
|
|
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"
|
|
"fade, 1, 10, default"
|
|
"workspaces, 1, 5, wind"
|
|
];
|
|
};
|
|
|
|
bind = [
|
|
"$modifier,Return,exec,${terminal}"
|
|
"$modifier SHIFT,Return,exec,rofi-launcher"
|
|
"$modifier SHIFT,W,exec,web-search"
|
|
"$modifier ALT,W,exec,wallsetter"
|
|
"$modifier SHIFT,N,exec,swaync-client -rs"
|
|
"$modifier,W,exec,${browser}"
|
|
"$modifier,E,exec,emopicker9000"
|
|
"$modifier,S,exec,screenshootin"
|
|
"$modifier,D,exec,discord"
|
|
"$modifier,O,exec,obs"
|
|
"$modifier,C,exec,hyprpicker -a"
|
|
"$modifier,G,exec,gimp"
|
|
"$modifier SHIFT,G,exec,godot4"
|
|
"$modifier,T,exec,thunar"
|
|
"$modifier,M,exec,spotify"
|
|
"$modifier,Q,killactive,"
|
|
"$modifier,P,pseudo,"
|
|
"$modifier SHIFT,I,togglesplit,"
|
|
"$modifier,F,fullscreen,"
|
|
"$modifier SHIFT,F,togglefloating,"
|
|
"$modifier SHIFT,C,exit,"
|
|
"$modifier SHIFT,left,movewindow,l"
|
|
"$modifier SHIFT,right,movewindow,r"
|
|
"$modifier SHIFT,up,movewindow,u"
|
|
"$modifier SHIFT,down,movewindow,d"
|
|
"$modifier SHIFT,h,movewindow,l"
|
|
"$modifier SHIFT,l,movewindow,r"
|
|
"$modifier SHIFT,k,movewindow,u"
|
|
"$modifier SHIFT,j,movewindow,d"
|
|
"$modifier,left,movefocus,l"
|
|
"$modifier,right,movefocus,r"
|
|
"$modifier,up,movefocus,u"
|
|
"$modifier,down,movefocus,d"
|
|
"$modifier,h,movefocus,l"
|
|
"$modifier,l,movefocus,r"
|
|
"$modifier,k,movefocus,u"
|
|
"$modifier,j,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,SPACE,movetoworkspace,special"
|
|
"$modifier,SPACE,togglespecialworkspace"
|
|
"$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,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
|
",XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
|
" ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
|
",XF86AudioPlay, exec, playerctl play-pause"
|
|
",XF86AudioPause, exec, playerctl play-pause"
|
|
",XF86AudioNext, exec, playerctl next"
|
|
",XF86AudioPrev, exec, playerctl previous"
|
|
",XF86MonBrightnessDown,exec,brightnessctl set 5%-"
|
|
",XF86MonBrightnessUp,exec,brightnessctl set +5%"
|
|
];
|
|
|
|
bindm = [
|
|
"$modifier, mouse:272, movewindow"
|
|
"$modifier, mouse:273, resizewindow"
|
|
];
|
|
|
|
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 +im, class:^([Dd]iscord|[Ww]ebCord|[Vv]esktop)$"
|
|
"tag +im, class:^([Ff]erdium)$"
|
|
"tag +im, class:^([Ww]hatsapp-for-linux)$"
|
|
"tag +im, class:^(org.telegram.desktop|io.github.tdesktop_x64.TDesktop)$"
|
|
"tag +im, class:^(teams-for-linux)$"
|
|
"tag +games, class:^(gamescope)$"
|
|
"tag +games, class:^(steam_app_\d+)$"
|
|
"tag +gamestore, class:^([Ss]team)$"
|
|
"tag +gamestore, title:^([Ll]utris)$"
|
|
"tag +gamestore, class:^(com.heroicgameslauncher.hgl)$"
|
|
"tag +settings, class:^(gnome-disks|wihotspot(-gui)?)$"
|
|
"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:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$"
|
|
"tag +settings, class:^(nwg-look|qt5ct|qt6ct|[Yy]ad)$"
|
|
"tag +settings, class:(xdg-desktop-portal-gtk)"
|
|
"move 72% 7%,title:^(Picture-in-Picture)$"
|
|
"center, class:^([Ff]erdium)$"
|
|
"center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$"
|
|
"center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
|
"center, title:^(Authentication Required)$"
|
|
"idleinhibit fullscreen, class:^(*)$"
|
|
"idleinhibit fullscreen, title:^(*)$"
|
|
"idleinhibit fullscreen, fullscreen:1"
|
|
"float, tag:settings*"
|
|
"float, class:^([Ff]erdium)$"
|
|
"float, title:^(Picture-in-Picture)$"
|
|
"float, class:^(mpv|com.github.rafostar.Clapper)$"
|
|
"float, title:^(Authentication Required)$"
|
|
"float, class:(codium|codium-url-handler|VSCodium), title:negative:(.*codium.*|.*VSCodium.*)"
|
|
"float, class:^(com.heroicgameslauncher.hgl)$, title:negative:(Heroic Games Launcher)"
|
|
"float, class:^([Ss]team)$, title:negative:^([Ss]team)$"
|
|
"float, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)"
|
|
"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*"
|
|
"size 60% 70%, class:^([Ff]erdium)$"
|
|
"opacity 1.0 1.0, tag:browser*"
|
|
"opacity 0.9 0.8, tag:projects*"
|
|
"opacity 0.94 0.86, tag:im*"
|
|
"opacity 0.9 0.8, tag:file-manager*"
|
|
"opacity 0.8 0.7, tag:terminal*"
|
|
"opacity 0.8 0.7, tag:settings*"
|
|
"opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$"
|
|
"opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui"
|
|
"opacity 0.95 0.75, title:^(Picture-in-Picture)$"
|
|
"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"
|
|
];
|
|
};
|
|
|
|
extraConfig = "
|
|
monitor=,preferred,auto,auto
|
|
${extraMonitorSettings}
|
|
";
|
|
};
|
|
}
|