Initial commit

This commit is contained in:
2025-11-28 01:41:57 +01:00
commit 0be86c7284
113 changed files with 8498 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
{config, ...}: let
animationSpeed = config.theme.animation-speed;
animationDuration =
if animationSpeed == "slow"
then "4"
else if animationSpeed == "medium"
then "2.5"
else "1.5";
borderDuration =
if animationSpeed == "slow"
then "10"
else if animationSpeed == "medium"
then "6"
else "3";
in {
wayland.windowManager.hyprland.settings = {
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"
];
animation = [
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
"border, 1, ${borderDuration}, default"
"fade, 1, ${animationDuration}, md3_decel"
"layersIn, 1, ${animationDuration}, menu_decel, slide"
"layersOut, 1, ${animationDuration}, menu_accel"
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
"workspaces, 1, ${animationDuration}, menu_decel, slide"
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
];
};
};
}

View File

@@ -0,0 +1,75 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
bind = [
"$mod, return, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Ghostty (terminal)
#"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod, b, exec, uwsm app -- ${pkgs.brave}/bin/brave" # Brave Browser
"$mod, m, exec, uwsm app -- ${pkgs.thunderbird}/bin/thunderbird" # Proton Mail
#"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod, space, exec, vicinae toggle" # Launcher FIXME: broken
#"$mod,X, exec, powermenu" # Powermenu
#"$mod, space, exec, menu" # Launcher
"$shiftMod, space, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod, q, killactive," # Close window
"$mod, t, togglefloating," # Toggle Floating
"$mod, f, fullscreen" # Toggle Fullscreen
"$mod, j, layoutmsg, cyclenext" # Move focus Down
"$mod, k, layoutmsg, cycleprev" # Move focus Up
"$altMod, j, layoutmsg, swapnext" # Move focus Down
"$altMod, k, layoutmsg, swapprev" # Move focus Up
"$mod, x, focusmonitor, +1" # Focus next monitor
"$altMod, x, movewindow, mon:+1"
"$altMod, h, layoutmsg, addmaster" # Add to master
"$altMod, l, layoutmsg, removemaster" # Remove from master
"$mod, print, exec, screenshot region" # Screenshot region
", PRINT, exec, screenshot monitor" # Screenshot monitor
"$mod, w, workspace, 1"
"$mod, e, workspace, 2"
"$mod, r, workspace, 3"
"$mod, i, workspace, 11"
"$mod, o, workspace, 12"
"$mod, p, workspace, 13"
"$altMod, w, movetoworkspace, 1"
"$altMod, e, movetoworkspace, 2"
"$altMod, r, movetoworkspace, 3"
"$altMod, i, movetoworkspace, 11"
"$altMod, o, movetoworkspace, 12"
"$altMod, p, movetoworkspace, 13"
"$mod, z, togglespecialworkspace, scratchpad"
];
bindm = [
"$mod, mouse:272, movewindow" # Move Window (mouse)
"$mod, mouse:274, resizewindow" # Resize Window (mouse)
];
binde = [
"$mod, h, layoutmsg, mfact -0.01" # Move focus left
"$mod, l, layoutmsg, mfact +0.01" # Move focus Right
];
bindl = [
",XF86AudioMute, exec, sound-toggle" # Toggle Mute
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" # Play/Pause Song
",XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next" # Next Song
",XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous" # Previous Song
",switch:Lid Switch, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock when closing Lid
];
bindle = [
",XF86AudioRaiseVolume, exec, sound-up" # Sound Up
",XF86AudioLowerVolume, exec, sound-down" # Sound Down
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
};
}

View File

