aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni/home/config/data.scm5
-rw-r--r--oni/packages/window-management.scm81
2 files changed, 85 insertions, 1 deletions
diff --git a/oni/home/config/data.scm b/oni/home/config/data.scm
index bbc336a..9872783 100644
--- a/oni/home/config/data.scm
+++ b/oni/home/config/data.scm
@@ -32,7 +32,8 @@
#:use-module (oni packages emacs)
#:use-module (oni packages emacs-config)
#:use-module (oni packages pick-random-wallpaper)
- #:use-module (oni home services lisp))
+ #:use-module (oni home services lisp)
+ #:use-module (oni packages window-management))
(include "../../../emacs/.emacs.d/init.scm")
@@ -108,6 +109,8 @@
gforth
+ gliver
+
emacs-consult-yasnippet)))
(services
diff --git a/oni/packages/window-management.scm b/oni/packages/window-management.scm
new file mode 100644
index 0000000..fc6aa83
--- /dev/null
+++ b/oni/packages/window-management.scm
@@ -0,0 +1,81 @@
+(define-module (oni packages window-management)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system gnu)
+ #:use-module (gnu packages zig-xyz)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages guile)
+ #:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages gnome)
+ #:use-module (guix gexp))
+
+;; This is a temporary copy until
+;; https://codeberg.org/guix/guix/pulls/11817/files is merged and I can install
+;; it through there.
+(define-public gliver
+ (let ((commit "ff31171b9c1e89fe2a602ec9d8f603d274adc549")
+ (revision "0"))
+ (package
+ (name "gliver")
+ (version (git-version "0.0.4" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (commit commit)
+ (url "https://codeberg.org/ebeem/gliver.git")))
+ (sha256
+ "1ajafbvzxnhfq7n0mbqyc4ibdxk007x0idx2c9vs3sdg3c6chsap")))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:modules `(((guix build guile-build-system)
+ #:select (target-guile-effective-version))
+ ,@%default-gnu-modules)
+ #:phases (with-imported-modules
+ `((guix build guile-build-system)
+ ,@%default-gnu-imported-modules)
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'install 'patch-desktop-file
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute*
+ (string-append #$output "/share/wayland-sessions/gliver.desktop")
+ (("Exec=river -c gliver")
+ (string-append
+ "Exec=" (assoc-ref inputs "river") "/bin/river -c " #$output "/bin/gliver")))))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((bin (string-append #$output "/bin"))
+ (version (target-guile-effective-version))
+ (guile-load-path (string-append "/share/guile/site/" version))
+ (guile-load-compiled-path (string-append "/lib/guile/" version "/site-ccache"))
+ (gcairo (assoc-ref inputs "guile-cairo"))
+ (program-wrapper (lambda (program)
+ (wrap-program (string-append bin program)
+ `("GUILE_LOAD_PATH" prefix
+ (,(string-append #$output guile-load-path)
+ ,(string-append gcairo guile-load-path)))
+ `("GUILE_LOAD_COMPILED_PATH"
+ prefix
+ (,(string-append #$output guile-load-compiled-path)
+ ,(string-append gcairo guile-load-compiled-path)))))))
+ (program-wrapper "/gliver")
+ (program-wrapper "/gliver-repl"))))))
+ #:make-flags
+ #~(list (string-append "PREFIX=" #$output)
+ "GUILE_AUTO_COMPILE=0")))
+ (native-inputs (list guile-3.0-latest pkg-config))
+ (inputs (list river wayland-protocols guile-3.0-latest wayland libxkbcommon guile-cairo pango librsvg))
+ (home-page "https://codeberg.org/ebeem/gliver")
+ (synopsis "Guile Scheme Wayland window manager based on River")
+ (description
+ "Gliver is a keyboard-driven & manually tiling window manager using River
+written in Guile Scheme. It attempts to be highly customizable while relying
+ entirely on the keyboard for input.")
+ (license license:gpl3+))))
+
+gliver