diff --git a/files/fish/config.fish b/files/fish/config.fish index c023200..6a44320 120000 --- a/files/fish/config.fish +++ b/files/fish/config.fish @@ -1 +1 @@ -/gnu/store/v25gcy86bbakrzg500529k0zfaxwgapv-fish-config.fish \ No newline at end of file +/gnu/store/xv3r12wjaiicylxh19xdhwjj2m33h7cl-fish-config.fish \ No newline at end of file diff --git a/files/fish/fish_abbreviations b/files/fish/fish_abbreviations index cea2a44..391ed5c 100644 --- a/files/fish/fish_abbreviations +++ b/files/fish/fish_abbreviations @@ -2,11 +2,10 @@ abbr --add m 'yt-dlp --prefer-free-formats --extract-audio' abbr --add v 'yt-dlp --prefer-free-formats' abbr --add mpv --position anywhere --set-cursor=! 'mpv "!"' -abbr --add !config --position anywhere 'guix system reconfigure /etc/config.scm' -abbr --add !home --position anywhere 'guix home reconfigure $HOME/projects/guile/radix/radio.scm' -abbr --add :config --position anywhere '$EDITOR /etc/config.scm' -abbr --add :home --position anywhere '$EDITOR $HOME/projects/guile/radix/radio.scm' -abbr --add @radix --position anywhere '$HOME/projects/guile/radix' -abbr --add @files --position anywhere '$HOME/projects/guile/radix/files' -abbr --add @system --position anywhere '$HOME/projects/guile/radix/modules/radix/services' -abbr --add @home --position anywhere '$HOME/projects/guile/radix/modules/radix/home/services' +abbr --add !system --position anywhere 'doas guix system reconfigure /etc/config.scm' +abbr --add !home --position anywhere 'guix home reconfigure $HOME/projects/guile/radix/radio.scm' +abbr --add :system --position anywhere '$EDITOR /etc/config.scm' +abbr --add :home --position anywhere '$EDITOR $HOME/projects/guile/radix/radio.scm' +abbr --add @radix --position anywhere '$HOME/projects/guile/radix' +abbr --add @files --position anywhere '$HOME/projects/guile/radix/files' +abbr --add @modules --position anywhere '$HOME/projects/guile/radix/modules' diff --git a/files/fish/fish_variables b/files/fish/fish_variables deleted file mode 100644 index 1a82b8a..0000000 --- a/files/fish/fish_variables +++ /dev/null @@ -1,31 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR __fish_initialized:3400 -SETUVAR fish_color_autosuggestion:555\x1ebrblack -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:blue -SETUVAR fish_color_comment:red -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:green -SETUVAR fish_color_error:brred -SETUVAR fish_color_escape:brcyan -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_host_remote:yellow -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:brcyan -SETUVAR fish_color_param:cyan -SETUVAR fish_color_quote:yellow -SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold -SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_key_bindings:fish_default_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di -SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan -SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/files/fish/fish_variables b/files/fish/fish_variables new file mode 120000 index 0000000..20fcfcc --- /dev/null +++ b/files/fish/fish_variables @@ -0,0 +1 @@ +/gnu/store/75f2bk5sgw862xm3jg8zl0kl8d7r07kw-fish_variables \ No newline at end of file diff --git a/files/fish/functions/fish_greeting.fish b/files/fish/functions/fish_greeting.fish deleted file mode 100644 index e69de29..0000000 diff --git a/files/fish/functions/fish_greeting.fish b/files/fish/functions/fish_greeting.fish new file mode 120000 index 0000000..fdad069 --- /dev/null +++ b/files/fish/functions/fish_greeting.fish @@ -0,0 +1 @@ +/gnu/store/r17n4grhqa12hfvgjkrqyddy7ksavj9a-fish_greeting.fish \ No newline at end of file diff --git a/files/fish/functions/fish_prompt.fish b/files/fish/functions/fish_prompt.fish deleted file mode 100644 index c9db7aa..0000000 --- a/files/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,70 +0,0 @@ -# Utilities - -function blue - set_color blue; printf $argv; set_color normal -end -function normal - set_color normal; printf $argv; set_color normal -end - -function displayed_string_length - string replace -ra -- '\x1b.*?[mGKH]' '' "$argv" | string length -end - -function padding - printf "%-"$argv[1]"s%s" " " "$output" -end - -# Current working directory prompt -function fish_cwd_prompt - set -l cwd (pwd) - switch "$cwd" - case "$HOME" - printf "~" - case "/" - printf "/" - case "*" - set -l parent_dir (basename (dirname $cwd)) - test $parent_dir = "/" || printf "%s" $parent_dir - printf '/%s' (basename $cwd) - end -end - -# Guix environment prompt -function fish_environment_prompt - normal "(env "; blue "%s" (basename $GUIX_ENVIRONMENT); normal ")" -end - -# Actual prompt -function fish_prompt - if test -n "$GUIX_ENVIRONMENT" - set -l fish_environment_prompt_length \ - (displayed_string_length (fish_environment_prompt)) - set -l fish_git_prompt_length \ - (displayed_string_length (fish_git_prompt)) - - fish_environment_prompt - printf (padding (math $COLUMNS - $fish_environment_prompt_length \ - - $fish_git_prompt_length)) - fish_git_prompt | string replace -ra ' ' '' - printf '\n' - else - function fish_right_prompt - fish_git_prompt - end - end - - set -g fish_key_bindings fish_vi_key_bindings - switch "$fish_key_bindings" - case fish_vi_key_bindings fish_hybrid_key_bindings - test $fish_bind_mode = 'default' && normal ':' || normal '+' - end - - blue (whoami); normal ' at '; blue (prompt_hostname) - normal ' in '; blue (fish_cwd_prompt) - normal ' > ' -end - -function fish_default_mode_prompt -d "Display vi prompt mode" - # Do nothing -end diff --git a/files/fish/functions/fish_prompt.fish b/files/fish/functions/fish_prompt.fish new file mode 120000 index 0000000..ef02e01 --- /dev/null +++ b/files/fish/functions/fish_prompt.fish @@ -0,0 +1 @@ +/gnu/store/8mh31d3qyd2gnkqa6zgnnaiyskrk96dm-fish_prompt.fish \ No newline at end of file diff --git a/radio.scm b/radio.scm index 894355f..8e9fc00 100644 --- a/radio.scm +++ b/radio.scm @@ -188,10 +188,10 @@ "application/pdf" "application/epub+zip")))))) - ; (simple-service 'application-configs home-xdg-configuration-files-service-type - ; `(("fish/fish_variables" ,file:fish-variables) - ; ("fish/functions/fish_greeting.fish" ,file:fish-functions-greeting) - ; ("fish/functions/fish_prompt.fish" ,file:fish-functions-prompt))) + (simple-service 'application-configs home-xdg-configuration-files-service-type + `(("fish/fish_variables" ,file:fish-variables) + ("fish/functions/fish_greeting.fish" ,file:fish-functions-greeting) + ("fish/functions/fish_prompt.fish" ,file:fish-functions-prompt))) #|Shepherd service|# (service home-shepherd-service-type) @@ -284,7 +284,7 @@ '("/run/current-system/profile" "$XDG_CONFIG_HOME/guix/current" "$HOME/.guix-home/profile"))) - ":" 'infix)) + ":" 'infix)) #|GUIX|# ("GUIX_PROFILE" . "$XDG_CONFIG_HOME/guix/current")