initial commit
This commit is contained in:
167
home/hypr/hyprland.nix
Normal file
167
home/hypr/hyprland.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
mod = "SUPER";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
# -----------------------------------------------------------------------
|
||||
# 1. Variables & Modifiers
|
||||
# -----------------------------------------------------------------------
|
||||
"$mod" = mod;
|
||||
"$terminal" = "foot";
|
||||
"$menu" = "rofi -show drun";
|
||||
"$browser" = "brave";
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 2. General, Layout & Decoration
|
||||
# -----------------------------------------------------------------------
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 8;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 0.95;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"easeOutQuint, 0.23, 1, 0.32, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, easeOutQuint"
|
||||
"windowsOut, 1, 3, easeOutQuint, popin 80%"
|
||||
"border, 1, 3, easeOutQuint"
|
||||
"fade, 1, 3, easeOutQuint"
|
||||
"workspaces, 1, 3, easeOutQuint"
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 3. Autostart Daemons & Apps
|
||||
# -----------------------------------------------------------------------
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"dunst"
|
||||
"hypridle"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
];
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 4. Keybindings
|
||||
# -----------------------------------------------------------------------
|
||||
bind = [
|
||||
# Launchers & Applications
|
||||
"$mod, RETURN, exec, $terminal"
|
||||
"$mod, SPACE, exec, $menu"
|
||||
"$mod, B, exec, $browser"
|
||||
"$mod, D, exec, discord"
|
||||
"$mod, E, exec, $terminal -e yazi"
|
||||
"$mod, L, exec, hyprlock"
|
||||
|
||||
# Window Controls
|
||||
"$mod SHIFT, Q, killactive,"
|
||||
"$mod, F, fullscreen, 0"
|
||||
"$mod, V, togglefloating,"
|
||||
"$mod, P, pseudo,"
|
||||
"$mod, J, togglesplit,"
|
||||
|
||||
# Screenshots (Grim + Slurp)
|
||||
"$mod, PRINT, exec, grim -g \"$(slurp)\" - | wl-copy"
|
||||
"$mod SHIFT, PRINT, exec, grim ~/Pictures/Screenshot_$(date +'%Y%m%d_%H%M%S').png"
|
||||
|
||||
# Vim Focus Navigation (H, J, K, L & Arrows)
|
||||
"$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"
|
||||
|
||||
# Vim Window Swapping
|
||||
"$mod SHIFT, left, swapwindow, l"
|
||||
"$mod SHIFT, right, swapwindow, r"
|
||||
"$mod SHIFT, up, swapwindow, u"
|
||||
"$mod SHIFT, down, swapwindow, d"
|
||||
"$mod SHIFT, h, swapwindow, l"
|
||||
"$mod SHIFT, l, swapwindow, r"
|
||||
"$mod SHIFT, k, swapwindow, u"
|
||||
"$mod SHIFT, j, swapwindow, d"
|
||||
|
||||
# Scratchpad / Special Workspace
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
]
|
||||
# Generate Workspace 1-10 switching and moving bindings with a list comprehension
|
||||
++ (map (i: "$mod, ${toString i}, workspace, ${toString i}") (lib.range 1 9))
|
||||
++ [ "$mod, 0, workspace, 10" ]
|
||||
++ (map (i: "$mod SHIFT, ${toString i}, movetoworkspace, ${toString i}") (lib.range 1 9))
|
||||
++ [ "$mod SHIFT, 0, movetoworkspace, 10" ];
|
||||
|
||||
# Locked/repeating bindings (Volume, Media, Brightness)
|
||||
bindle = [
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", 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"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
# Mouse bindings (move/resize floating windows)
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user