shell: add fish config

This commit is contained in:
Laila van Reenen 2025-08-17 20:41:27 +02:00
parent b2049cb8cb
commit 80f72d284d
Signed by: LailaTheElf
GPG Key ID: 8A3EF0226518C12D
4 changed files with 39 additions and 6 deletions

View File

@ -1,3 +1,3 @@
^/\.git.*
.*\.bak$
.*.bak$
readme.md

View File

@ -8,6 +8,7 @@
alias ls='ls --color=auto'
alias la='ls --color=auto -plhA'
alias grep='grep --color=auto'
alias prusa-slicer='flatpak run com.prusa3d.PrusaSlicer'
export PATH="$PATH:$HOME/.local/bin"
export EDITOR=vim

View File

@ -0,0 +1,31 @@
if status is-interactive
alias ls='ls --color=auto'
alias la='ls --color=auto -plhA'
alias grep='grep --color=auto'
alias prusa-slicer='flatpak run com.prusa3d.PrusaSlicer'
export PATH="$PATH:$HOME/.local/bin"
export EDITOR=vim
# quartus
export QSYS_ROOTDIR="$HOME/.local/intelFPGA_lite/18.1/quartus/sopc_builder/bin"
# TODO: ssh-agent
# TODO: rust
# fuzzy find
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target,.var
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
fzf --fish | source
# better cd
zoxide init fish --cmd cd | source
# prompt
oh-my-posh init fish --config "$HOME/.config/oh-my-posh.toml" | source
end

View File

@ -8,10 +8,10 @@ final_space = true
background = 'transparent'
## does not work in bash
# [transient_prompt]
# template = ' '
# foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}default{{end}}']
# background = 'transparent'
[transient_prompt]
template = ' '
foreground_templates = ['{{if gt .Code 0}}red{{end}}', '{{if eq .Code 0}}default{{end}}']
background = 'transparent'
[[blocks]]
type = 'prompt'
@ -37,7 +37,7 @@ final_space = true
[[blocks.segments]]
type = 'git'
template = ' {{ .HEAD }}{{ if (.Working.Changed) }}*{{ end }}{{ if (.Staging.Changed) }}+{{ end }}{{ if or (gt .Behind 0) (gt .Ahead 0) }} ☁ {{ if gt .Behind 0 }}-{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}+{{ .Ahead }}{{ end }}{{ end }}'
template = ' {{ url .HEAD .UpstreamURL }}{{ if (.Working.Changed) }}*{{ end }}{{ if (.Staging.Changed) }}+{{ end }}{{ if or (gt .Behind 0) (gt .Ahead 0) }} ☁ {{ if gt .Behind 0 }}-{{ .Behind }}{{ end }}{{ if gt .Ahead 0 }}+{{ .Ahead }}{{ end }}{{ end }}'
style = 'plain'
foreground = 'magenta'
background = 'transparent'
@ -46,6 +46,7 @@ final_space = true
branch_icon = ''
commit_icon = '@'
fetch_status = true
fetch_upstream_icon = true
[blocks.segments.properties.ignore_submodules]
'*' = 'none'