home: services: Simplify (radix home services zathura)
parent
545806df43
commit
9338bb34cc
|
@ -6,119 +6,17 @@
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:export (face
|
#:export (face
|
||||||
face?
|
|
||||||
|
|
||||||
recolor-configuration
|
recolor-configuration
|
||||||
recolor-configuration?
|
|
||||||
|
|
||||||
gui-configuration
|
gui-configuration
|
||||||
gui-configuration?
|
|
||||||
|
|
||||||
key-map
|
key-map
|
||||||
key-map?
|
|
||||||
|
|
||||||
home-zathura-configuration
|
home-zathura-configuration
|
||||||
home-zathura-configuration-n-completion-items
|
home-zathura-service-type))
|
||||||
home-zathura-configuration-completion-face
|
|
||||||
home-zathura-configuration-completion-group-face
|
|
||||||
home-zathura-configuration-completion-highlight-face
|
|
||||||
home-zathura-configuration-default-face
|
|
||||||
home-zathura-configuration-exec-command
|
|
||||||
home-zathura-configuration-font
|
|
||||||
home-zathura-configuration-gui-configuration
|
|
||||||
home-zathura-configuration-inputbar-face
|
|
||||||
home-zathura-configuration-notification-face
|
|
||||||
home-zathura-configuration-notification-error-face
|
|
||||||
home-zathura-configuration-notification-warning-face
|
|
||||||
home-zathura-configuration-statusbar-face
|
|
||||||
home-zathura-configuration-statusbar-h-padding
|
|
||||||
home-zathura-configuration-statusbar-v-padding
|
|
||||||
home-zathura-configuration-window-icon
|
|
||||||
home-zathura-configuration-window-height
|
|
||||||
home-zathura-configuration-window-width
|
|
||||||
home-zathura-configuration-abort-clear-search
|
|
||||||
home-zathura-configuration-adjust-open
|
|
||||||
home-zathura-configuration-advance-pages-per-row
|
|
||||||
home-zathura-configuration-continuous-hist-save
|
|
||||||
home-zathura-configuration-database
|
|
||||||
home-zathura-configuration-dbus-service
|
|
||||||
home-zathura-configuration-dbus-raise-window
|
|
||||||
home-zathura-configuration-filemonitor
|
|
||||||
home-zathura-configuration-incremental-search
|
|
||||||
home-zathura-configuration-highlight-color
|
|
||||||
home-zathura-configuration-highlight-active-color
|
|
||||||
home-zathura-configuration-highlight-transparency
|
|
||||||
home-zathura-configuration-page-padding
|
|
||||||
home-zathura-configuration-page-cache-size
|
|
||||||
home-zathura-configuration-page-thumbnail-size
|
|
||||||
home-zathura-configuration-pages-per-row
|
|
||||||
home-zathura-configuration-first-page-column
|
|
||||||
home-zathura-configuration-recolor
|
|
||||||
home-zathura-configuration-render-loading
|
|
||||||
home-zathura-configuration-render-loading-face
|
|
||||||
home-zathura-configuration-scroll-hstep
|
|
||||||
home-zathura-configuration-scroll-step
|
|
||||||
home-zathura-configuration-scroll-full-overlap
|
|
||||||
home-zathura-configuration-scroll-wrap
|
|
||||||
home-zathura-configuration-show-directories
|
|
||||||
home-zathura-configuration-show-hidden
|
|
||||||
home-zathura-configuration-show-recent
|
|
||||||
home-zathura-configuration-scroll-page-aware
|
|
||||||
home-zathura-configuration-link-zoom
|
|
||||||
home-zathura-configuration-link-hadjust
|
|
||||||
home-zathura-configuration-search-hadjust
|
|
||||||
home-zathura-configuration-window-title-basename
|
|
||||||
home-zathura-configuration-window-title-home-tilde
|
|
||||||
home-zathura-configuration-window-title-page
|
|
||||||
home-zathura-configuration-statusbar-basename
|
|
||||||
home-zathura-configuration-statusbar-page-percent
|
|
||||||
home-zathura-configuration-statusbar-home-tilde
|
|
||||||
home-zathura-configuration-zoom-center
|
|
||||||
home-zathura-configuration-vertical-center
|
|
||||||
home-zathura-configuration-zoom-max
|
|
||||||
home-zathura-configuration-zoom-min
|
|
||||||
home-zathura-configuration-zoom-step
|
|
||||||
home-zathura-configuration-selection-clipboard
|
|
||||||
home-zathura-configuration-selection-notification
|
|
||||||
home-zathura-configuration-synctex
|
|
||||||
home-zathura-configuration-synctex-editor-command
|
|
||||||
home-zathura-configuration-index-face
|
|
||||||
home-zathura-configuration-index-active-face
|
|
||||||
home-zathura-configuration-sandbox
|
|
||||||
home-zathura-configuration-window-icon-document
|
|
||||||
home-zathura-configuration-page-right-to-left
|
|
||||||
home-zathura-configuration-key-maps
|
|
||||||
|
|
||||||
home-zathura-service-type
|
|
||||||
home-zathura-extension))
|
|
||||||
|
|
||||||
(define (zathura-mode? value)
|
(define (zathura-mode? value)
|
||||||
(->bool (member value '(normal fullscreen presentation index))))
|
(->bool (member value '(normal fullscreen presentation index))))
|
||||||
|
|
||||||
(define (zathura-command? value)
|
(define (string-or-false? x)
|
||||||
(define (zathura-function? value)
|
(or (string? x) (not x)))
|
||||||
(->bool (member (string->symbol value)
|
|
||||||
'(abort adjust-window change-mode display-link exec
|
|
||||||
focus-inputbar follow goto jumplist navigate
|
|
||||||
navigate-index print quit recolor reload rotate
|
|
||||||
scroll search set snap-to-page toggle-fullscreen
|
|
||||||
toggle-index toggle-inputbar toggle-page-mode
|
|
||||||
toggle-statusbar zoom mark-add mark-evaluate
|
|
||||||
feedkeys))))
|
|
||||||
(define (zathura-function-argument? value)
|
|
||||||
(->bool (member (string->symbol value)
|
|
||||||
'(best-fit bottom backward collapse collapse-all
|
|
||||||
default down expand expand-all forward full-down
|
|
||||||
full-up half-down half-up in left next out
|
|
||||||
page-bottom page-top previous right rotate-ccw
|
|
||||||
rotate-cw select specific toggle top up width))))
|
|
||||||
(->bool (or (not value)
|
|
||||||
(match (string-split value #\ )
|
|
||||||
((function)
|
|
||||||
(zathura-function? function))
|
|
||||||
((function argument)
|
|
||||||
(and (zathura-function? function)
|
|
||||||
(zathura-function-argument? argument)))))))
|
|
||||||
|
|
||||||
(define-configuration/no-serialization key-map
|
(define-configuration/no-serialization key-map
|
||||||
(mode
|
(mode
|
||||||
|
@ -127,8 +25,8 @@
|
||||||
(binding
|
(binding
|
||||||
string ; improve this with regex
|
string ; improve this with regex
|
||||||
"The key combination that the key-map will use.")
|
"The key combination that the key-map will use.")
|
||||||
(command zathura-command
|
(command string-or-false
|
||||||
"Function, and optionally an argument"))
|
"Function and, optionally, arguments separated by spaces."))
|
||||||
|
|
||||||
(define list-of-key-maps?
|
(define list-of-key-maps?
|
||||||
(list-of key-map?))
|
(list-of key-map?))
|
||||||
|
|
Loading…
Reference in New Issue