From 5064b95a3ca29c6083e93df8cbcb80e4d42e62fb Mon Sep 17 00:00:00 2001 From: David Crompton Date: Sat, 11 May 2024 11:12:01 -0400 Subject: [PATCH] universedesktop: DWL Patches --- .../desktop/displaymanager.nix | 2 +- machines/universedesktop/desktop/dwl.nix | 20 ++++++++++++++++--- .../universedesktop/desktop/dwl/config.def.h | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/machines/universedesktop/desktop/displaymanager.nix b/machines/universedesktop/desktop/displaymanager.nix index 334bf66..bdd3857 100644 --- a/machines/universedesktop/desktop/displaymanager.nix +++ b/machines/universedesktop/desktop/displaymanager.nix @@ -2,7 +2,7 @@ empttyConf = pkgs.writeText "emptty-config" '' TTY_NUMBER=7 - WAYLAND_SESSIONS_PATH="${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions" + WAYLAND_SESSIONS_PATH="${config.services.displayManager.sessionData.desktops}/share/wayland-sessions" ''; in { imports = [ diff --git a/machines/universedesktop/desktop/dwl.nix b/machines/universedesktop/desktop/dwl.nix index 4440bdb..7e58a34 100644 --- a/machines/universedesktop/desktop/dwl.nix +++ b/machines/universedesktop/desktop/dwl.nix @@ -15,7 +15,22 @@ in { nixpkgs.overlays = [ (final: prev: { - dwl = prev.dwl.overrideAttrs (old: { + dwl = prev.dwl.overrideAttrs (old: let + dwl-patches = pkgs.fetchgit { + url = "https://codeberg.org/dwl/dwl-patches.git"; + rev = "7f93815e9c9d50add8493e680b3057ed0cc6e8a0"; + hash = "sha256-LK1+WjAlguBvITPyS4oHXW5bNP19WUEfo87GFmyv8Js="; + }; + patches = let + dwl-patch = p: "${dwl-patches}/patches/${p}/${p}.patch"; + in [ + (dwl-patch "ipc") + (dwl-patch "restore-monitor") + (dwl-patch "regexrules") + (dwl-patch "regions") + ]; + in { + patches = (old.patches or []) ++ patches; postPatch = '' export termcmd=${pkgs.foot}/bin/foot export editcmd=${launch_emacs} @@ -25,7 +40,7 @@ in { postInstall = '' sed -i "s#Exec=dwl#Exec=dwl -s ${dwl-startup}#" $out/share/wayland-sessions/dwl.desktop chmod ugo+x $out/share/wayland-sessions/dwl.desktop - ''; + ''; passthru.providedSessions = ["dwl"]; }); }) @@ -46,7 +61,6 @@ in { environment.systemPackages = with pkgs; [ dwl - yambar foot ]; } diff --git a/machines/universedesktop/desktop/dwl/config.def.h b/machines/universedesktop/desktop/dwl/config.def.h index ed7afeb..6cc6937 100644 --- a/machines/universedesktop/desktop/dwl/config.def.h +++ b/machines/universedesktop/desktop/dwl/config.def.h @@ -6,9 +6,9 @@ /* appearance */ static const int sloppyfocus = 1; /* focus follows mouse */ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */ -static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int borderpx = 3; /* border pixel of windows */ static const float rootcolor[] = COLOR(0x222222ff); -static const float bordercolor[] = COLOR(0x444444ff); +static const float bordercolor[] = COLOR(0x233e5dff); static const float focuscolor[] = COLOR(0x005577ff); static const float urgentcolor[] = COLOR(0xff0000ff); /* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */