1(define-module (nmeum packages desktop)2 #:use-module (guix)3 #:use-module (guix gexp)4 #:use-module (guix git-download)5 #:use-module (guix build-system gnu)6 #:use-module (guix build-system zig)7 #:use-module ((guix licenses) #:prefix license:)8 #:use-module (gnu packages)9 #:use-module (gnu packages audio)10 #:use-module (gnu packages fonts)11 #:use-module (gnu packages zig)12 #:use-module (gnu packages zig-xyz)13 #:use-module (gnu packages freedesktop)14 #:use-module (gnu packages linux)15 #:use-module (gnu packages xdisorg)16 #:use-module (gnu packages pkg-config)17 #:use-module (gnu packages fontutils)18 #:use-module (gnu packages textutils))1920(define-public dumb-runtime-dir21 (package22 (name "dumb-runtime-dir")23 (version "1.0.4")24 (source25 (origin26 (method git-fetch)27 (uri (git-reference28 (url "https://github.com/ifreund/dumb_runtime_dir")29 (commit (string-append "v" version))))30 (file-name (git-file-name name version))31 (sha25632 (base32 "0nrxhvbh3bs4pi4f5h03zw1p1ys19qmmlx263ysly8302wkxk1m4"))))33 (build-system gnu-build-system)34 (arguments35 (list36 #:tests? #f37 #:make-flags #~(list (string-append "CC="38 #$(cc-for-target))39 (string-append "PREFIX=")40 (string-append "DESTDIR="41 #$output))42 #:phases #~(modify-phases %standard-phases43 (delete 'configure))))44 (inputs (list linux-pam))45 (native-inputs (list pkg-config))46 (home-page "https://github.com/ifreund/dumb_runtime_dir")47 (synopsis "Creates an XDG_RUNTIME_DIR via PAM")48 (description49 "Provides a acronym{PAM, Pluggable Authentication Module} for50creating a primitve @code{XDG_RUNTIME_DIR} that is never removed. This51is useful in conjuction with simple seat managers like @code{seatd}52which do not set @code{XDG_RUNTIME_DIR}.")53 (license license:bsd-0)))5455(define-public zig-fcft56 (package57 (name "zig-fcft")58 (version "1.1.0")59 (source60 (origin61 (method git-fetch)62 (uri (git-reference63 (url "https://git.sr.ht/~novakane/zig-fcft")64 (commit version)))65 (file-name (git-file-name name version))66 (sha25667 (base32 "0im0rdwww7xxvhmibfp3459h8wwdmihjb9m7vmzxkgqs4x77l114"))))68 (build-system zig-build-system)69 (arguments70 (list71 #:skip-build? #t72 #:tests? #f))73 (propagated-inputs (list zig-pixman fcft))74 (native-inputs (list pkg-config))75 (synopsis "Zig bindings for the fcft font library")76 (description "")77 (home-page "https://git.sr.ht/~novakane/zig-fcft")78 (license license:expat)))7980(define-public creek81 (package82 (name "creek")83 (version "0.4.2")84 (source85 (origin86 (method git-fetch)87 (uri (git-reference88 (url "https://github.com/nmeum/creek")89 (commit (string-append "v" version))90 (recursive? #t)))91 (file-name (git-file-name name version))92 (sha25693 (base32 "0b1gpxgi207cqrls6qp0pd6749g60yfcrjii8nagm00c678bs3nx"))))94 (build-system zig-build-system)95 (arguments96 (list97 #:zig-release-type "safe"98 #:tests? #f))99 (native-inputs (list fcft100 pixman101 pkg-config102 zig-wayland103 zig-fcft104 zig-pixman))105 (home-page "https://github.com/nmeum/leeve")106 (synopsis107 "A minimalistic and malleable status bar for the River compositor.")108 (description "A fork of the creek status bar which intended to be109more mallable then the original version. For example,110supporting custom status bar information via stdin.")111 (license license:expat)))112113(define-public ustatus114 (let ((commit "4032e2010de049472b7af57e85b7e4728fdde5e7")115 (revision "0"))116 (package117 (name "ustatus")118 (version (git-version "20190721" revision commit))119 (source120 (origin121 (method git-fetch)122 (uri (git-reference123 (url "https://github.com/nmeum/ustatus")124 (commit commit)))125 (file-name (git-file-name name version))126 (sha256127 (base32 "0a9pf51c2j68s7limdhw8ccqhyc1lk3q0iddfh1y65m18jh1vmn1"))))128 (build-system gnu-build-system)129 (arguments130 (list131 #:tests? #f132 #:make-flags133 #~(list (string-append "CC="134 #$(cc-for-target)))135 #:phases136 #~(modify-phases %standard-phases137 (replace 'configure138 (lambda _139 (with-output-to-file "config.h"140 (lambda _141 (display142 "static const int delay = 5;143 static const char *statsep = \" | \";144 static const char *timefmt = \"%a %d %b -- %H:%M:%S\";145 static const char *sysbat = \"/sys/class/power_supply/BAT0\";146 static const char *syscur = \"charge_now\";147 static const char *sysfull = \"charge_full_design\";148 static const unsigned int sndcrd = 0;149 static const char* swtchname = \"Master Playback Switch\";150 static const char* volumname = \"Master Playback Volume\";151152 static size_t batcapmay(char *dest, size_t n) {153 size_t ret;154 static int hasbat = -1;155156 if (hasbat == -1) {157 if (access(sysbat, F_OK)) {158 hasbat = 0;159 return 0;160 }161 hasbat = 1;162 } else if (!hasbat) {163 return 0;164 }165166 ret = batcap(dest, n);167 if (ret)168 ret += separator(&dest[ret], n - ret);169170 return ret;171 }172173 static size_t (* const sfuncs[])(char*, size_t) = {174 batcapmay,175 loadavg,176 separator,177 curtime,178 };179 ")))))180 (replace 'install181 (lambda* (#:key outputs #:allow-other-keys)182 (let* ((outdir (assoc-ref outputs "out"))183 (bindir (string-append outdir "/bin")))184 (mkdir-p bindir)185 (copy-file "ustatus"186 (string-append bindir "/ustatus"))))))))187 (inputs (list tinyalsa))188 (native-inputs (list pkg-config))189 (home-page "https://git.8pit.net/ustatus")190 (synopsis "Minimal status tool for dwm-like status bars")191 (description "")192 (license license:wtfpl2))))193194(define-public dam195 (let ((commit "e6eb713fb3239aad3c534502d8c0e42e4e514c8f")196 (revision "1"))197 (package198 (name "dam")199 (version (git-version "0" revision commit))200 (source201 (origin202 (method git-fetch)203 (uri (git-reference204 (url "https://codeberg.org/sewn/dam")205 (commit commit)))206 (file-name (git-file-name name version))207 (sha256208 (base32 "0ybhyvv3n1xdy5hb1xw7l2rzy73n5vhh8r60gfbf61crhggnzh8k"))))209 (build-system gnu-build-system)210 (arguments211 (list212 #:tests? #f213 #:make-flags #~(list (string-append "PREFIX=" #$output))214 #:phases #~(modify-phases %standard-phases215 (add-before 'configure 'set-cc-command216 (lambda _217 (setenv "CC" #$(cc-for-target))))218 (delete 'configure))))219 (inputs (list fcft pixman wayland wayland-protocols))220 (native-inputs (list pkg-config))221 (home-page "https://codeberg.org/sewn/dam")222 (synopsis "A itsy-bitsy dwm-esque bar for the river compositor")223 (description "")224 (license license:expat))))225226(define-public font-terminus-patched227 (package228 (inherit font-terminus)229 (name "font-terminus-patched")230 (arguments231 (substitute-keyword-arguments (package-arguments font-terminus)232 ((#:phases phases233 '%standard-phases)234 #~(modify-phases #$phases235 (add-after 'unpack 'patch-font236 (lambda _237 (invoke "patch" "-p0" "-i" "alt/td1.diff")238 (invoke "patch" "-p0" "-i" "alt/ll2.diff")))))))))