From 65909e3464c3ec49600f612575f6cf56ff195cb6 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Tue, 13 Feb 2024 18:54:45 -0300 Subject: [PATCH] home-environments: radio: Add fish abbreviations to quick acess of PARA directories --- home-environments/radio.scm | 15 ++++++------ .../radio/fish-abbreviations.scm | 23 ++++++++++++++----- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/home-environments/radio.scm b/home-environments/radio.scm index e2a3ed9..e784a59 100644 --- a/home-environments/radio.scm +++ b/home-environments/radio.scm @@ -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 diff --git a/home-environments/radio/fish-abbreviations.scm b/home-environments/radio/fish-abbreviations.scm index 8b63085..36b0ad0 100644 --- a/home-environments/radio/fish-abbreviations.scm +++ b/home-environments/radio/fish-abbreviations.scm @@ -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