diff --git a/files/fish/abbreviations.fish b/files/fish/abbreviations.fish deleted file mode 100644 index ef18301..0000000 --- a/files/fish/abbreviations.fish +++ /dev/null @@ -1,31 +0,0 @@ -abbr --add m --set-cursor 'yt-dlp --prefer-free-formats --extract-audio "%"' -abbr --add v --set-cursor 'yt-dlp --prefer-free-formats "%"' - -abbr --add zedit --set-cursor "zcat % | $EDITOR" -abbr --add tf --position anywhere --set-cursor 'setsid -f %>/dev/null 2>&1 & disown' -abbr --add zxz --set-cursor 'curl -F "file=@%" https://0.vern.cc | xsel -b' -abbr --add mpv --position anywhere --set-cursor 'mpv "%"' - -abbr --add :links "$EDITOR ~/area/organization/links" -abbr --add :todo "$EDITOR ~/area/organization/todo" - -# Research -abbr --add @research --position anywhere "~/area/research/assymptotically-periodic-functions/" - -# Projects -set -l PROJECTS "$HOME/projects/code" -abbr --add @guix --position anywhere "$PROJECTS/scm/guix" -abbr --add @punk --position anywhere "$PROJECTS/cpp/Punk" -abbr --add @tomato --position anywhere "$PROJECTS/py/tomato-engine" - -## Radix -set -l RADIX_REPO "$HOME/area/code/scm/radix" -abbr --add :system --position anywhere "$RADIX_REPO && $EDITOR /etc/config.scm" -abbr --add :home --position anywhere "$RADIX_REPO && $EDITOR radio.scm" -abbr --add @radix --position anywhere "$RADIX_REPO" -abbr --add @files --position anywhere "$RADIX_REPO/files" -abbr --add @modules --position anywhere "$RADIX_REPO/modules/radix" - -# System and Home -abbr --add !system --position anywhere "doas guix system reconfigure /etc/config.scm" -abbr --add !home --position anywhere "guix home reconfigure ~/.config/guix/home.scm" diff --git a/modules/radix/files/fish.scm b/modules/radix/files/fish.scm index 151780c..973568b 100644 --- a/modules/radix/files/fish.scm +++ b/modules/radix/files/fish.scm @@ -6,15 +6,11 @@ #:use-module (ice-9 rdelim) #:use-module (radix combinators) #:use-module (gnu packages shells) - #:export (abbreviations - greeting + #:export (greeting key-bindings prompt variables)) -(define abbreviations - (local-file "../../../files/fish/abbreviations.fish")) - (define greeting (local-file "../../../files/fish/functions/greeting.fish")) diff --git a/radio.scm b/radio.scm index 68dfc62..5c4a6d7 100644 --- a/radio.scm +++ b/radio.scm @@ -8,6 +8,7 @@ (radix packages wm) (radix packages syndication) (radix home services) + (radix home services shells) (radix utils) ((radix files awesome) #:prefix file:awesome-) ((radix files emacs) #:prefix file:emacs-) @@ -41,7 +42,7 @@ #|D|# desktop #|G|# gnupg guix #|M|# mcron - #|S|# shells ssh shepherd + #|S|# ssh shepherd #|X|# xdg) (home-environment @@ -199,8 +200,7 @@ #|Shell services|# (service home-fish-service-type (home-fish-configuration - (config (list file:fish-abbreviations - file:fish-key-bindings)) + (config (list file:fish-key-bindings)) (aliases `(#|Common aliases|# ("df" . "df -h") @@ -238,7 +238,91 @@ #|Kakoune aliases for the shell|# ("':e'" . "kak") - ("':q'" . "exit"))))) + ("':q'" . "exit"))) + (abbreviations + (let ((code-projects "$HOME/projects/code")) + (list #|Quick access|# + (abbreviation + (name "@punk") + (position "anywhere") + (expansion + (format #f "~a/cpp/Punk" + code-projects))) + (abbreviation + (name "@guix") + (position "anywhere") + (expansion + (format #f "~a/scm/guix" + code-projects))) + (abbreviation + (name "@radix") + (position "anywhere") + (expansion + (format #f "~a/scm/radix" + code-projects))) + (abbreviation + (name "@files") + (position "anywhere") + (expansion + (format #f "~a/scm/radix/files" + code-projects))) + (abbreviation + (name "@modules") + (position "anywhere") + (expansion + (format #f "~a/scm/radix/modules/radix" + code-projects))) + (abbreviation + (name "@research") + (position "anywhere") + (expansion "$HOME/area/research")) + + #|Quick edit|# + (abbreviation + (name ":system") + (expansion + (format #f "~a/scm/radix && $EDITOR buer.scm" + code-projects))) + (abbreviation + (name ":home") + (expansion + (format #f "~a/scm/radix && $EDITOR radio.scm" + code-projects))) + + #|Media downloading|# + (abbreviation + (name "m") + (expansion + (format #f "yt-dlp --prefer-free-formats ~ + --extract-audio \"%\""))) + (abbreviation + (name "v") + (expansion + "yt-dlp --prefer-free-formats \"%\"")) + + #|Guix reconfiguration|# + (abbreviation + (name "!home") + (expansion + (format #f "guix home reconfigure ~ + $XDG_CONFIG_HOME/guix/home.scm"))) + (abbreviation + (name "!system") + (expansion + "doas guix system reconfigure /etc/config.scm")) + + #|Utils|# + (abbreviation + (name "zedit") + (expansion "zcat % | $EDITOR")) + (abbreviation + (name "tf") + (expansion + "setsid -f %>/dev/null 2>&1 & disown")) + (abbreviation + (name "zxz") + (expansion + "curl -F file=@% https://0x0.st | xsel -b"))))))) (simple-service 'environment-variables-service home-environment-variables-service-type