Migrate Hyprland to Lua config, drop dead flake inputs, general cleanup
Hyprland - Switch wayland.windowManager.hyprland to configType = "lua" (Hyprland 0.56) - Convert settings, env, monitors, window rules, gesture, animations (hl.curve/hl.animation) and all keybinds to hl.* calls - Add home/system/hyprland/lib.nix with exec/bind/execOnce helpers; every exec-once now runs from a hyprland.start hook - Drop hard-coded default_monitor = "eDP-2" Flake - Remove blog, awesome-wallpapers and default-creds inputs (their repos no longer ship a flake.nix and broke `nix flake update`), along with the server modules and Glance links that used them - Update flake.lock - Replace removed `gcr` with `gcr_4` Fixes - Point configDirectory at /etc/nixos/nixy on home-pc and thinkpad - Fix home-pc git email typo - Remove conflicting openpgp signing format, make pull.rebase a boolean, replace hx/peco in git aliases with nvim/sk - Fix zsh NUL alias (2>&1) and stop forcing bat colors in the cat alias - Require a password for sudo again (nixos-rebuild stays NOPASSWD) - Remove duplicate hardware.graphics block from home-pc flake - Delete unused zen .old files, run alejandra on host files
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||
in {
|
||||
imports = [
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
./bar.nix
|
||||
@@ -50,7 +52,7 @@
|
||||
gpu-screen-recorder
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||
"uwsm app -- caelestia resizer -d"
|
||||
"uwsm app -- caelestia shell -d"
|
||||
"caelestia scheme set -n onedark"
|
||||
|
||||
@@ -1,52 +1,67 @@
|
||||
{config, ...}: let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
animationSpeed = config.theme.animation-speed;
|
||||
|
||||
animationDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "4"
|
||||
then 4
|
||||
else if animationSpeed == "medium"
|
||||
then "2.5"
|
||||
else "1.5";
|
||||
then 2.5
|
||||
else 1.5;
|
||||
borderDuration =
|
||||
if animationSpeed == "slow"
|
||||
then "10"
|
||||
then 10
|
||||
else if animationSpeed == "medium"
|
||||
then "6"
|
||||
else "3";
|
||||
then 6
|
||||
else 3;
|
||||
bezier = points: {
|
||||
type = "bezier";
|
||||
inherit points;
|
||||
};
|
||||
curves = {
|
||||
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]];
|
||||
};
|
||||
|
||||
anim = leaf: speed: bezier: extra:
|
||||
{
|
||||
inherit leaf speed bezier;
|
||||
enabled = true;
|
||||
}
|
||||
// extra;
|
||||
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"
|
||||
];
|
||||
config.animations.enabled = true;
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
curve = lib.mapAttrsToList (name: points: {_args = [name (bezier points)];}) curves;
|
||||
|
||||
animation = [
|
||||
(anim "windows" animationDuration "md3_decel" {style = "popin 60%";})
|
||||
(anim "windowsIn" animationDuration "md3_decel" {style = "popin 60%";})
|
||||
(anim "windowsOut" animationDuration "md3_accel" {style = "popin 60%";})
|
||||
(anim "border" borderDuration "default" {})
|
||||
(anim "fade" animationDuration "md3_decel" {})
|
||||
(anim "layersIn" animationDuration "menu_decel" {style = "slide";})
|
||||
(anim "layersOut" animationDuration "menu_accel" {})
|
||||
(anim "fadeLayersIn" animationDuration "menu_decel" {})
|
||||
(anim "fadeLayersOut" animationDuration "menu_accel" {})
|
||||
(anim "workspaces" animationDuration "menu_decel" {style = "slide";})
|
||||
(anim "specialWorkspace" animationDuration "md3_decel" {style = "slidevert";})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,26 +4,25 @@
|
||||
config,
|
||||
pkgs-nur-hadi,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
hl = import ./lib.nix {inherit lib;};
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
mkMenu = menu:
|
||||
let
|
||||
configFile = pkgs.writeText "config.yaml" (
|
||||
lib.generators.toYAML { } {
|
||||
anchor = "bottom-right";
|
||||
border = "#${colors.base0D}80";
|
||||
background = "#${colors.base01}EE";
|
||||
color = "#${colors.base05}";
|
||||
margin_right = 15;
|
||||
margin_bottom = 15;
|
||||
rows_per_column = 5;
|
||||
mkMenu = menu: let
|
||||
configFile = pkgs.writeText "config.yaml" (
|
||||
lib.generators.toYAML {} {
|
||||
anchor = "bottom-right";
|
||||
border = "#${colors.base0D}80";
|
||||
background = "#${colors.base01}EE";
|
||||
color = "#${colors.base05}";
|
||||
margin_right = 15;
|
||||
margin_bottom = 15;
|
||||
rows_per_column = 5;
|
||||
|
||||
inherit menu;
|
||||
}
|
||||
);
|
||||
in
|
||||
inherit menu;
|
||||
}
|
||||
);
|
||||
in
|
||||
pkgs.writeShellScriptBin "menu" ''
|
||||
exec ${lib.getExe pkgs.wlr-which-key} ${configFile}
|
||||
'';
|
||||
@@ -220,18 +219,12 @@ let
|
||||
cmd = "systemctl reboot";
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$shiftMod" = "SUPER_SHIFT";
|
||||
|
||||
bind =
|
||||
[
|
||||
# Applications
|
||||
(
|
||||
"$shiftMod, A, exec, "
|
||||
+ lib.getExe (mkMenu [
|
||||
(hl.bind "SUPER + SHIFT + A" (hl.exec (lib.getExe (mkMenu [
|
||||
{
|
||||
key = "a";
|
||||
desc = "Apps";
|
||||
@@ -257,15 +250,13 @@ in
|
||||
desc = "System";
|
||||
cmd = lib.getExe systemMenu;
|
||||
}
|
||||
])
|
||||
)
|
||||
])))
|
||||
null)
|
||||
|
||||
"$mod,B, exec, uwsm app -- ${config.programs.librewolf.package}/bin/helium" # Browser
|
||||
(hl.bind "SUPER + B" (hl.exec "uwsm app -- ${config.programs.librewolf.package}/bin/helium") null) # Browser
|
||||
|
||||
# Power
|
||||
(
|
||||
"$mod, X, exec, "
|
||||
+ lib.getExe (mkMenu [
|
||||
(hl.bind "SUPER + X" (hl.exec (lib.getExe (mkMenu [
|
||||
{
|
||||
key = "l";
|
||||
desc = "Lock";
|
||||
@@ -296,69 +287,100 @@ in
|
||||
desc = "Restart Waybar";
|
||||
cmd = "pkill -x waybar; waybar";
|
||||
}
|
||||
])
|
||||
)
|
||||
])))
|
||||
null)
|
||||
|
||||
# Quick launch
|
||||
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
|
||||
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
|
||||
"$mod, SPACE, exec, walker" # Launcher
|
||||
"$mod, N, exec, ${lib.getExe pkgs.grimblast} save area" # Save screenshot
|
||||
"$mod, D, exec, ${lib.getExe pkgs.grimblast} copy area" # Copy screenshot
|
||||
(hl.bind "SUPER + RETURN" (hl.exec "uwsm app -- ${pkgs.ghostty}/bin/ghostty") null) # Ghostty (terminal)
|
||||
(hl.bind "SUPER + E" (hl.exec "uwsm app -- ${pkgs.thunar}/bin/thunar") null) # Thunar
|
||||
(hl.bind "SUPER + SPACE" (hl.exec "walker") null) # Launcher
|
||||
(hl.bind "SUPER + N" (hl.exec "${lib.getExe pkgs.grimblast} save area") null) # Save screenshot
|
||||
(hl.bind "SUPER + D" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Copy screenshot
|
||||
|
||||
# Windows
|
||||
"$mod,Q, killactive," # Close window
|
||||
"$mod,F, fullscreen" # Toggle Fullscreen
|
||||
"$shiftMod,F, togglefloating," # Toggle Floating
|
||||
(hl.bind "SUPER + Q" (hl.mkLuaInline "hl.dsp.window.close()") null) # Close window
|
||||
(hl.bind "SUPER + F" (hl.mkLuaInline ''hl.dsp.window.fullscreen({ mode = "fullscreen" })'') null) # Toggle Fullscreen
|
||||
(hl.bind "SUPER + SHIFT + F" (hl.mkLuaInline ''hl.dsp.window.float({ action = "toggle" })'') null) # Toggle Floating
|
||||
|
||||
# Focus Windows
|
||||
"$mod,H, movefocus, l" # Move focus left
|
||||
"$mod,J, movefocus, d" # Move focus Down
|
||||
"$mod,K, movefocus, u" # Move focus Up
|
||||
"$mod,L, movefocus, r" # Move focus Right
|
||||
"$shiftMod,H, focusmonitor, -1" # Focus previous monitor
|
||||
"$shiftMod,J, layoutmsg, removemaster" # Remove from master
|
||||
"$shiftMod,K, layoutmsg, addmaster" # Add to master
|
||||
"$shiftMod,L, focusmonitor, 1" # Focus next monitor
|
||||
(hl.bind "SUPER + H" (hl.mkLuaInline ''hl.dsp.focus({ direction = "left" })'') null) # Move focus left
|
||||
(hl.bind "SUPER + J" (hl.mkLuaInline ''hl.dsp.focus({ direction = "down" })'') null) # Move focus Down
|
||||
(hl.bind "SUPER + K" (hl.mkLuaInline ''hl.dsp.focus({ direction = "up" })'') null) # Move focus Up
|
||||
(hl.bind "SUPER + L" (hl.mkLuaInline ''hl.dsp.focus({ direction = "right" })'') null) # Move focus Right
|
||||
(hl.bind "SUPER + SHIFT + H" (hl.mkLuaInline ''hl.dsp.focus({ monitor = "-1" })'') null) # Focus previous monitor
|
||||
(hl.bind "SUPER + SHIFT + J" (hl.mkLuaInline ''hl.dsp.layout("removemaster")'') null) # Remove from master
|
||||
(hl.bind "SUPER + SHIFT + K" (hl.mkLuaInline ''hl.dsp.layout("addmaster")'') null) # Add to master
|
||||
(hl.bind "SUPER + SHIFT + L" (hl.mkLuaInline ''hl.dsp.focus({ monitor = "+1" })'') null) # Focus next monitor
|
||||
|
||||
# Utilities
|
||||
"$shiftMod, S, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region
|
||||
", Print, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region
|
||||
"$shiftMod+Alt, S, exec, ${lib.getExe pkgs.grimblast} save area" # Capture region
|
||||
(hl.bind "SUPER + SHIFT + S" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Capture region
|
||||
(hl.bind "Print" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Capture region
|
||||
(hl.bind "SUPER + SHIFT + ALT + S" (hl.exec "${lib.getExe pkgs.grimblast} save area") null) # Capture region
|
||||
]
|
||||
# Workspaces: keycodes 10-18 are the number row keys 1-9
|
||||
++ (builtins.concatLists (
|
||||
builtins.genList (
|
||||
i: let
|
||||
ws = i + 1;
|
||||
ws = toString (i + 1);
|
||||
in [
|
||||
"$mod,code:1${toString i}, workspace, ${toString ws}"
|
||||
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
|
||||
(hl.bind "SUPER + code:1${toString i}" (hl.mkLuaInline "hl.dsp.focus({ workspace = ${ws} })") null)
|
||||
(hl.bind "SUPER + SHIFT + code:1${toString i}" (hl.mkLuaInline "hl.dsp.window.move({ workspace = ${ws} })") null)
|
||||
]
|
||||
)
|
||||
9
|
||||
));
|
||||
))
|
||||
# Mouse
|
||||
++ [
|
||||
(hl.bind "SUPER + mouse:272" (hl.mkLuaInline "hl.dsp.window.drag()") {mouse = true;}) # Move Window (mouse)
|
||||
(hl.bind "SUPER + R" (hl.mkLuaInline "hl.dsp.window.resize()") {mouse = true;}) # Resize Window (mouse)
|
||||
]
|
||||
# Locked (also work on the lockscreen)
|
||||
++ (map (b: hl.bind b.key (hl.exec b.cmd) {locked = true;}) [
|
||||
# Brightness
|
||||
{
|
||||
key = "XF86MonBrightnessUp";
|
||||
cmd = "${lib.getExe pkgs.brightnessctl} set 5%+";
|
||||
}
|
||||
{
|
||||
key = "XF86MonBrightnessDown";
|
||||
cmd = "${lib.getExe pkgs.brightnessctl} set 5%-";
|
||||
}
|
||||
|
||||
bindm = [
|
||||
"$mod,mouse:272, movewindow" # Move Window (mouse)
|
||||
"$mod,R, resizewindow" # Resize Window (mouse)
|
||||
];
|
||||
# Media
|
||||
{
|
||||
key = "XF86AudioPlay";
|
||||
cmd = "${lib.getExe pkgs.playerctl} play-pause";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioPause";
|
||||
cmd = "${lib.getExe pkgs.playerctl} play-pause";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioNext";
|
||||
cmd = "${lib.getExe pkgs.playerctl} next";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioPrev";
|
||||
cmd = "${lib.getExe pkgs.playerctl} previous";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioStop";
|
||||
cmd = "${lib.getExe pkgs.playerctl} stop";
|
||||
}
|
||||
|
||||
bindl = [
|
||||
# Brightness
|
||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%-"
|
||||
|
||||
# Media
|
||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioPause, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
||||
|
||||
# Sound
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
# Sound
|
||||
{
|
||||
key = "XF86AudioMute";
|
||||
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioRaiseVolume";
|
||||
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
}
|
||||
{
|
||||
key = "XF86AudioLowerVolume";
|
||||
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
}
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
||||
+126
-104
@@ -14,6 +14,7 @@
|
||||
blur = config.theme.blur;
|
||||
keyboardLayout = config.var.keyboardLayout;
|
||||
background = "rgba(" + config.lib.stylix.colors.base00 + "EE)";
|
||||
hl = import ./lib.nix {inherit lib;};
|
||||
in {
|
||||
imports = [
|
||||
./animations.nix
|
||||
@@ -48,7 +49,7 @@ in {
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
configType = "hyprlang";
|
||||
configType = "lua";
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = false;
|
||||
@@ -60,116 +61,137 @@ in {
|
||||
portalPackage = null;
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
on = hl.execOnce [
|
||||
"dbus-update-activation-environment --systemd --all &"
|
||||
];
|
||||
|
||||
# default for every monitor without an explicit rule (hosts add their own)
|
||||
monitor = [
|
||||
",prefered,auto,1" # default
|
||||
{
|
||||
output = "";
|
||||
mode = "preferred";
|
||||
position = "auto";
|
||||
scale = 1;
|
||||
}
|
||||
];
|
||||
|
||||
env = [
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"ANKI_WAYLAND,1"
|
||||
"DISABLE_QT5_COMPAT,0"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_QPA_PLATFORM,wayland;xcb"
|
||||
"QT_QPA_PLATFORMTHEME,gtk3"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"DIRENV_LOG_FORMAT,"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"CLUTTER_BACKEND,wayland"
|
||||
env = lib.mapAttrsToList (name: value: {_args = [name value];}) {
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
ANKI_WAYLAND = "1";
|
||||
DISABLE_QT5_COMPAT = "0";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
};
|
||||
|
||||
config = {
|
||||
cursor.no_hardware_cursors = true;
|
||||
|
||||
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 = {
|
||||
active_opacity = active-opacity;
|
||||
inactive_opacity = inactive-opacity;
|
||||
inherit rounding;
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 20;
|
||||
render_power = 3;
|
||||
};
|
||||
blur = {
|
||||
enabled = blur;
|
||||
size = 18;
|
||||
};
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "slave";
|
||||
allow_small_split = true;
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_autoreload = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = keyboardLayout;
|
||||
|
||||
kb_options = "caps:escape";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0.0; # or whatever speed you prefer
|
||||
accel_profile = "flat";
|
||||
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 50;
|
||||
numlock_by_default = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
ecosystem.no_update_news = true;
|
||||
};
|
||||
|
||||
gesture = {
|
||||
fingers = 3;
|
||||
direction = "horizontal";
|
||||
action = "workspace";
|
||||
};
|
||||
|
||||
window_rule = [
|
||||
{
|
||||
name = "suppress-maximize";
|
||||
match.class = ".*";
|
||||
suppress_event = "maximize";
|
||||
}
|
||||
{
|
||||
name = "helium-fullscreen";
|
||||
match.class = "helium";
|
||||
suppress_event = "fullscreen";
|
||||
sync_fullscreen = false;
|
||||
}
|
||||
{
|
||||
name = "proton-authenticator";
|
||||
match.class = "proton-authenticator";
|
||||
float = true;
|
||||
center = true;
|
||||
size = [500 400];
|
||||
}
|
||||
{
|
||||
name = "protonvpn-app";
|
||||
match.class = "protonvpn-app";
|
||||
float = true;
|
||||
center = true;
|
||||
size = [500 400];
|
||||
}
|
||||
{
|
||||
name = "run-bg";
|
||||
match.title = "run-bg";
|
||||
float = true;
|
||||
center = true;
|
||||
size = [700 80];
|
||||
}
|
||||
];
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
default_monitor = "eDP-2";
|
||||
};
|
||||
|
||||
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 = {
|
||||
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 = "slave";
|
||||
allow_small_split = true;
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
gesture = "3, horizontal, workspace";
|
||||
|
||||
windowrule = [
|
||||
"match:class .*, suppress_event maximize"
|
||||
"match:class helium, suppress_event fullscreen"
|
||||
"match:class helium, sync_fullscreen false"
|
||||
|
||||
"match:class proton-authenticator, float on"
|
||||
"match:class proton-authenticator, center on"
|
||||
"match:class proton-authenticator, size 500 400"
|
||||
|
||||
"match:class protonvpn-app, float on"
|
||||
"match:class protonvpn-app, center on"
|
||||
"match:class protonvpn-app, size 500 400"
|
||||
|
||||
"match:title run-bg, float on"
|
||||
"match:title run-bg, center on"
|
||||
"match:title run-bg, size 700 80"
|
||||
];
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_autoreload = true;
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = keyboardLayout;
|
||||
|
||||
kb_options = "caps:escape";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0.0; # or whatever speed you prefer
|
||||
accel_profile = "flat";
|
||||
|
||||
repeat_delay = 300;
|
||||
repeat_rate = 50;
|
||||
numlock_by_default = true;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
ecosystem = {
|
||||
no_update_news = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hl = import ./lib.nix {inherit lib;};
|
||||
alert-when-low-battery = false;
|
||||
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
||||
function set_keyboard_backlight {
|
||||
@@ -40,5 +42,5 @@
|
||||
|
||||
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings.exec-once = [command];
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce [command];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# Small helpers for writing the Hyprland Lua config through home-manager's `settings`
|
||||
{lib}: rec {
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
toLua = lib.generators.toLua {};
|
||||
|
||||
# hl.dsp.exec_cmd("...")
|
||||
exec = cmd: mkLuaInline "hl.dsp.exec_cmd(${toLua cmd})";
|
||||
|
||||
# hl.bind(keys, dispatcher, opts?)
|
||||
bind = keys: dsp: opts: {
|
||||
_args = [keys dsp] ++ lib.optional (opts != null) opts;
|
||||
};
|
||||
|
||||
# Run commands once at compositor start (replacement for `exec-once`)
|
||||
execOnce = cmds: [
|
||||
{
|
||||
_args = [
|
||||
"hyprland.start"
|
||||
(mkLuaInline ''
|
||||
function()
|
||||
${lib.concatMapStrings (c: " hl.exec_cmd(${toLua c})\n") cmds}end'')
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,6 +1,12 @@
|
||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hl = import ./lib.nix {inherit lib;};
|
||||
in {
|
||||
home.packages = with pkgs; [hyprpolkitagent];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce ["systemctl --user start hyprpolkitagent"];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Hyprpaper is used to set the wallpaper on the system
|
||||
{lib, ...}: {
|
||||
{lib, ...}: let
|
||||
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||
in {
|
||||
# The wallpaper is set by stylix
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
@@ -10,7 +12,7 @@
|
||||
};
|
||||
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||
"systemctl --user enable --now hyprpaper.service"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
walker
|
||||
elephant
|
||||
@@ -35,7 +39,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||
"dbus-update-activation-environment --systemd --all"
|
||||
"systemctl --user start elephant.service walker.service"
|
||||
];
|
||||
|
||||
@@ -7,6 +7,7 @@ let
|
||||
terminal = cmd: "uwsm app -- ${lib.getExe pkgs.ghostty} -e ${cmd}";
|
||||
|
||||
radius = toString config.theme.bar-rounding;
|
||||
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -269,9 +270,5 @@ in
|
||||
}
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
"waybar"
|
||||
];
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.on = hl.execOnce ["waybar"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user