Compare commits

...

2 Commits

Author SHA1 Message Date
Raghav Gururajan a3a17f7a51
services: Add auto-login-to-tty. 2021-12-20 11:03:59 -05:00
Raghav Gururajan 04488bc38e
packages: Add st-custom. 2021-12-20 11:03:59 -05:00
2 changed files with 71 additions and 0 deletions

60
rg/packages/suckless.scm Normal file
View File

@ -0,0 +1,60 @@
(define-module (rg packages suckless)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages suckless))
(define-public st-custom
(package
(inherit st)
(name "st-custom")
(version (package-version st))
(source
(origin
(method url-fetch)
(uri (string-append "https://dl.suckless.org/st/st-"
version ".tar.gz"))
(sha256
(base32 "19j66fhckihbg30ypngvqc9bcva47mp379ch5vinasjdxgn3qbfl"))
(patches
(list
;; Enables scrolling using Shift+{PageUp,PageDown}.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-20201205-4ef0cbd.diff"))
(file-name "st-scrollback.patch")
(sha256
(base32 "1d1gyfbn4slsnl9paviajlwa7mf7wijvpxh0w6ibyb1m2lc7v31v")))
;; Enables scrolling using Shift+MouseWheel.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-mouse-20191024-a2c479c.diff"))
(file-name "st-scrollback-mouse.patch")
(sha256
(base32 "0z961sv4pxa1sxrbhalqzz2ldl7qb26qk9l11zx1hp8rh3cmi51i")))
;; Disables scrolling using mouse wheel, when in MODE_ALTSCREEN.
(origin
(method url-fetch)
(uri (string-append "https://st.suckless.org/patches/scrollback/"
"st-scrollback-mouse-altscreen-20200416-5703aa0.diff"))
(file-name "st-scrollback-mouse-altscreen.patch")
(sha256
(base32 "17avl5bgwlh5ayaqfg01sg9klf828hc0fd36cgzldnl595jyp1yb")))))))
(arguments
(substitute-keyword-arguments (package-arguments st)
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'patch
(lambda _
;; Rename the config file, so that the changes
;; are picked up by build script.
(rename-file "config.def.h" "config.h")
(substitute* "config.h"
;; Change font from Liberation to Noto.
;; Use font size 10.
(("Liberation Mono:pixelsize=12")
"NotoMono:size=10"))))))))))

11
rg/services/base.scm Normal file
View File

@ -0,0 +1,11 @@
(define-module (rg services base)
#:use-module (gnu services)
#:use-module (gnu services base))
(define-public (auto-login-to-tty config tty user)
(if (string=? tty (mingetty-configuration-tty config))
(mingetty-configuration
(inherit config)
(auto-login user))
config))