From fc28824e75a68f5443a523facb897ccbb88b5f0b Mon Sep 17 00:00:00 2001 From: anemofilia Date: Sun, 8 Oct 2023 13:39:01 -0300 Subject: [PATCH] chore: add fish abbreviations for bookmark navigation in home-fish-service --- files/fish/functions/functions.fish | 4 ++++ radio.scm | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/files/fish/functions/functions.fish b/files/fish/functions/functions.fish index edb2a54..28ab5b7 100644 --- a/files/fish/functions/functions.fish +++ b/files/fish/functions/functions.fish @@ -1,3 +1,7 @@ function code-projects string replace '@' '~/projects/code/' $argv[1] end + +function code-projects + string replace '@' '~/resources/bookmarks/' $argv[1] +end diff --git a/radio.scm b/radio.scm index 140984d..f371c7f 100644 --- a/radio.scm +++ b/radio.scm @@ -241,7 +241,8 @@ (let ((code-projects "~/projects/code") (code-project-extensions '(c clj cpp el html kak md org pl scm sh tex zig)) - (organization "~/areas/organization/links")) + (bookmarks + '(emacs guile guix haunt misc))) (list #|Quick access|# (abbreviation (name "@extension") @@ -285,6 +286,10 @@ (name "@research") (position 'anywhere) (expansion "~/areas/research")) + (abbreviation + (name "@bookmarks") + (position 'anywhere) + (expansion "~/resources/bookmarks")) (abbreviation (name "@git-root") (expansion "cd (git root)")) @@ -307,8 +312,12 @@ (name ":todo") (expansion (format #f "~a/todo" organization))) (abbreviation - (name ":links") - (expansion (format #f "~a/links" organization))) + (name ":bookmark") + (position 'anywhere) + (pattern + (apply format #f "@(~a~@{|~a~})" bookmarks)) + (expansion + (fish-function "bookmarks"))) #|Media downloading|# (abbreviation