Add configuration to set a random wallpaper on login
This commit is contained in:
parent
8e798ea24f
commit
683bc98c6f
2 changed files with 49 additions and 3 deletions
|
@ -21,13 +21,15 @@
|
|||
#:use-module (oni home services kdeconnect)
|
||||
#:use-module (oni home services cmst)
|
||||
#:use-module (oni home services syncthing)
|
||||
#:use-module (oni packages hlwm-run-or-raise))
|
||||
#:use-module (oni packages hlwm-run-or-raise)
|
||||
#:use-module (oni packages pick-random-wallpaper))
|
||||
|
||||
(home-environment
|
||||
(packages (list (specification->package+output "glibc-locales")
|
||||
(specification->package+output "font-fantasque-sans")
|
||||
(specification->package+output "font-comic-neue")
|
||||
hlwm-run-or-raise))
|
||||
hlwm-run-or-raise
|
||||
pick-random-wallpaper))
|
||||
|
||||
(services
|
||||
(list
|
||||
|
@ -358,7 +360,8 @@
|
|||
"keybind Mod4-apostrophe spawn dunstctl close"
|
||||
"keybind Mod4-quotedbl spawn dunstctl close-all"
|
||||
"keybind Mod4-Control-apostrophe spawn dunstctl history-pop"
|
||||
"keybind Mod4-Mod1-apostrophe spawn dunstctl context"))))
|
||||
"keybind Mod4-Mod1-apostrophe spawn dunstctl context"
|
||||
"pick-random-wallpaper"))))
|
||||
|
||||
(service home-polybar-service-type
|
||||
(home-polybar-configuration
|
||||
|
|
43
oni/packages/pick-random-wallpaper.scm
Normal file
43
oni/packages/pick-random-wallpaper.scm
Normal file
|
@ -0,0 +1,43 @@
|
|||
(define-module (oni packages pick-random-wallpaper)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages wm)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages image-viewers))
|
||||
|
||||
(define-public pick-random-wallpaper
|
||||
(let ((commit "abc336dea1187f9d115a062d389c7c5ec730c144")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "pick-random-wallpaper")
|
||||
(version (git-version "0.0.0" revision commit))
|
||||
(source
|
||||
(origin
|
||||
(uri (git-reference
|
||||
(url "git://ryuslash.org/util/tom/pick-random-wallpaper.git")
|
||||
(commit commit)))
|
||||
(method git-fetch)
|
||||
(sha256
|
||||
(base32 "074iack66w32f54ldinrr8kf6b9pp0dx81qp0sjv6jbvgwp9daax"))
|
||||
(file-name (git-file-name name version))))
|
||||
(propagated-inputs
|
||||
(list findutils bash herbstluftwm xwininfo grep sed coreutils feh))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; There is no test suite.
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(delete 'build)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
|
||||
(install-file "pick-random-wallpaper" bin)))))))
|
||||
(home-page "https://ryuslash.org/")
|
||||
(synopsis "A simple script that sets a random wallpaper using feh.")
|
||||
(description "Sets a random wallpaper using feh and stores which wallpaper was added in a herbstluftwm attribute.")
|
||||
(license license:gpl3+))))
|
Loading…
Reference in a new issue