dotfiles

My PC Dotfiles & Website
commit 8996733929879dc7dc7a1e12d05aaa4aecb1ef27
parent ad471330e3ae3c05b1f6b62ed4640ed42d53432e
Author: maydayv7 <maydayv7@gmail.com>
Date:   Sat, 20 Jun 2026 22:02:41 +0530

feat(Hyprland): Scrolling

Diffstat:
MCHANGELOG.md | 1+
Mfiles/hyprland/kebihelp.json | 58+++++++++++++++++++++++++++++++++++++++++++++-------------
Afiles/hyprland/noctalia/layout/layout.luau | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/noctalia/layout/plugin.toml | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/hyprland/noctalia/layout/translations/en.json | 29+++++++++++++++++++++++++++++
Mfiles/hyprland/noctalia/submap/translations/en.json | 2+-
Mflake.lock | 18++++++++++++++++++
Mflake.nix | 5+++++
Mmodules/apps/vscode/default.nix | 2+-
Dmodules/desktop/hyprland/_features/hyprutils.nix | 45---------------------------------------------
Mmodules/desktop/hyprland/_features/shell.nix | 35++++++++++++++++++++++++++++++-----
Mmodules/desktop/hyprland/_features/utils.nix | 38+++++++++++++++++++++++++++++++++-----
Mmodules/desktop/hyprland/_settings/keybinds.nix | 31+++++++++++++++++++++++--------
Mmodules/desktop/hyprland/_settings/main.nix | 14+++++++++++++-
Mmodules/desktop/hyprland/_settings/plugins.nix | 30++++++++++++++++++++++++++----
Mmodules/system/base-ext.nix | 32++++++++++++++++++++------------
Mpackages/_module.nix | 20+++++++++++++++++---
Mscripts/hyprutils.nix | 1+
18 files changed, 407 insertions(+), 98 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -2,6 +2,7 @@ ### June +- Use Hyprland's Scrolling layout - Migrate Hyprland config to Lua - Use Noctalia Shell & Greeter (v5) with Hyprland - Per-user secrets diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json @@ -113,12 +113,28 @@ "label": "Switch focus to window in desired direction" }, { - "value": "$mod SHIFT <ARROW>", - "label": "Swap windows in desired direction" + "value": "$mod SHIFT ← / →", + "label": "Scrolling: move window across | Dwindle: swap windows" + }, + { + "value": "$mod SHIFT ↑ / ↓", + "label": "Scrolling: stack in/out of column | Dwindle: swap windows" }, { "value": "$mod Space", - "label": "Change window split direction" + "label": "Scrolling: toggle window stacking | Dwindle: split direction" + }, + { + "value": "$mod Backspace", + "label": "Toggle tiling layout" + }, + { + "value": "$mod [ or ]", + "label": "Scrolling: shrink/grow column width" + }, + { + "value": "$mod SHIFT [ or ]", + "label": "Scrolling: center column / fit all columns on screen" }, { "value": "$mod SHIFT Space", @@ -130,7 +146,7 @@ }, { "value": "$mod ; or :", - "label": "Toggle window float for one/all window(s)" + "label": "Toggle window float for one / all window(s)" }, { "value": "$mod C", @@ -147,7 +163,11 @@ "keybindings": [ { "value": "$mod Tab", - "label": "Window Switcher / Overview" + "label": "Window Switcher" + }, + { + "value": "$mod `", + "label": "Toggle workspace overview" }, { "value": "ALT [SHIFT] Tab", @@ -171,7 +191,7 @@ "label": "Move window to workspace 'NUM' {1 to 9}" }, { - "value": "$mod , or . (3F Swipe Left/Right)", + "value": "$mod , or . (4F Swipe Left/Right)", "label": "Move across non-empty workspaces" }, { @@ -208,10 +228,6 @@ "label": "Take Screenshot of area" }, { - "value": "CTRL Print", - "label": "Take Screenshot of window" - }, - { "value": "SHIFT Print", "label": "Take Screenshot of screen" }, @@ -338,12 +354,28 @@ "label": "" }, { - "value": "R' (in overview)", - "label": "Move windows across workspaces" + "value": "3F Swipe (horizontal)", + "label": "Scrolling: switch apps / columns" + }, + { + "value": "4F Swipe (horizontal)", + "label": "Switch across workspaces" + }, + { + "value": "4F Swipe (vertical)", + "label": "Toggle workspace overview" + }, + { + "value": "", + "label": "" }, { "value": "L' (in overview)", - "label": "Switch workspaces" + "label": "Change workspace" + }, + { + "value": "L' drag (in overview)", + "label": "Move window across workspaces" } ] }, diff --git a/files/hyprland/noctalia/layout/layout.luau b/files/hyprland/noctalia/layout/layout.luau @@ -0,0 +1,91 @@ +-- Hyprland Layout Indicator bar widget + +local scrollGlyph = barWidget.getConfig("scroll_glyph") +local dwindleGlyph = barWidget.getConfig("dwindle_glyph") +local floatGlyph = barWidget.getConfig("float_glyph") + +local command = barWidget.getConfig("command") +local layoutCommand = barWidget.getConfig("layout_command") +local floatCommand = barWidget.getConfig("float_command") + +local state = { + layout = "scrolling", + allFloat = false, +} + +local function render() + if state.allFloat then + barWidget.setGlyph(floatGlyph) + barWidget.setTooltip(noctalia.tr("float")) + elseif state.layout == "dwindle" then + barWidget.setGlyph(dwindleGlyph) + barWidget.setTooltip(noctalia.tr("dwindle")) + else + barWidget.setGlyph(scrollGlyph) + barWidget.setTooltip(noctalia.tr("scrolling")) + end + barWidget.setText("") + barWidget.setVisible(true) +end + +local function refreshLayout() + if layoutCommand == nil or layoutCommand == "" then + return + end + noctalia.runAsync(layoutCommand, function(result) + local out = result.stdout or "" + if string.find(out, "dwindle", 1, true) then + state.layout = "dwindle" + else + state.layout = "scrolling" + end + render() + end) +end + +local function refreshFloat() + if floatCommand == nil or floatCommand == "" then + return + end + noctalia.runAsync(floatCommand, function(result) + local out = result.stdout or "" + state.allFloat = string.find(out, "true", 1, true) ~= nil + render() + end) +end + +-- Static otherwise: slow periodic tick down +function update() + noctalia.setUpdateInterval(60000) +end + +-- Initialise from live compositor state, then render immediately +refreshLayout() +refreshFloat() +render() + +if command ~= nil and command ~= "" then + noctalia.runStream(command, function(line) + -- Tiling layout is pushed explicitly by the layout-toggle keybind + local layout = string.match(line, "^custom>>layout:(%S+)$") + if layout ~= nil then + state.layout = layout + render() + return + end + + -- The float toggle asks for an explicit re-check + if string.match(line, "^custom>>floatcheck$") ~= nil then + refreshFloat() + return + end + + if string.match(line, "^openwindow>>") ~= nil + or string.match(line, "^closewindow>>") ~= nil + or string.match(line, "^movewindow>>") ~= nil + or string.match(line, "^workspace>>") ~= nil + then + refreshFloat() + end + end) +end diff --git a/files/hyprland/noctalia/layout/plugin.toml b/files/hyprland/noctalia/layout/plugin.toml @@ -0,0 +1,53 @@ +# Hyprland Layout Indicator +id = "maydayv7/hyprland-layout" +name = "Hyprland Layout" +version = "1.0.0" +min_noctalia = "5.0.0" +author = "maydayv7" +license = "GPL-3.0-only" +tags = ["hyprland", "layout"] +icon = "layout-columns" +description = "Shows the active Hyprland tiling layout (or all-floating) as a dynamic bar icon." + +[[setting]] +key = "command" +type = "string" +label_key = "settings.command.label" +description_key = "settings.command.description" +default = "socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock -" + +[[setting]] +key = "layout_command" +type = "string" +label_key = "settings.layout_command.label" +description_key = "settings.layout_command.description" +default = "hyprctl getoption -j general:layout" + +[[setting]] +key = "float_command" +type = "string" +label_key = "settings.float_command.label" +description_key = "settings.float_command.description" +default = "" + +[[widget]] +id = "indicator" +entry = "layout.luau" + + [[widget.setting]] + key = "scroll_glyph" + type = "glyph" + label_key = "settings.scroll_glyph.label" + default = "layout-columns" + + [[widget.setting]] + key = "dwindle_glyph" + type = "glyph" + label_key = "settings.dwindle_glyph.label" + default = "binary-tree" + + [[widget.setting]] + key = "float_glyph" + type = "glyph" + label_key = "settings.float_glyph.label" + default = "app-window" diff --git a/files/hyprland/noctalia/layout/translations/en.json b/files/hyprland/noctalia/layout/translations/en.json @@ -0,0 +1,29 @@ +{ + "title": "Hyprland Layout", + "scrolling": "Layout: Scrolling", + "dwindle": "Layout: Dwindle", + "float": "All windows floating", + "settings": { + "command": { + "label": "Stream command", + "description": "Shell command emitting Hyprland socket2 event lines." + }, + "layout_command": { + "label": "Layout query command", + "description": "Command whose output reveals the active tiling layout." + }, + "float_command": { + "label": "All-float query command", + "description": "Command printing `true` when every window on the active workspace is floating." + }, + "scroll_glyph": { + "label": "Scrolling glyph" + }, + "dwindle_glyph": { + "label": "Dwindle glyph" + }, + "float_glyph": { + "label": "Floating glyph" + } + } +} diff --git a/files/hyprland/noctalia/submap/translations/en.json b/files/hyprland/noctalia/submap/translations/en.json @@ -11,7 +11,7 @@ }, "command": { "label": "Stream command", - "description": "Shell command emitting Hyprland `submap>>NAME` event lines." + "description": "Shell command emitting Hyprland socket2 event lines." } } } diff --git a/flake.lock b/flake.lock @@ -1235,6 +1235,23 @@ "type": "github" } }, + "hyprspace": { + "flake": false, + "locked": { + "lastModified": 1781077726, + "narHash": "sha256-0OOtLXQ/WEJ5nlR98WFvGBCTp1X/DstsOb75jZunVI0=", + "owner": "0xl30", + "repo": "Hyprspace", + "rev": "74213c87be6064ce14f9b1560121c270462f33af", + "type": "github" + }, + "original": { + "owner": "0xl30", + "repo": "Hyprspace", + "rev": "74213c87be6064ce14f9b1560121c270462f33af", + "type": "github" + } + }, "hyprsplit": { "inputs": { "hyprland": [ @@ -1768,6 +1785,7 @@ "home-manager": "home-manager", "hyprcursors": "hyprcursors", "hyprland": "hyprland", + "hyprspace": "hyprspace", "hyprsplit": "hyprsplit", "impermanence": "impermanence", "import-tree": "import-tree", diff --git a/flake.nix b/flake.nix @@ -211,6 +211,11 @@ }; }; + hyprspace = { + url = "github:0xl30/Hyprspace/74213c87be6064ce14f9b1560121c270462f33af"; + flake = false; + }; + # Desktop Shell noctalia = { url = "github:noctalia-dev/noctalia"; diff --git a/modules/apps/vscode/default.nix b/modules/apps/vscode/default.nix @@ -70,7 +70,6 @@ in { github.vscode-pull-request-github # GitHub github.copilot # Copilot AI dart-code.flutter # Flutter - divyanshuagrawal.competitive-programming-helper # CP jnoortheen.nix-ide # Nix ms-python.python # Python ms-vscode.cpptools # C/C++ @@ -89,6 +88,7 @@ in { ritwickdey.liveserver ] ++ (with pkgs.vscode-marketplace; [ + langningchen.cph-ng # CP kisstkondoros.vscode-gutter-preview # Image Preview ]) ++ lib.optionals isGnome [pkgs.vscode-extensions.piousdeer.adwaita-theme] diff --git a/modules/desktop/hyprland/_features/hyprutils.nix b/modules/desktop/hyprland/_features/hyprutils.nix @@ -1,45 +0,0 @@ -# Hyprland Utilities -{ - util ? null, - files ? null, - ... -}: { - nixos = {pkgs, ...}: { - environment.systemPackages = with pkgs; [ - # Apps - custom.kebihelp - nwg-displays - - # Utilities - custom.hyprutils - grim - grimblast - hyprkeys - hyprshade - unstable.pyprland - ]; - }; - - home = {config, ...}: { - home = { - persist.directories = [".config/nwg-displays"]; - file = with files.hyprland; { - # Pyprland - ".config/pypr/config.toml".text = pypr; - - # Keybinds Viewer - ".config/kebihelp.json".text = util.build.theme { - inherit (config.stylix) fonts; - inherit (config.lib.stylix) colors; - file = kebihelp; - }; - - # Shaders - ".config/hypr/shaders" = { - source = shaders; - recursive = true; - }; - }; - }; - }; -} diff --git a/modules/desktop/hyprland/_features/shell.nix b/modules/desktop/hyprland/_features/shell.nix @@ -55,10 +55,10 @@ # Bar bar.main = { position = "top"; - start = ["session" "workspaces" "minimize" "media" "maydayv7/hyprland-submap:indicator"]; - center = ["control-center" "clock" "launcher"]; + start = ["session" "workspaces" "group:g1"]; + center = ["media" "clock" "control-center"]; end = [ - "tray" + "group:g2" "clipboard" "bluetooth" "network" @@ -75,6 +75,21 @@ scale = 1.1; thickness = 30; widget_spacing = 14; + capsule_group = [ + { + id = "g1"; + members = [ + "launcher" + "minimize" + "maydayv7/hyprland-layout:indicator" + "maydayv7/hyprland-submap:indicator" + ]; + } + { + id = "g2"; + members = ["tray"]; + } + ]; }; # Audio @@ -312,11 +327,21 @@ "noctalia/screen_recorder" "noctalia/timer" "maydayv7/hyprland-submap" + "maydayv7/hyprland-layout" ]; }; - plugin_settings = { + plugin_settings = let + hyprctl = "${osConfig.programs.hyprland.package}/bin/hyprctl"; + jq = lib.getExe pkgs.jq; + socket2 = "${lib.getExe pkgs.socat} -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock -"; + in { "noctalia/screen_recorder".copy_to_clipboard = true; - "maydayv7/hyprland-submap".command = "${lib.getExe pkgs.socat} -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock -"; + "maydayv7/hyprland-submap".command = socket2; + "maydayv7/hyprland-layout" = { + command = socket2; + layout_command = "${hyprctl} getoption -j general:layout"; + float_command = "${hyprctl} -j clients | ${jq} --argjson ws \"$(${hyprctl} -j activeworkspace | ${jq} .id)\" '[.[] | select(.workspace.id == $ws and .mapped)] as $w | (($w | length) > 0) and ($w | map(.floating) | all)'"; + }; }; }; diff --git a/modules/desktop/hyprland/_features/utils.nix b/modules/desktop/hyprland/_features/utils.nix @@ -1,5 +1,9 @@ # Utilities -{util ? null, ...}: { +{ + util ? null, + files ? null, + ... +}: { nixos = {pkgs, ...}: { environment.systemPackages = with pkgs; [ # Apps @@ -11,9 +15,14 @@ remmina resources smile + custom.kebihelp + nwg-displays # Utilities + custom.hyprutils + unstable.pyprland hyprpicker + hyprshade pwvucontrol wev wl-clipboard @@ -62,13 +71,32 @@ persist.directories = [ ".config/kdeconnect" ".config/gpu-screen-recorder" + ".config/nwg-displays" ".local/share/gpu-screen-recorder" ]; - file.".config/kwalletrc".text = '' - [Wallet] - Enabled=false - ''; + file = with files.hyprland; { + ".config/kwalletrc".text = '' + [Wallet] + Enabled=false + ''; + + # Pyprland + ".config/pypr/config.toml".text = pypr; + + # Keybinds Viewer + ".config/kebihelp.json".text = util.build.theme { + inherit (config.stylix) fonts; + inherit (config.lib.stylix) colors; + file = kebihelp; + }; + + # Shaders + ".config/hypr/shaders" = { + source = shaders; + recursive = true; + }; + }; }; # Phone Connect diff --git a/modules/desktop/hyprland/_settings/keybinds.nix b/modules/desktop/hyprland/_settings/keybinds.nix @@ -35,8 +35,12 @@ _: {lib, ...}: let moveOrGroup = d: ''hl.dsp.window.move({ direction = "${dir d}", group_aware = true })''; moveActive = x: y: ''hl.dsp.window.move({ x = ${toString x}, y = ${toString y}, relative = true })''; resizeActive = x: y: ''hl.dsp.window.resize({ x = ${toString x}, y = ${toString y}, relative = true })''; - multi = disps: "function() " + concatStringsSep " " (map (d: "hl.dispatch(${d});") disps) + " end"; + + # Layout-specific binds + layout = msg: ''hl.dsp.layout("${msg}")''; + layoutAware = scroll: fallback: ''function() if hl.get_config("general.layout") == "scrolling" then hl.dispatch(${scroll}) else hl.dispatch(${fallback}) end end''; + toggleLayout = ''function() if hl.get_config("general.layout") == "scrolling" then hl.config({ general = { layout = "dwindle" } }); hl.dispatch(hl.dsp.event("layout:dwindle")) else hl.config({ general = { layout = "scrolling" } }); hl.dispatch(hl.dsp.event("layout:scrolling")) end end''; in { wayland.windowManager.hyprland = { ## Keybindings @@ -53,7 +57,8 @@ in { ])) (bind (combo [mod] "E") ''hl.dsp.window.fullscreen({ mode = "maximized" })'') (bind (combo [mod] "P") "hl.dsp.window.pin()") - (bind (combo [mod] "Space") ''hl.dsp.layout("togglesplit")'') + (bind (combo [mod] "Space") (layoutAware (layout "consume_or_expel next") ''hl.dsp.layout("togglesplit")'')) + (bind (combo [mod] "BackSpace") toggleLayout) (bind (combo [mod "SHIFT"] "S") "hl.dsp.window.toggle_swallow()") # Window Focus @@ -61,16 +66,24 @@ in { (bind (combo [mod] "right") (focusDir "r")) (bind (combo [mod] "up") (focusDir "u")) (bind (combo [mod] "down") (focusDir "d")) + (bind (combo ["ALT"] "Tab") "hl.dsp.window.cycle_next({ next = true })") + (bind (combo ["ALT" "SHIFT"] "Tab") "hl.dsp.window.cycle_next({ next = false })") (bind (combo ["ALT"] "A") (multi [ "hl.dsp.focus({ urgent_or_last = true })" ''hl.dsp.window.alter_zorder({ mode = "top" })'' ])) - # Window Swap - (bind (combo [mod "SHIFT"] "left") (swapDir "l")) - (bind (combo [mod "SHIFT"] "right") (swapDir "r")) - (bind (combo [mod "SHIFT"] "up") (swapDir "u")) - (bind (combo [mod "SHIFT"] "down") (swapDir "d")) + # Window Movement + (bind (combo [mod "SHIFT"] "left") (layoutAware (layout "swapcol l") (swapDir "l"))) + (bind (combo [mod "SHIFT"] "right") (layoutAware (layout "swapcol r") (swapDir "r"))) + (bind (combo [mod "SHIFT"] "up") (layoutAware (layout "consume") (swapDir "u"))) + (bind (combo [mod "SHIFT"] "down") (layoutAware (layout "expel") (swapDir "d"))) + + # Scrolling + (bind (combo [mod] "bracketright") (layout "colresize +conf")) + (bind (combo [mod] "bracketleft") (layout "colresize -conf")) + (bind (combo [mod "SHIFT"] "bracketright") (layout "fit all")) + (bind (combo [mod "SHIFT"] "bracketleft") (layout "center")) # Window Groups (bind (combo [mod "SHIFT"] "space") "hl.dsp.group.toggle()") @@ -101,6 +114,9 @@ in { (bind (combo [mod "SHIFT"] "comma") ''hs.dsp.window.move({ workspace = "-1", follow = false })'') (bind (combo [mod "SHIFT"] "period") ''hs.dsp.window.move({ workspace = "+1", follow = false })'') + # Workspace Overview + (bind (combo [mod] "grave") ''function() if hl.plugin.Hyprspace then hl.plugin.Hyprspace.overview("toggle") end end'') + # Cycle Monitors (bind (combo [mod "ALT"] "comma") ''hl.dsp.focus({ monitor = "l" })'') (bind (combo [mod "ALT"] "period") ''hl.dsp.focus({ monitor = "r" })'') @@ -119,7 +135,6 @@ in { # Screenshot (bind (combo [] "Print") (exec "noctalia msg screenshot-region")) (bind (combo ["SHIFT"] "Print") (exec "noctalia msg screenshot-fullscreen pick")) - (bind (combo ["CTRL"] "Print") (exec "grimblast --notify --cursor copysave active")) # Submaps (bind (combo [mod "SHIFT"] "Escape") ''hl.dsp.submap("Inhibit")'') diff --git a/modules/desktop/hyprland/_settings/main.nix b/modules/desktop/hyprland/_settings/main.nix @@ -41,6 +41,12 @@ lib.mkIf (osConfig != null) ( { fingers = 3; direction = "horizontal"; + action = "scroll_move"; + scale = 3; + } + { + fingers = 4; + direction = "horizontal"; action = "workspace"; } ]; @@ -196,7 +202,6 @@ lib.mkIf (osConfig != null) ( tap_and_drag = true; natural_scroll = true; disable_while_typing = false; - drag_3fg = 1; # 3-finger window drag }; }; @@ -223,6 +228,13 @@ lib.mkIf (osConfig != null) ( }; # Tiling Layout + general.layout = "scrolling"; + scrolling = { + column_width = 0.5; + explicit_column_widths = "0.333, 0.5, 0.667, 1.0"; + follow_focus = true; + fullscreen_on_one_column = true; + }; dwindle = { preserve_split = true; smart_split = true; diff --git a/modules/desktop/hyprland/_settings/plugins.nix b/modules/desktop/hyprland/_settings/plugins.nix @@ -7,13 +7,16 @@ _: { }: lib.mkIf (osConfig != null) ( let - inherit (pkgs.hyprworld) hyprsplitlua hypr-dynamic-cursors; + inherit (pkgs.hyprworld) hyprsplitlua hypr-dynamic-cursors Hyprspace; lua = import ./_lib.nix lib; inherit (lua) inline; + inherit (osConfig.gui) fancy; + inherit (osConfig.lib.stylix.colors) base03 base0D; + cursorMode = - if osConfig.gui.fancy + if fancy then "tilt" else "none"; in { @@ -24,9 +27,9 @@ lib.mkIf (osConfig != null) ( _var = inline ''(function() local hs = require("hyprsplit"); hs.config({ num_workspaces = 9 }); return hs end)()''; }; - # Cursor Effects - plugins = [hypr-dynamic-cursors]; + plugins = [hypr-dynamic-cursors Hyprspace]; extraConfig = '' + -- Cursor Effects if hl.plugin.dynamic_cursors then hl.config({ plugin = { dynamic_cursors = { enabled = true, @@ -36,6 +39,25 @@ lib.mkIf (osConfig != null) ( tilt = { activation = "negative_quadratic" }, } } }) end + + -- Workspace Overview + if hl.plugin.Hyprspace then + hl.config({ plugin = { hyprspace = { + auto_drag = true, + drag_alpha = 0.4, + exit_on_click = true, + center_aligned = true, + hide_top_layers = true, + hide_overlay_layers = false, + show_new_workspace = false, + show_empty_workspace = true, + panel_border_width = 0, + workspace_margin = 10, + panel_color = "rgb(${base03})", + workspace_active_border = "rgb(${base0D})", + swipe_fingers = 4, + } } }) + end ''; }; } diff --git a/modules/system/base-ext.nix b/modules/system/base-ext.nix @@ -1,19 +1,27 @@ ## Extended Base Configuration ## _: { flake.modules = { - nixos.base-ext = _: { - config = { - # AppImage Support - programs.appimage = { - enable = true; - binfmt = true; - }; + nixos.base-ext = {config, ...}: { + # AppImage Support + programs.appimage = { + enable = true; + binfmt = true; + }; + + # Documentation + documentation = { + dev.enable = true; + man.enable = true; + }; - # Documentation - documentation = { - dev.enable = true; - man.enable = true; - }; + # TTY + services.kmscon = { + enable = true; + hwRender = false; + extraConfig = '' + font-name=${builtins.head config.fonts.fontconfig.defaultFonts.monospace} + font-size=14 + ''; }; }; }; diff --git a/packages/_module.nix b/packages/_module.nix @@ -28,7 +28,7 @@ in { overlays = (attrValues config.flake.overlays or {}) ++ [ - (_: _: { + (final: _: { custom = config.flake.packages."${system}" or {}; stagit-fork = stagit.packages."${system}".default; unstable = import unstable { @@ -39,8 +39,22 @@ in { wine = windows.packages."${system}"; winelib = windows.lib."${system}"; spicetify = spicetify.legacyPackages."${system}"; - hyprworld = - hyprland.packages."${system}" // hyprsplit.packages."${system}" // hyprcursors.packages."${system}"; + hyprworld = let + hyprlandPkg = hyprland.packages."${system}".hyprland; + Hyprspace = final.gcc14Stdenv.mkDerivation { + pname = "Hyprspace"; + src = hyprspace; + inherit (hyprlandPkg) version nativeBuildInputs; + buildInputs = [hyprlandPkg] ++ hyprlandPkg.buildInputs; + dontUseCmakeConfigure = true; + installFlags = ["PREFIX=$(out)"]; + postInstall = "mv $out/lib/Hyprspace.so $out/lib/libHyprspace.so"; + }; + in + hyprland.packages."${system}" + // hyprsplit.packages."${system}" + // hyprcursors.packages."${system}" + // {inherit Hyprspace;}; }) minecraft.overlay vscode.overlays.default diff --git a/scripts/hyprutils.nix b/scripts/hyprutils.nix @@ -73,6 +73,7 @@ in WORKSPACE=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}') hyprnotify 1 "Toggled window floating on Workspace $WORKSPACE" hyprctl eval 'local ws = hl.get_active_workspace(); if ws then for _, w in ipairs(hl.get_workspace_windows(ws)) do hl.dispatch(hl.dsp.window.float({ action = "toggle", window = w })) end end' + hyprctl dispatch 'hl.dsp.event("floatcheck")' ;; "minimized") if hyprctl workspaces | grep "special:minimized"