{ pkgs, lib, }: let lua = lib.generators.mkLuaInline; dsp = { exec = cmd: lua ''hl.dsp.exec_cmd("${cmd}")''; close = lua "hl.dsp.window.close()"; exit = lua "hl.dsp.exit()"; float = lua ''hl.dsp.window.float({ action = "toggle" })''; fullscreen = lua "hl.dsp.window.fullscreen()"; pseudo = lua "hl.dsp.window.pseudo()"; layout = msg: lua ''hl.dsp.layout("${msg}")''; focus = dir: lua ''hl.dsp.focus({ direction = "${dir}" })''; swap = dir: lua ''hl.dsp.window.swap({ direction = "${dir}" })''; toggleSpecial = name: lua ''hl.dsp.workspace.toggle_special("${name}")''; moveToSpecial = name: lua ''hl.dsp.window.move({ workspace = "special:${name}" })''; focusWorkspace = ws: lua ''hl.dsp.focus({ workspace = "${toString ws}" })''; moveToWorkspace = ws: lua ''hl.dsp.window.move({ workspace = "${toString ws}" })''; drag = lua "hl.dsp.window.drag()"; resize = lua "hl.dsp.window.resize()"; sendshortcut = mod: key: lua ''hl.dsp.send_shortcut({ mods = "${mod}", key = "${key}" })''; }; bind = keys: dispatcher: { _args = [ keys dispatcher ]; }; bindOpts = keys: dispatcher: opts: { _args = [ keys dispatcher opts ]; }; workspaceBinds = lib.concatMap ( i: let key = toString (lib.mod i 10); in [ (bind "SUPER + ${key}" (dsp.focusWorkspace i)) (bind "SUPER + SHIFT + ${key}" (dsp.moveToWorkspace i)) ] ) (lib.range 1 10); startupScript = pkgs.pkgs.writeShellScriptBin "start" '' waybar & gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" elephant & dunst & hyprlock & steam & discord & ''; in { gtk = { enable = true; theme = { package = pkgs.gnome-themes-extra; name = "Adwaita-dark"; }; gtk4.theme = null; iconTheme = { package = pkgs.nerd-fonts."m+"; name = "Adwaita"; }; font = { name = "Hack"; size = 16; }; }; hyprland = { enable = true; configType = "lua"; plugins = [pkgs.hyprlandPlugins.hyprbars]; settings = { workspace_rule = [ { workspace = 1; monitor = "HDMI-A-1"; default = true; } { workspace = 2; monitor = "DP-2"; default = true; } { workspace = 3; monitor = "DP-1"; default = true; } ]; monitor = [ { output = "DP-2"; mode = "1920x1080@239.76Hz"; position = "0x0"; scale = "1.0"; } { output = "DP-1"; mode = "2560x1080@200.00Hz"; position = "auto-right"; scale = "1.0"; transform = 1; } { output = "HDMI-A-1"; mode = "1920x1080@119.98Hz"; position = "auto-left"; scale = "1.0"; transform = 3; } ]; config = { general = { gaps_in = 5; gaps_out = 5; border_size = 1; col = { active_border = "rgb(e1e1e1)"; inactive_border = "rgb(151515)"; }; }; decoration = { rounding = 5; active_opacity = 1.0; inactive_opacity = 1.0; blur = { enabled = true; size = 3; passes = 1; vibrancy = 0.1696; }; }; plugin.hyprbars = { bar_height = 24; bar_title_enabled = true; }; dwindle = { force_split = 2; preserve_split = true; }; misc = { force_default_wallpaper = -1; disable_hyprland_logo = true; }; input = { kb_layout = "us"; follow_mouse = 0; sensitivity = -0.2; natural_scroll = false; touchpad = { natural_scroll = false; }; }; }; curve = [ { _args = [ "myBezier" { type = "bezier"; points = lua "{ {0.05, 0.9}, {0.1, 1.05} }"; } ]; } ]; animation = [ { leaf = "windows"; enabled = true; speed = 7; bezier = "myBezier"; } { leaf = "windowsOut"; enabled = true; speed = 7; bezier = "default"; style = "popin 80%"; } { leaf = "border"; enabled = true; speed = 10; bezier = "default"; } { leaf = "borderangle"; enabled = true; speed = 8; bezier = "default"; } { leaf = "fade"; enabled = true; speed = 7; bezier = "default"; } { leaf = "workspaces"; enabled = true; speed = 6; bezier = "default"; } ]; window_rule = [ { match = { class = "^(kitty)$"; title = "^(bw-unlock)$"; }; float = true; } ]; on = { _args = [ "hyprland.start" (lua '' function() hl.exec_cmd("${startupScript}/bin/start") end'') ]; }; bind = [ # App launchers (bind "SUPER + RETURN" (dsp.exec "kitty")) (bind "SUPER + D" (dsp.exec "walker")) (bind "SUPER + R" (dsp.exec "walker -m runner")) (bind "SUPER + CTRL + V" (dsp.exec "walker -m clipboard")) # Screenshots (bind "SUPER + SHIFT + S" (dsp.exec "grimblast copysave active")) # Universal copy/paste (bind "SUPER + C" (dsp.sendshortcut "CTRL" "Insert")) (bind "SUPER + V" (dsp.sendshortcut "SHIFT" "Insert")) (bind "SUPER + X" (dsp.sendshortcut "CTRL" "X")) # Window management (bind "SUPER + SHIFT + R" (dsp.exec "hyprctl reload")) (bind "SUPER + SHIFT + Q" dsp.close) (bind "SUPER + SHIFT + E" dsp.exit) (bind "SUPER + L" (dsp.exec "hyprlock")) (bind "SUPER + T" dsp.float) (bind "SUPER + F" dsp.fullscreen) (bind "SUPER + P" dsp.pseudo) (bind "SUPER + J" (dsp.layout "togglesplit")) # Focus (bind "SUPER + left" (dsp.focus "left")) (bind "SUPER + right" (dsp.focus "right")) (bind "SUPER + up" (dsp.focus "up")) (bind "SUPER + down" (dsp.focus "down")) # Swap windows (bind "SUPER + SHIFT + left" (dsp.swap "left")) (bind "SUPER + SHIFT + right" (dsp.swap "right")) (bind "SUPER + SHIFT + up" (dsp.swap "up")) (bind "SUPER + SHIFT + down" (dsp.swap "down")) # Special workspace (bind "SUPER + S" (dsp.toggleSpecial "magic")) (bind "SUPER + SHIFT + S" (dsp.moveToSpecial "magic")) # Scroll through workspaces (bind "SUPER + mouse_down" (dsp.focusWorkspace "e+1")) (bind "SUPER + mouse_up" (dsp.focusWorkspace "e-1")) # Volume keys (bindOpts "XF86AudioRaiseVolume" (dsp.exec "wpctl set-volume @ 5%+") { locked = true; repeating = true; }) (bindOpts "XF86AudioLowerVolume" (dsp.exec "wpctl set-volume @ 5%-") { locked = true; repeating = true; }) (bindOpts "XF86AudioMute" (dsp.exec "wpctl set-mute @ toggle") {locked = true;}) (bindOpts "XF86AudioMicMute" (dsp.exec "wpctl set-mute u/DEFAULT_AUDIO_SOURCE@ toggle") { locked = true; }) # Mouse move/resize (bindOpts "SUPER + mouse:272" dsp.drag {mouse = true;}) (bindOpts "SUPER + mouse:273" dsp.resize {mouse = true;}) ] ++ workspaceBinds; }; }; packages = with pkgs; [ waybar walker dunst hyprlock elephant kitty grimblast overskride pwvucontrol ]; }