From 57f7b11e97134ea452745236d10fb03aa70c4de7 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 9 Jun 2024 12:37:06 +0200 Subject: [PATCH] gnome: make amount of max workspace thumbnails configurable and set to 11 --- nix-os/desktopManagers/gnome.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nix-os/desktopManagers/gnome.nix b/nix-os/desktopManagers/gnome.nix index 20824f7..a6b878f 100644 --- a/nix-os/desktopManagers/gnome.nix +++ b/nix-os/desktopManagers/gnome.nix @@ -1,6 +1,21 @@ -{pkgs, ... }: +{config, lib, pkgs, ... }: +let + maxThumbnails = config.programs.gnome.extensions.workspaceIndicator.maxThumbnails; + workspaceIndicator = pkgs.gnomeExtensions.workspace-indicator.overrideAttrs { + postPatch = '' + sed -i 's/const MAX_THUMBNAILS = 6;/const MAX_THUMBNAILS = ${maxThumbnails};/' extension.js + ''; + }; +in { + options = { + programs.gnome.extensions.workspaceIndicator.maxThumbnails = lib.mkOption { + type = lib.types.int; + default = 11; + description = "The maximum number of thumbnails to show in the workspace indicator"; + }; + }; imports = [ ../unstable-packages.nix ../dconf-common.nix @@ -56,6 +71,7 @@ ]; environment.systemPackages = with pkgs; [ + workspaceIndicator gnomeExtensions.pop-shell gnomeExtensions.vitals gnomeExtensions.tray-icons-reloaded