diff --git a/.stow-local-ignore b/.stow-local-ignore index 2279831..5f8721f 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,3 +1,3 @@ ^/\.git.* -.*\.bak$ +.*.bak$ readme.md diff --git a/shell/dot-bashrc b/shell/dot-bashrc index c501109..3c5baf2 100644 --- a/shell/dot-bashrc +++ b/shell/dot-bashrc @@ -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 diff --git a/shell/dot-config/fish/config.fish b/shell/dot-config/fish/config.fish new file mode 100644 index 0000000..ebbdf26 --- /dev/null +++ b/shell/dot-config/fish/config.fish @@ -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 + diff --git a/shell/dot-config/oh-my-posh.toml b/shell/dot-config/oh-my-posh.toml index e87ebb0..f2999e2 100644 --- a/shell/dot-config/oh-my-posh.toml +++ b/shell/dot-config/oh-my-posh.toml @@ -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'