diff options
author | sefidel <contact@sefidel.net> | 2023-11-15 23:26:23 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-11-15 23:57:07 +0900 |
commit | 8218f368d771fb763bb53a5c91add4d278a67dae (patch) | |
tree | f9cafde75ddcd802682244f294eedd3512695e5a /home/profiles/gui | |
parent | 1f1737591360a3dbbdfb66a1ce8296258e124c9e (diff) | |
download | nixrc-8218f368d771fb763bb53a5c91add4d278a67dae.tar.gz nixrc-8218f368d771fb763bb53a5c91add4d278a67dae.zip |
feat(home/gui): sway: use displaylink patch on laptop
Diffstat (limited to 'home/profiles/gui')
-rw-r--r-- | home/profiles/gui/default.nix | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/home/profiles/gui/default.nix b/home/profiles/gui/default.nix index 2fbb505..56b9b04 100644 --- a/home/profiles/gui/default.nix +++ b/home/profiles/gui/default.nix @@ -1,4 +1,4 @@ -{ config, lib, inputs, pkgs, self, ... }: +{ config, options, lib, inputs, pkgs, self, ... }: let cfg = config.profiles.gui; @@ -103,6 +103,17 @@ in wayland.windowManager.sway = { enable = true; + package = + if cfg.laptop.enable then + options.wayland.windowManager.sway.package.default.override + (prev: { + sway-unwrapped = prev.sway-unwrapped.override (s-prev: { + wlroots = s-prev.wlroots.overrideAttrs { + patches = [ ../../../overlays/patches/wlroots-displaylink/DisplayLink_v2.patch ]; + }; + }); + }) else options.wayland.windowManager.sway.package.default; + wrapperFeatures = { base = true; gtk = true; @@ -201,8 +212,8 @@ in [{ # 10m (desktop only) timeout = 600; - command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'"; - resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'"; + command = "${config.wayland.windowManager.sway.package}/bin/swaymsg 'output * dpms off'"; + resumeCommand = "${config.wayland.windowManager.sway.package}/bin/swaymsg 'output * dpms on'"; }] ++ [ { # 10m on laptops, 15m on desktop |