commit 72dac73f9e57b9e3f8a6fdd816d1c29ea184b253 Author: Mel Date: Sat Mar 1 02:03:26 2025 +0100 add fish and starship to dotfile repo diff --git a/fish/conf.d/00-vault.fish b/fish/conf.d/00-vault.fish new file mode 100644 index 0000000..c6f77c8 --- /dev/null +++ b/fish/conf.d/00-vault.fish @@ -0,0 +1 @@ +set -x VAULT_ADDR 'https://vault.chaos.sh:443' diff --git a/fish/conf.d/10-cloudflare.fish b/fish/conf.d/10-cloudflare.fish new file mode 100644 index 0000000..40f6cbd --- /dev/null +++ b/fish/conf.d/10-cloudflare.fish @@ -0,0 +1,2 @@ +set -x CF_API_EMAIL cloudflare@basicchaos.de +set -x CF_API_KEY $(vault kv get -field apikey services/cloudflare) diff --git a/fish/conf.d/20-cargo.fish b/fish/conf.d/20-cargo.fish new file mode 100644 index 0000000..dcc125d --- /dev/null +++ b/fish/conf.d/20-cargo.fish @@ -0,0 +1,9 @@ +set -x CARGO_MOMMYS_MOODS chill/thirsty +set -x CARGO_MOMMYS_PRONOUNS her/pups/their/faer +set -x CARGO_MOMMYS_ROLES honeybee +set -x CARGO_MOMMYS_LITTLE kitten/fae/girl +set -x CARGO_MOMMYS_ACTUAL sudo + +function sudo --wraps /usr/bin/sudo + cargo-mommy $argv +end diff --git a/fish/conf.d/30-pacman.fish b/fish/conf.d/30-pacman.fish new file mode 100644 index 0000000..cc2ae6a --- /dev/null +++ b/fish/conf.d/30-pacman.fish @@ -0,0 +1,16 @@ +set -u PACMAN paru +function update + $PACMAN -Syu +end + +function remove --wraps "$PACMAN -Rcsnu" + $PACMAN -Rscnu $argv +end + +function search --wraps "$PACMAN -Ss" + $PACMAN -Ss $argv +end + +function install --wraps "$PACMAN -Sy" + $PACMAN -Sy $argv +end diff --git a/fish/conf.d/98-basic-aliases.fish b/fish/conf.d/98-basic-aliases.fish new file mode 100644 index 0000000..2269748 --- /dev/null +++ b/fish/conf.d/98-basic-aliases.fish @@ -0,0 +1,43 @@ +# tool aliases +function irc + mosh -p 60561:60565 arsenalgear -- tmux attach -t irc +end + +function last_history_item + echo $history[1] +end +abbr -a !! --position anywhere --function last_history_item + +function htop + /usr/bin/btop +end + +function vim + /usr/bin/nvim $argv +end + +function vim + /usr/bin/nvim $argv +end + +function pass --wraps gopass + gopass +end + +# *ctl aliases +function sc --wraps "sudo systemctl" + sudo systemctl +end + +function scu --wraps "systemctl --user" + systemctl --user +end + +# ansible related aliases +function anp + ansible-playbook +end + +function anv + ansible-vault +end diff --git a/fish/conf.d/99-basic-exports.fish b/fish/conf.d/99-basic-exports.fish new file mode 100644 index 0000000..aef9db6 --- /dev/null +++ b/fish/conf.d/99-basic-exports.fish @@ -0,0 +1,8 @@ +set -x TERM xterm-256color +set -x VISUAL /usr/bin/nvim +set -x EDITOR $VISUAL +set -x BROWSER firefox +set -x SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/ssh-agent.socket" + +set -x GOPATH $HOME/build/go +set -x PATH $GOPATH/bin:$HOME/.cargo/bin:$HOME/.local/bin:/usr/local/bin:$PATH diff --git a/fish/config.fish b/fish/config.fish new file mode 100644 index 0000000..52fa36e --- /dev/null +++ b/fish/config.fish @@ -0,0 +1,13 @@ +set fish_greeting + +if status is-interactive + # Commands to run in interactive sessions can go here +end + +# Keybindings to make my life easier +bind --user ctrl-enter accept-autosuggestion +bind --user ctrl-space forward-char + +starship init fish | source +direnv hook fish | source +zoxide init fish --cmd cd | source diff --git a/fish/fish_variables b/fish/fish_variables new file mode 100644 index 0000000..89b4d23 --- /dev/null +++ b/fish/fish_variables @@ -0,0 +1,42 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2d\x2dreverse +SETUVAR fish_color_command:5fd700 +SETUVAR fish_color_comment:444444 +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:0087d7 +SETUVAR fish_color_error:d70000 +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:\x1d +SETUVAR fish_color_keyword:\x1d +SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_option:\x1d +SETUVAR fish_color_param:c6c6c6 +SETUVAR fish_color_quote:ffd700 +SETUVAR fish_color_redirection:8787af\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\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_background:\x1d +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2d\x2ditalics +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_secondary_background:\x1d +SETUVAR fish_pager_color_secondary_completion:\x1d +SETUVAR fish_pager_color_secondary_description:\x1d +SETUVAR fish_pager_color_secondary_prefix:\x1d +SETUVAR fish_pager_color_selected_background:\x2d\x2dreverse +SETUVAR fish_pager_color_selected_completion:\x1d +SETUVAR fish_pager_color_selected_description:\x1d +SETUVAR fish_pager_color_selected_prefix:\x1d diff --git a/starship.toml b/starship.toml new file mode 100644 index 0000000..557de9f --- /dev/null +++ b/starship.toml @@ -0,0 +1,103 @@ +format = """ +[](color_user)\ +$os\ +$username\ +[](fg:color_user bg:color_directory)\ +$directory\ +[](fg:color_directory bg:color_git)\ +$git_branch\ +$git_status\ +[](fg:color_git bg:color_code)\ +$c\ +$elixir\ +$elm\ +$golang\ +$gradle\ +$haskell\ +$java\ +$julia\ +$nodejs\ +$nim\ +$python\ +$rust\ +$scala\ +[](fg:color_code bg:color_time)\ +$time\ +[ ](color_time)\ +$line_break$character +""" + +palette = 'lesbian_pastel' + +[palettes.lesbian_pastel] +color_user = '#B63520' +color_directory = '#E69070' +color_git = '#F5F5F5' +color_code = '#C07293' +color_time = '#861848' +# Disable the blank line at the start of the prompt +# add_newline = false + +# You can also replace your username with a neat symbol like or disable this +# and use the os module below +[username] +show_always = true +style_user = "bg:color_user" +style_root = "bg:color_user" +format = '[ $user ]($style)' +disabled = false + +# An alternative to the username module which displays a symbol that +# represents the current operating system +[os] +style = "bg:color_user" +disabled = false # Disabled by default + +[os.symbols] +Macos = "󰀵" +Arch = "󰣇" + +[directory] +style = "bg:color_directory" +format = "[ $path ]($style)" +truncation_length = 3 +truncation_symbol = "…/" + +# Here is how you can shorten some long paths by text replacement +# similar to mapped_locations in Oh My Posh: +#[directory.substitutions] +#"Documents" = "󰈙 " +#"Downloads" = " " +#"Music" = " " +#"Pictures" = " " +# Keep in mind that the order matters. For example: +# "Important Documents" = " 󰈙 " +# will not be replaced, because "Documents" was already substituted before. +# So either put "Important Documents" before "Documents" or use the substituted version: +# "Important 󰈙 " = " 󰈙 " + +[git_branch] +symbol = "" +style = "fg:#666666 bg:color_git" +format = '[ $symbol $branch ]($style)' + +[git_status] +style = "fg:#666666 bg:color_git" +format = '[$all_status$ahead_behind ]($style)' + +[golang] +symbol = " " +style = "bg:color_code" +format = '[ $symbol ($version) ]($style)' + +[python] +symbol = "" +style = "bg:color_code" +format = '[ $symbol ($virtualenv)($version) ]($style)' +pyenv_version_name = true + +[time] +disabled = false +time_format = "%R" # Hour:Minute Format +style = "bg:color_time" +format = '[ ♥ $time ]($style)'