home-environments: radio: Add fish abbreviations to quick acess of PARA directories

sioyek
Luis Guilherme Coelho 2024-02-13 18:54:45 -03:00
parent 9ac53fb19b
commit 65909e3464
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
2 changed files with 25 additions and 13 deletions

View File

@ -211,7 +211,7 @@
home-channels-service-type
(list (channel
(name 'radix)
(url "https://codeberg.org/anemofilia/radix")
(url "https://codeberg.org/anemofilia/radix.git")
(branch "main")
(introduction
(make-channel-introduction
@ -279,16 +279,17 @@
("':e'" . "kak")
("':q'" . "exit")))
(abbreviations
`(,@fish-abbreviations:user-dirs
,@fish-abbreviations:extensions
`(,@fish-abbreviations:bookmarks
,@fish-abbreviations:channels
,@fish-abbreviations:config
,@fish-abbreviations:quick-edit
,@fish-abbreviations:bookmarks
,@fish-abbreviations:history
,@fish-abbreviations:download/upload
,@fish-abbreviations:extensions
,@fish-abbreviations:guix
,@fish-abbreviations:history
,@fish-abbreviations:para
,@fish-abbreviations:quick-edit
,@fish-abbreviations:terminal-emulators
,@fish-abbreviations:download/upload))))
,@fish-abbreviations:user-dirs))))
(simple-service 'environment-variables-service
home-environment-variables-service-type

View File

@ -1,20 +1,31 @@
(define-module (radio fish-abbreviations)
#:use-module (ice-9 curried-definitions)
#:use-module (radix home services shells)
#:export (user-dirs
extensions
#:export (bookmarks
channels
config
quick-edit
bookmarks
download/upload
extensions
guix
history
para
quick-edit
terminal-emulators
download/upload))
user-dirs))
(define at
(symbol-prefix-proc '@))
(define para
(map (lambda (dir)
(abbreviation
(name (at dir))
(position 'anywhere)
(expansion (format #f "~~/~:[~;.~]~a"
(equal? dir 'archive)
dir))))
'(areas projects resources archive)))
(define user-dirs
(map (lambda (dir)
(abbreviation
@ -96,7 +107,7 @@
(fish-function "bang-star")))))
(define config
(let* ((radix '~/areas/code/scm/radix/)
(let* ((radix '~/areas/code/scm/radix)
(user (string->symbol (getlogin)))
(os (string->symbol (gethostname))))
(list (abbreviation