guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu: Add x-resize.


From: guix-commits
Subject: 02/05: gnu: Add x-resize.
Date: Sat, 30 Dec 2023 00:29:18 -0500 (EST)

apteryx pushed a commit to branch master
in repository guix.

commit 24f3b2eb108d6403dc3efe92bbf29a98bdb6eb35
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Dec 18 15:30:33 2023 -0500

    gnu: Add x-resize.
    
    * gnu/packages/xdisorg.scm (x-resize): New variable.
    
    Change-Id: Ia36c07fba5a90f792cfe50b1e060891cf5706839
---
 gnu/packages/xdisorg.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 485d55a8d3..449cbbaf6e 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -118,6 +118,7 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages guile-xyz)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
@@ -2931,6 +2932,62 @@ can optionally use some appearance settings from 
XSettings, tint2 and GTK.")
     (home-page "https://jgmenu.github.io/";)
     (license license:gpl2)))
 
+(define-public x-resize
+  (package
+    (name "x-resize")
+    (version "0.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/Apteryks/x-resize";)
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "10y2p55m5hbrma01kixsppq1a3ld0q1jk8hwx1d1jfgw9vd243j8"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ;no test suite
+      #:modules `(((guix build guile-build-system)
+                   #:select (target-guile-effective-version))
+                  ,@%gnu-build-system-modules
+                  (srfi srfi-26))
+      #:phases
+      (with-imported-modules `((guix build guile-build-system)
+                               ,@%gnu-build-system-modules)
+        #~(modify-phases %standard-phases
+            (add-after 'install 'wrap
+              (lambda* (#:key inputs #:allow-other-keys)
+                (let* ((version (target-guile-effective-version))
+                       (site-ccache (string-append "/lib/guile/" version
+                                                   "/site-ccache"))
+                       (site (string-append "/share/guile/site/" version))
+                       (dep-path
+                        (lambda (env path)
+                          (list env '=
+                                (map (cut string-append <> path)
+                                     (list #$output
+                                           #$(this-package-input
+                                              "guile-lib")
+                                           #$(this-package-input
+                                              "guile-udev"))))))
+                       (bin (string-append #$output "/bin/")))
+                  (wrap-program (string-append bin "x-resize")
+                    (dep-path "GUILE_LOAD_PATH" site)
+                    (dep-path "GUILE_LOAD_COMPILED_PATH" site-ccache)
+                    (dep-path "GUILE_EXTENSIONS_PATH" "/lib")))))))))
+    (native-inputs (list autoconf automake guile-3.0 pkg-config))
+    (inputs (list guile-lib guile-udev xrandr))
+    (home-page "https://gitlab.com/Apteryks/x-resize/";)
+    (synopsis "Dynamic display resizing leveraging udev events")
+    (description "The @command{x-resize} command detects physical display
+resolution changes via udev and invokes the @command{xrandr} command to
+reconfigure the active display resolution accordingly.  It can be used to
+implement dynamic resize support for desktop environments that lack native
+support such as Xfce.")
+    (license license:gpl3+)))
+
 (define-public xwallpaper
   (package
     (name "xwallpaper")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]