home-environments: radio: Add more fish abbreviations

impermanence
Luis Guilherme Coelho 2024-03-09 11:02:49 -03:00
parent f7563fff85
commit 5a3ddf0fa5
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 86 additions and 67 deletions

View File

@ -3,7 +3,7 @@
#|M|# #:use-module (ice-9 match) #|M|# #:use-module (ice-9 match)
#|GNU|# #|GNU|#
#| |# #:use-module (gnu) #||# #:use-module (gnu)
#|H|# #:use-module ((gnu home) #:select (this-home-environment)) #|H|# #:use-module ((gnu home) #:select (this-home-environment))
#|H|# #:use-module ((gnu home) #:hide (this-home-environment) #|H|# #:use-module ((gnu home) #:hide (this-home-environment)
#:prefix user-) #:prefix user-)
@ -46,7 +46,7 @@
#:use-module (gnu packages xorg) #:use-module (gnu packages xorg)
#|GNU home services|# #|GNU home services|#
#| |# #:use-module (gnu home services) #||# #:use-module (gnu home services)
#|D|# #:use-module (gnu home services desktop) #|D|# #:use-module (gnu home services desktop)
#:use-module (gnu home services dotfiles) #:use-module (gnu home services dotfiles)
#|G|# #:use-module (gnu home services guix) #|G|# #:use-module (gnu home services guix)
@ -71,7 +71,7 @@
#|W|# #:use-module (radix packages wm) #|W|# #:use-module (radix packages wm)
#|Radix home services|# #|Radix home services|#
#| |# #:use-module (radix home services) #||# #:use-module (radix home services)
#|G|# #:use-module (radix home services gnupg) #|G|# #:use-module (radix home services gnupg)
#|S|# #:use-module (radix home services shells) #|S|# #:use-module (radix home services shells)
#|X|# #:use-module (radix home services xdg) #|X|# #:use-module (radix home services xdg)
@ -259,21 +259,24 @@
("':e'" . "kak") ("':e'" . "kak")
("':q'" . "exit"))) ("':q'" . "exit")))
(abbreviations (abbreviations
(let ((at (symbol-prefix-proc '@)) (let ((@ (symbol-prefix-proc '@))
(edit (partial string-append "$EDITOR "))) (edit (partial format #f "$EDITOR~@{ ~a~}"))
(append (@radix (partial symbol-append '~/areas/code/scm/radix))
(map (match-lambda (@zero (partial symbol-append '~/areas/code/scm/zero)))
`(,@(map (match-lambda
((x . y) (abbreviation ((x . y) (abbreviation
(name (at x)) (name (@ x))
(position 'anywhere) (position 'anywhere)
(expansion (y x))))) (expansion (y x)))))
(associate-right (associate-right
#|P.A.R.A.|# #|P.A.R.A.|#
((lambda (dir) ((lambda (dir)
(if (equal? dir 'archive) (cond ((equal? dir 'archive)
(symbol-append '~/. dir) (symbol-append '~/. dir))
(symbol-append '~/ dir))) ((equal? dir 'bookmarks)
'(areas projects resources resources/bookmarks archive)) (symbol-append '~/resources/ dir))
(else (symbol-append '~/ dir))))
'(areas bookmarks projects resources archive))
#|XDG user directories|# #|XDG user directories|#
((const (fish-function "xdg-user-directory")) ((const (fish-function "xdg-user-directory"))
@ -283,9 +286,21 @@
((symbol-prefix-proc '~/projects/code/) ((symbol-prefix-proc '~/projects/code/)
'(c clj cpp hs html kak md pl scm sh tex zig)) '(c clj cpp hs html kak md pl scm sh tex zig))
#|Guix channels|# #|Code areas|#
((symbol-prefix-proc '~/projects/code/scm/) ((symbol-prefix-proc '~/areas/code/scm/)
'(ajatt guix radix zero)) '(guix radix zero))
#|Radix|#
((partial @radix '/radix/)
'(packages services home/services))
#|Zero|#
((partial @zero '/operating-systems/)
'(buer))
((partial @zero '/home-environments/)
'(radio))
((partial @zero '/home-environments/radio/)
'(files))
#|Configuration|# #|Configuration|#
((symbol-prefix-proc ((symbol-prefix-proc
@ -295,7 +310,7 @@
'~/areas/code/scm/radix/home-environments/) '~/areas/code/scm/radix/home-environments/)
(list (string->symbol (getlogin)))))) (list (string->symbol (getlogin))))))
(map (match-lambda ,@(map (match-lambda
((x . y) (abbreviation ((x . y) (abbreviation
(name x) (name x)
(expansion y)))) (expansion y))))
@ -306,7 +321,7 @@
(v . "yt-dlp --prefer-free-formats '%'") (v . "yt-dlp --prefer-free-formats '%'")
(z . "curl -F file=@% https://0x0.st | xsel -b"))) (z . "curl -F file=@% https://0x0.st | xsel -b")))
(map (match-lambda ,@(map (match-lambda
((x . y) (abbreviation ((x . y) (abbreviation
(name x) (name x)
(position 'anywhere) (position 'anywhere)
@ -346,7 +361,11 @@
("GUILE_LOAD_PATH" ("GUILE_LOAD_PATH"
. ,(format #f "~?~?" . ,(format #f "~?~?"
"~@{:$HOME/areas/code/scm/~a~}" "~@{:$HOME/areas/code/scm/~a~}"
'(ajatt radix zero) '(ajatt
radix
zero
zero/operating-systems
zero/home-environments)
"~@{:~a/share/guile/site/3.0~}" "~@{:~a/share/guile/site/3.0~}"
'($HOME/.guix-home/profile '($HOME/.guix-home/profile
$XDG_CONFIG_HOME/guix/current $XDG_CONFIG_HOME/guix/current