(define-module (freya packages wm) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages wm) #:use-module (gnu packages freedesktop) #:use-module (gnu packages cpp) #:use-module (gnu packages gcc) #:use-module (gnu packages build-tools) #:use-module (gnu packages pkg-config) #:use-module (gnu packages xdisorg) #:use-module (gnu packages gtk) #:use-module (gnu packages gl) #:use-module (gnu packages linux) #:use-module (gnu packages pciutils) #:use-module (gnu packages image) #:use-module (gnu packages glib) #:use-module (guix download) #:use-module (guix packages) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system meson) #:use-module (guix build utils) #:use-module (rosenthal packages wm) #:use-module (rosenthal packages freedesktop) #:use-module (guix utils)) (define-public swaylock-effects-new (package (inherit swaylock-effects) (version "1.6.11") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/jirutka/swaylock-effects") (commit (string-append "v" version)))) (sha256 (base32 "0j7dxn66xqlf6iv2arqzz7mxlh7nf85anvpyf30d2frcidarda9h")))) (inputs (modify-inputs (package-inputs swaylock-effects) (delete "linux-pam"))))) (define-public waybar-new (package (inherit waybar) (name "waybar-new") (version "0.10.3") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/Alexays/Waybar") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "04xd61ycn1nisq1s5ch14zkbsjcfcy6n29nkjn68s2ribmws0iid")))) (arguments (list #:configure-flags #~(list "--wrap-mode=nodownload" "-Dexperimental=true"))))) (define cairo-for-hyprland (package (inherit cairo) (name "cairo") (version "1.18.0") (source (origin (method url-fetch) (uri (string-append "https://cairographics.org/releases/cairo-" version ".tar.xz")) (sha256 (base32 "0r0by563s75xyzz0d0j1nmjqmdrk2x9agk7r57p3v8vqp4v0ffi4")))) (build-system meson-build-system) (arguments (list #:tests? #f #:glib-or-gtk? #t #:configure-flags #~(list "-Dspectre=disabled"))) (outputs '("out")))) (define hwdata-for-hyprland (package (inherit hwdata) (arguments (substitute-keyword-arguments (package-arguments hwdata) ((#:phases _) #~%standard-phases))) (outputs '("out")))) (define libdrm-for-hyprland (package (inherit libdrm) (name "libdrm") (version "2.4.120") (source (origin (method url-fetch) (uri (string-append "https://dri.freedesktop.org/libdrm/libdrm-" version ".tar.xz")) (sha256 (base32 "0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v")))))) (define hyprland-unbundle-wlroots-patch (origin (method url-fetch) (uri (string-append "https://github.com/hyprwm/Hyprland" "/raw/" "cba1ade848feac44b2eda677503900639581c3f4" "/nix/patches/meson-build.patch")) (sha256 (base32 "0fwvsshz3k6061p3hdl175pydmj80vnw5rm4xfcn64w1ssfq7liw")))) (define wayland-protocols-for-hyprland (package (inherit wayland-protocols) (name "wayland-protocols") (version "1.36") (source (origin (method url-fetch) (uri (string-append "https://gitlab.freedesktop.org/wayland/wayland-protocols" "/-/releases/" version "/downloads/" "wayland-protocols-" version ".tar.xz")) (sha256 (base32 "14kyxywpfkgpjpkrybs28q1s2prnz30k1b4zap5a3ybrbvh4vzbi")))))) (define wlroots-for-hyprland (let ((base wlroots) (revision "1") (commit "5c1d51c5a2793480f5b6c4341ad0797052aec2ea")) (package (inherit base) (name "wlroots") (version (git-version "0.18.0-dev-hyprland" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hyprwm/wlroots-hyprland") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "0gy0g0kxb3q1wjqrypnvmrxcb4ld3advikchygpwpfp4s9v0mmvd")))) (arguments (substitute-keyword-arguments (package-arguments wlroots) ((#:phases phases #~%standard-phases) #~(modify-phases #$phases (add-after 'unpack 'adjust-patching-script (lambda _ (substitute* "patches/apply.sh" (("apply \\|\\| check_applied \\|\\| fail") "patch -Np1 < $PATCH")))))))) (propagated-inputs (modify-inputs (package-propagated-inputs wlroots) (prepend libdrm-for-hyprland) (replace "libinput-minimal" libinput-minimal-1.24.0) (replace "wayland-protocols" wayland-protocols-for-hyprland))) (native-inputs (modify-inputs (package-native-inputs base) (replace "hwdata" `(,hwdata-for-hyprland "out"))))))) (define-public hyprland-plugin-hy3 (package (name "hyprland-plugin-hy3") (version "0.40.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/outfoxxed/hy3" "/archive/refs/tags/hl" version ".tar.gz")) (sha256 (base32 "13rnv24nc52fzvh7ryl7q91cr59z0qsv4vlnps5vr78g58lx11j0")))) (build-system cmake-build-system) (arguments `(#:tests? #f #:configure-flags '("DCMAKE_BUILD_TYPE=Release"))) (native-inputs (list meson pkg-config)) (inputs (list pixman libdrm pango gcc-13 libinput hyprland-protocols hyprwayland-scanner hyprlang hyprland wayland wlroots-for-hyprland)) (license license:gpl3) (home-page "https://github.com/outfoxxed/hy3") (synopsis "i3 / sway like layout for hyprland.") (description "Hyprland plugin for an i3 / sway like manual tiling layout"))) (define-public hyprland-plugin-hyprbars (let ((commit "fd133914bf1921db2a26627698f914478f6a9471") (revision "1")) (package (name "hyprland-plugin-hyprbars") (version (git-version "0.40.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hyprwm/hyprland-plugins.git") (commit commit))) (sha256 (base32 "0518ggbam7rllf9xfzhfn9fp364rbiycsrkag74jscy5br5cyl4g")) (file-name (git-file-name name version)))) (build-system meson-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'chdir (lambda _ (chdir "../source/hyprbars/")))))) (native-inputs (list pkg-config)) (inputs (list pango gcc-13 libinput hyprland-protocols hyprwayland-scanner hyprlang hyprland wayland wlroots-for-hyprland)) (license license:bsd-3) (home-page "https://github.com/hyprwm/hyprland-plugins") (synopsis "adds simple title bars to windows") (description "adds simple title bars to windows")))) (define-public hyprlock (let ((commit "d9a6229434fba475ea42b634ee2f03919236798d") (revision "1")) (package (name "hyprlock") (version (git-version "0.3.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/hyprwm/hyprlock") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "19cg8vj4sgz5pxib9m08af1lilay9bckjhlr6h333s014l7y09sw")))) (build-system cmake-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-egl (lambda _ (substitute* (list "src/core/Egl.hpp" "src/renderer/DMAFrame.cpp") (("#include " include) (string-append include "\n#include \n"))) #t))))) (native-inputs (list gcc-13 pkg-config mesa-headers)) (inputs (list cairo-for-hyprland pango libxkbcommon hyprlang mesa wayland-protocols-for-hyprland wlroots-for-hyprland linux-pam libdrm-for-hyprland libglvnd)) (home-page "https://github.com/hyprwm/hyprlock") (license license:bsd-3) (synopsis "Screen locker for Hyprland") (description "Screen locker for hyprland.")))) (define-public hyprpaper (package (name "hyprpaper") (version "0.7.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/hyprwm/hyprpaper" "/archive/refs/tags/v" version ".tar.gz")) (sha256 (base32 "1d23nsj5hzyxwvhkg9a7x1b8jgyqwzad91zb1894jnxr2d844h28")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) (native-inputs (list gcc-13 pkg-config)) (inputs (list hyprlang wayland-protocols-for-hyprland wayland cairo-for-hyprland libjpeg-turbo libwebp mesa pango libglvnd)) (home-page "https://github.com/hyprwm/hyprpaper") (license license:bsd-3) (synopsis "Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.") (description "Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls."))) (define-public hypridle (package (name "hypridle") (version "0.1.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/hyprwm/hypridle" "/archive/refs/tags/v" version ".tar.gz")) (sha256 (base32 "0ybwip7yq9q569naz5bnrvcdz99648c4pln2zi30z21y333hpas0")))) (build-system cmake-build-system) (arguments `(#:tests? #f)) (native-inputs (list gcc-13 pkg-config)) (inputs (list hyprlang wayland-protocols-for-hyprland wayland sdbus-c++)) (home-page "https://github.com/hyprwm/hypridle") (license license:bsd-3) (synopsis "Hyprland's idle daemon ") (description "Hyprland's idle daemon ")))