home-environments: radio: Replace the use of @xyz abbreviations by the fish-fzf plugin

impermanence
Luis Guilherme Coelho 2024-08-13 00:39:48 -03:00
parent 47ae93df69
commit 19390325bc
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 44 additions and 72 deletions

View File

@ -350,6 +350,7 @@
(plugins
(list fish-autopair
fish-done
fish-fzf
fish-puffer))
(environment-variables
`(#|GNU Privacy Guard|#
@ -373,7 +374,19 @@
#|M|# "^mpv"
#|N|# "^newsraft"))
("__done_notification_command"
. "notify-send '$title' '$message'")))
. "notify-send '$title' '$message'")
("FZF_DEFAULT_OPTS" . ("--filepath-word"
"--layout=reverse"
"--scheme=path"
"--scroll-off=2"))
("fzf_preview_dir_cmd" . "")
;; adicionar toggle de dotfiles na lista e no preview
;; adicionar toggle pro base-directory ser $PWD
("fzf_fd_opts" . ("--absolute-path"
"--exclude='\\..*'"
"--follow"
"--base-directory=$HOME"
"--type=directory"))))
(aliases
`(#|Common aliases|#
("df" . "df -h")
@ -400,80 +413,39 @@
(":e" . "kak")
(":q" . "exit")))
(abbreviations
(let ((@ (symbol-prefix-proc '@))
(edit (partial format #f "$EDITOR~@{ ~a~}"))
(@radix (partial symbol-append '~/areas/code/scm/radix))
(@zero (partial symbol-append '~/areas/code/scm/zero)))
`(,@(map (match-lambda
((x . y) (abbreviation
(name (@ x))
(position 'anywhere)
(expansion (y x)))))
(associate-right
#|P.A.R.A.|#
((lambda (dir)
(cond ((equal? dir 'archive)
(symbol-append '~/. dir))
((equal? dir 'bookmarks)
(symbol-append '~/resources/ dir))
(else (symbol-append '~/ dir))))
'(areas bookmarks projects resources archive))
(let ((edit (partial format #f "$EDITOR~@{ ~a~}")))
`(,@(map (match-lambda
((x . y) (abbreviation
(name x)
(expansion y))))
`(#|Download/Upload|#
(a . "aria2c -j 10 '%'")
(i . "ipfs get %")
(m . "yt-dlp -x '%'")
(u . "curl -F file=@% https://0x0.st | wl-copy")
(v . "yt-dlp '%'")))
#|XDG user directories|#
((const (fish-function "xdg-user-directory"))
'(desktop documents download music pictures videos))
,@(map (match-lambda
((x . y) (abbreviation
(name x)
(position 'anywhere)
(expansion y))))
`(#|Guix|#
(!dgen . "guix % delete-generations 2w")
(!repair . "doas guix build --repair")
(!pull . "guix pull")
(!repl . "guix repl -i ~/.config/guile/guilerc")
(!home . "guix home reconfigure ~/.config/guix/home.scm")
(!system . "doas guix system reconfigure /etc/config.scm")
#|Code projects|#
((symbol-prefix-proc '~/projects/code/)
'(c clj cpp el hs html kak md pl scm sh tex zig))
#|Processes|#
(tf . "setsid -f % >/dev/null 2>&1 & disown")
#|Code areas|#
((symbol-prefix-proc '~/areas/code/scm/)
'(guile guix misako radix
riverguile saayix shepherd zero))
#|Radix|#
((partial @radix '/radix/)
'(packages services home/services))
#|Zero|#
((partial @zero '/operating-systems/)
'(buer buer/files buer/manifests))
((partial @zero '/home-environments/)
'(radio radio/files radio/packages radio/manifests))))
,@(map (match-lambda
((x . y) (abbreviation
(name x)
(expansion y))))
`(#|Download/Upload|#
(a . "aria2c -j 10 '%'")
(i . "ipfs get %")
(m . "yt-dlp -x '%'")
(u . "curl -F file=@% https://0x0.st | wl-copy")
(v . "yt-dlp '%'")))
,@(map (match-lambda
((x . y) (abbreviation
(name x)
(position 'anywhere)
(expansion y))))
`(#|Guix|#
(!dgen . "guix % delete-generations 2w")
(!repair . "doas guix build --repair")
(!pull . "guix pull")
(!repl . "guix repl -i ~/.config/guile/guilerc")
(!home . "guix home reconfigure ~/.config/guix/home.scm")
(!system . "doas guix system reconfigure /etc/config.scm")
#|Processes|#
(tf . "setsid -f % >/dev/null 2>&1 & disown")
#|Quick edit|#
(:e . ,(edit))
(:system . ,(edit "/etc/config.scm"))
(:home . ,(edit "~/.config/guix/home.scm"))
(:todo . ,(edit "~/areas/meta/todo")))))))))
#|Quick edit|#
(:e . ,(edit))
(:system . ,(edit "/etc/config.scm"))
(:home . ,(edit "~/.config/guix/home.scm"))
(:todo . ,(edit "~/areas/meta/todo")))))))))
#|Environment variables services|#
(simple-service 'home-shell-environment-variables