Subject: [PATCH] gnu: xdisorg: add the official hyprland plugins.

From: Daniel Ziltener <[email-masked]>
Date: Fri, 4 Apr 2025 00:41:27 +0200

This adds the official hyprland plugins from the github.com/hyprwm/hyprland-plugins repository.

---
 gnu/packages/xdisorg.scm | 215 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 215 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 302c0434ca..cfb08361b7 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -3925,6 +3925,221 @@ (define-public hyprpicker
      "This package provides a @code{wlroots}-compatible Wayland color picker.")
     (license license:bsd-3)))
 
+(define hyprland-official-plugin
+  (package
+    (name "hyprland-official-plugin")
+    (version "0.48.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/hyprwm/hyprland-plugins")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0bmj1lwd3nfbmb3cvy600yxknxdb7rjcmbh0dwwywxjr8agggaxb"))))
+    (build-system meson-build-system)
+    (native-inputs (package-native-inputs hyprland))
+    (inputs (modify-inputs (package-inputs hyprland)
+              (append hyprland)))
+    (home-page "https://github.com/hyprwm/hyprland-plugins")
+    (synopsis "A template for official hyprland plugins")
+    (description "A template for official hyprland plugins")
+    (license license:bsd-3)))
+
+(define-public hyprland-plugin-borders-plus-plus
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-borders-plus-plus")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./borders-plus-plus")))))))
+    (synopsis
+     "Allows you to add one or two additional borders to your windows")
+    (description
+     "Allows you to add one or two additional borders to your windows.
+The borders added are static.
+
+Example Config:
+
+@example
+plugin {
+    borders-plus-plus {
+        add_borders = 1 # 0 - 9
+
+        # you can add up to 9 borders
+        col.border_1 = rgb(ffffff)
+        col.border_2 = rgb(2222ff)
+
+        # -1 means " default
+     " as in the one defined in general:border_size
+        border_size_1 = 10
+        border_size_2 = -1
+
+        # makes outer edges match rounding of the parent. Turn on / off to better understand. Default = on.
+        natural_rounding = yes
+    }
+}
+@end example
+")))
+
+(define-public hyprland-plugin-csgo-vulkan-fix
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-csgo-vulkan-fix")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./csgo-vulkan-fix")))))))
+    (synopsis
+     "csgo-vulkan-fix is a way to force apps to a fake resolution without
+them realizing it")
+    (description
+     "Originally meant for csgo / cs2, but can work with any app, really.
+
+csgo-vulkan-fix is a way to force apps to a fake resolution without them realizing it.
+
+If you want to play CS2, you're locked to your native res. Other resolutions
+(especially not 16:9) are wonky.
+
+With this plugin, you aren't anymore.")))
+
+(define-public hyprland-plugin-hyprbars
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-hyprbars")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./hyprbars")))))))
+    (synopsis "Adds simple title bars to windows")
+    (description "Allows you to add title bars to windows, and lets you
+set the color, font, size, and more.")))
+
+(define-public hyprland-plugin-hyprexpo
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-hyprexpo")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./hyprexpo")))))))
+    (synopsis "A desktop overview plugin")
+    (description
+     "This plugin lets you have an overview over your desktop,
+like with similar functionality in Gnome, KDE, or wf.
+
+Example config:
+
+@example
+bind = SUPER, grave, hyprexpo:expo, toggle # can be: toggle, off/disable or on/enable
+
+plugin {
+    hyprexpo {
+        columns = 3
+        gap_size = 5
+        bg_col = rgb(111111)
+        workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
+
+        enable_gesture = true # laptop touchpad
+        gesture_fingers = 3  # 3 or 4
+        gesture_distance = 300 # how far is the \"max\"
+        gesture_positive = true # positive = swipe down. Negative = swipe up.
+    }
+}
+@end example
+")))
+
+(define-public hyprland-plugin-hyprtrails
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-hyprtrails")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./hyprtrails")))))))
+    (synopsis "A neat, but useless plugin to add trails behind windows")
+    (description "This neat, useless plugin adds trails behind windows.
+It even lets you change the colors.")))
+
+(define-public hyprland-plugin-hyprwinwrap
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-hyprwinwrap")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./hyprwinwrap")))))))
+    (synopsis "Clone of xwinwrap for Hyprland")
+    (description "A clone of xwinwrap for Hyprland. This lets you use any
+program as your desktop background.")))
+
+(define-public hyprland-plugin-xtra-dispatchers
+  (package
+    (inherit hyprland-official-plugin)
+    (name "hyprland-plugin-xtra-dispatchers")
+    (arguments
+     (substitute-keyword-arguments (package-arguments hyprland-official-plugin)
+       ((#:phases oldphases
+         #~%standard-phases)
+        #~(modify-phases #$oldphases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (invoke "ls" "-la")
+                (chdir "./xtra-dispatchers")))))))
+    (synopsis "Adds some additional dispatchers to Hyprland")
+    (description
+     "All dispatchers added are prefixed with @code{plugin:xtd:}.
+The added dispatchers are:
+@multitable @columnfractions .2 .6 .2
+@headitem name @tab description @tab params
+@item moveorexec
+@tab moves window to the current workspace, or executes if it's not found.
+@code{WINDOW} cannot contain commas
+@tab @code{WINDOW,CMD}
+@item throwunfocused
+@tab throws all unfocused windows on the current workspace to
+the given workspace
+@tab @code{WORKSPACE}
+@item bringallfrom
+@tab kinda inverse of throwunfocused. Bring all windows from
+a given workspace to the current one.
+@tab @code{WORKSPACE}
+@item closeunfocused
+@tab close all unfocused windows on the current workspace.
+@tab none
+@end multitable")))
+
 (define-public jumpapp
   (package
     (name "jumpapp")
-- 
2.49.0