@@ -0,0 +1,184 @@
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{
pkgs,
config,
lib,
...
}:
let
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
gaps-out = config.theme.gaps-out;
active-opacity = config.theme.active-opacity;
inactive-opacity = config.theme.inactive-opacity;
rounding = config.theme.rounding;
blur = config.theme.blur;
keyboardLayout = config.var.keyboardLayout;
background = "rgb(" + config.lib.stylix.colors.base00 + ")";
in
{
imports = [
./animations.nix
./bindings.nix
./polkitagent.nix
];
home.packages = with pkgs; [
qt5.qtwayland
qt6.qtwayland
libsForQt5.qt5ct
qt6Packages.qt6ct
hyprshot
hyprpicker
swappy
imv
wf-recorder
wlr-randr
wl-clipboard
brightnessctl
gnome-themes-extra
libva
dconf
wayland-utils
wayland-protocols
glib
direnv
meson
];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd = {
enable = false;
variables = [
"--all"
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
};
package = null;
portalPackage = null;
settings = {
"$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
"$altMod" = "SUPER_ALT";
exec-once = [
"systemctl --user enable --now hyprpaper.service &"
];
monitor = config.var.hyprland.monitor;
env = [
"XDG_CURRENT_DESKTOP,Hyprland"
"MOZ_ENABLE_WAYLAND,1"
"ANKI_WAYLAND,1"
"DISABLE_QT5_COMPAT,0"
"NIXOS_OZONE_WL,1"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_QPA_PLATFORM=wayland,xcb"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"__GL_GSYNC_ALLOWED,0"
"__GL_VRR_ALLOWED,0"
"DISABLE_QT5_COMPAT,0"
"DIRENV_LOG_FORMAT,"
"WLR_DRM_NO_ATOMIC,1"
"WLR_BACKEND,vulkan"
"WLR_RENDERER,vulkan"
"WLR_NO_HARDWARE_CURSORS,1"
"SDL_VIDEODRIVER,wayland"
"CLUTTER_BACKEND,wayland"
];
workspace = config.var.hyprland.workspace ++ [
"special:scratchpad, on-created-empty:[float; size monitor_w/1.5 monitor_h/1.5; center] $TERMINAL"
];
cursor = {
no_hardware_cursors = true;
default_monitor = "0";
};
general = {
resize_on_border = true;
gaps_in = gaps-in;
gaps_out = gaps-out;
border_size = border-size;
layout = "master";
"col.inactive_border" = lib.mkForce background;
};
decoration = {
dim_special = 0.3;
active_opacity = active-opacity;
inactive_opacity = inactive-opacity;
rounding = rounding;
shadow = {
enabled = true;
range = 20;
render_power = 3;
};
blur = {
enabled = if blur then "true" else "false";
size = 18;
};
};
master = {
new_status = true;
allow_small_split = true;
mfact = 0.65;
};
misc = {
vfr = true;
disable_hyprland_logo = true;
disable_splash_rendering = true;
disable_autoreload = false;
focus_on_activate = true;
new_window_takes_over_fullscreen = 2;
};
windowrule = [
"match:title hyprpanel-settings, float on"
"match:class xdg-desktop-portal-gtk, float on, center on, size monitor_w/2 monitor_h/2"
# Bitwarden extension
# idle inhibit while watching videos
#"idleinhibit focus, class:^(mpv|.+exe|celluloid)$"
#"idleinhibit focus, class:^(zen)$, title:^(.*YouTube.*)$"
#"idleinhibit fullscreen, class:^(zen)$"
#"dimaround, class:^(gcr-prompter)$"
#"dimaround, class:^(xdg-desktop-portal-gtk)$"
#"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
#"dimaround, class:^(zen)$, title:^(File Upload)$"
];
layerrule = [
"match:namespace vicinae, no_anim on, blur on, ignore_alpha 0"
#"no_anim, launcher"
#"no_anim, ^ags-.*"
];
input = {
kb_layout = keyboardLayout;
kb_options = "caps:escape";
follow_mouse = 1;
sensitivity = 0.5;
repeat_delay = 300;
repeat_rate = 50;
numlock_by_default = true;
touchpad = {
natural_scroll = true;
clickfinger_behavior = true;
};
};
};
};
}

View File

@@ -0,0 +1,6 @@
# HyprPolkitAgent is a simple polkit agent for wayland compositors
{pkgs, ...}: {
home.packages = with pkgs; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}