mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2025-06-25 11:55:26 +00:00
services: Add home-theme-service-type.
* modules/rosenthal/services/desktop.scm (home-theme-service-type): New variable. (home-theme-configuration): New data type. * .dir-locals.el (scheme-mode): Add its indentation.
This commit is contained in:
parent
6a9c5289d0
commit
07e2be7791
@ -61,6 +61,7 @@
|
||||
(eval . (put 'home-rofi-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'home-socks2http-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'home-swaybg-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'home-theme-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'home-wakapi-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'home-waybar-configuration 'scheme-indent-function 0))
|
||||
(eval . (put 'iwd-configuration 'scheme-indent-function 0))
|
||||
|
@ -51,6 +51,9 @@
|
||||
home-swaybg-configuration
|
||||
home-swaybg-service-type
|
||||
|
||||
home-theme-configuration
|
||||
home-theme-service-type
|
||||
|
||||
home-waybar-configuration
|
||||
home-waybar-service-type
|
||||
|
||||
@ -409,6 +412,96 @@ configuration {
|
||||
(description
|
||||
"Run swaybg, a screen wallpaper utility for Wayland compositors.")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; theme
|
||||
;;;
|
||||
|
||||
(define-record-type* <home-theme-configuration>
|
||||
home-theme-configuration
|
||||
make-home-theme-configuration
|
||||
home-theme-configuration?
|
||||
this-home-theme-configuration
|
||||
(packages home-theme-configuration-packages
|
||||
(default '()))
|
||||
(icon-theme home-theme-configuration-icon-theme
|
||||
(default "Adwaita"))
|
||||
(cursor-theme home-theme-configuration-cursor-theme
|
||||
(default "Adwaita"))
|
||||
(cursor-size home-theme-configuration-cursor-size
|
||||
(default 24))
|
||||
(key-theme home-theme-configuration-key-theme
|
||||
(default "Emacs"))
|
||||
;; Extensions.
|
||||
(environment-variables home-theme-configuration-environment-variables
|
||||
(default (%home-theme-environment-variables
|
||||
this-home-theme-configuration))
|
||||
(thunked))
|
||||
(profile home-theme-configuration-profile
|
||||
(default (%home-theme-profile
|
||||
this-home-theme-configuration))
|
||||
(thunked))
|
||||
(files home-theme-configuration-files
|
||||
(default (%home-theme-files
|
||||
this-home-theme-configuration))
|
||||
(thunked))
|
||||
(xdg-config home-theme-configuration-xdg-config
|
||||
(default (%home-theme-xdg-config
|
||||
this-home-theme-configuration))
|
||||
(thunked)))
|
||||
|
||||
(define (%home-theme-environment-variables _)
|
||||
'(("QT_QPA_PLATFORMTHEME" . "gtk3")
|
||||
("QT_WAYLAND_DECORATION" . "adwaita")))
|
||||
|
||||
(define %home-theme-profile
|
||||
(match-record-lambda <home-theme-configuration>
|
||||
(packages)
|
||||
(append (specs->pkgs "adwaita-icon-theme"
|
||||
"hicolor-icon-theme"
|
||||
"qtwayland")
|
||||
packages)))
|
||||
|
||||
(define %home-theme-files
|
||||
(match-record-lambda <home-theme-configuration>
|
||||
(icon-theme)
|
||||
`((".icons/default/index.theme"
|
||||
,(plain-file "index.theme"
|
||||
(format #f "~
|
||||
[icon theme]
|
||||
Inherits = ~a~%"
|
||||
icon-theme))))))
|
||||
|
||||
(define %home-theme-xdg-config
|
||||
(match-record-lambda <home-theme-configuration>
|
||||
(icon-theme cursor-theme cursor-size key-theme)
|
||||
`(("gtk-3.0/settings.ini"
|
||||
,(plain-file "settings.ini"
|
||||
(format #f "~
|
||||
[Settings]
|
||||
gtk-theme-name = Adwaita
|
||||
gtk-icon-theme-name = ~a
|
||||
gtk-font-name = Sans 11
|
||||
gtk-cursor-theme-name = ~a
|
||||
gtk-cursor-theme-size = ~a
|
||||
gtk-key-theme-name = ~a~%"
|
||||
icon-theme cursor-theme cursor-size key-theme))))))
|
||||
|
||||
(define home-theme-service-type
|
||||
(service-type
|
||||
(name 'theme)
|
||||
(extensions
|
||||
(list (service-extension home-environment-variables-service-type
|
||||
home-theme-configuration-environment-variables)
|
||||
(service-extension home-profile-service-type
|
||||
home-theme-configuration-profile)
|
||||
(service-extension home-files-service-type
|
||||
home-theme-configuration-files)
|
||||
(service-extension home-xdg-configuration-files-service-type
|
||||
home-theme-configuration-xdg-config)))
|
||||
(default-value (home-theme-configuration))
|
||||
(description "Set up desktop themes.")))
|
||||
|
||||
|
||||
;;;
|
||||
;;; waybar
|
||||
|
Loading…
Reference in New Issue
Block a user