chore(shell): powerlevel10k prompt, host-aware bootstrap, drop thefuck

- zsh prompt: replace oh-my-posh with powerlevel10k via zinit, with the
  instant-prompt preamble near the top of .zshrc for fast startup
- remove thefuck/thefk entirely: .zshrc aliases, install-thefk,
  home_config/thefuck, and its .stow-global-ignore entry
- link-dotfiles: one-shot host-aware bootstrap — detect macOS vs Linux,
  install GNU stow if missing (brew / apt/dnf/pacman), then stow both trees
- retire oh-my-posh: delete the bash + pwsh installers and
  home_config/ohmyposh (starship covers PowerShell separately)
- README: document the new bootstrap and prompt setup
This commit is contained in:
lkrav
2026-06-26 07:33:57 -07:00
parent 9883a7c11d
commit 7076d40191
13 changed files with 79 additions and 397 deletions
-136
View File
@@ -1,136 +0,0 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 2
final_space: true
console_title_template: "{{ .Shell }} in {{ .Folder }}"
blocks:
- type: prompt
alignment: left
segments:
- type: session
style: diamond
foreground: p:black
background: p:yellow
leading_diamond:
trailing_diamond:
template: " {{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }} "
- type: path
style: powerline
powerline_symbol:
foreground: p:white
background: p:orange
template: " \uea83 {{ path .Path .Location }} "
properties:
style: folder
- type: git
style: powerline
powerline_symbol:
foreground: p:black
foreground_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}"
- "{{ if gt .Ahead 0 }}p:white{{ end }}"
background: p:green
background_templates:
- "{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}"
- "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}"
- "{{ if gt .Ahead 0 }}#49416D{{ end }}"
- "{{ if gt .Behind 0 }}#7A306C{{ end }}"
template: " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} "
properties:
branch_max_length: 25
fetch_status: true
fetch_upstream_icon: true
- type: root
style: powerline
powerline_symbol:
foreground: p:white
background: p:yellow
template: " \uf0e7 "
- type: status
style: diamond
foreground: p:white
background: p:blue
background_templates:
- "{{ if gt .Code 0 }}p:red{{ end }}"
leading_diamond: <transparent,background></>
trailing_diamond:
template: " {{ if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} "
properties:
always_enabled: true
- type: rprompt
segments:
- type: node
style: plain
foreground: p:green
background: transparent
template: "\ue718 "
properties:
display_mode: files
fetch_package_manager: false
home_enabled: false
- type: go
style: plain
foreground: p:blue
background: transparent
template: "\ue626 "
properties:
fetch_version: false
- type: python
style: plain
foreground: p:yellow
background: transparent
template: "\ue235 "
properties:
display_mode: files
fetch_version: false
fetch_virtual_env: false
- type: shell
style: plain
foreground: p:white
background: transparent
template: "in <p:blue><b>{{ .Name }}</b></> "
- type: time
style: plain
foreground: p:white
background: transparent
template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
tooltips:
- type: aws
tips:
- aws
style: diamond
foreground: p:white
background: p:orange
leading_diamond:
trailing_diamond:
template: " \ue7ad {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} "
properties:
display_default: true
- type: az
tips:
- az
style: diamond
foreground: p:white
background: p:blue
leading_diamond:
trailing_diamond:
template: " \uebd8 {{ .Name }} "
properties:
display_default: true
transient_prompt:
foreground: p:black
background: transparent
template: "<p:yellow,transparent>\ue0b6</><,p:yellow> {{ .Folder }} </><p:yellow,transparent>\ue0b0</> "
secondary_prompt:
foreground: p:black
background: transparent
template: "<p:yellow,transparent>\ue0b6</><,p:yellow> > </><p:yellow,transparent>\ue0b0</> "
palette:
black: "#262B44"
blue: "#4B95E9"
green: "#59C9A5"
orange: "#F07623"
red: "#D81E5B"
white: "#E0DEF4"
yellow: "#F3AE35"
-164
View File
@@ -1,164 +0,0 @@
console_title_template = '{{if .Root}}(Admin){{end}} {{.PWD}}'
version = 3
[palette]
black = '#222531'
blue = '#6388D8'
bright_70 = '#9daeb6'
bright_80 = '#b3cbcf'
bright_90 = '#cce7ec'
bright_black = '#373b46'
bright_blue = '#a4c4ff'
bright_cyan = '#42dcd1'
bright_green = '#51e08a'
bright_magenta = '#d8adff'
bright_red = '#ff854f'
bright_white = '#cce7ec'
bright_yellow = '#FFE14E'
cyan = '#00b1a8'
dark_30 = '#414751'
dark_40 = '#565f69'
dark_50 = '#6e7882'
dark_60 = '#86929d'
green = '#16B866'
magenta = '#9d78ff'
red = '#ff491a'
white = '#a9bcc3'
yellow = '#e1c631'
[secondary_prompt]
template = '❯❯ '
foreground = 'p:bright_green'
background = 'transparent'
[transient_prompt]
template = '❯ '
background = 'transparent'
foreground_templates = ['{{if gt .Code 0}}p:red{{end}}', '{{if eq .Code 0}}p:bright_green{{end}}']
[[blocks]]
type = 'prompt'
alignment = 'left'
[[blocks.segments]]
template = '{{.Icon}} '
foreground = 'p:cyan'
type = 'os'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
template = '{{ .Path }} {{ if not .Writable}}<p:bright_red>󰌾</> {{end}}'
foreground = 'p:dark_50'
type = 'path'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
style = 'agnoster'
[[blocks]]
type = 'prompt'
alignment = 'left'
[[blocks.segments]]
leading_diamond = ''
trailing_diamond = ' '
template = '  {{ .Venv }} '
foreground = 'p:blue'
background = 'p:bright_black'
type = 'python'
style = 'diamond'
[blocks.segments.properties]
cache_duration = 'none'
display_default = false
[[blocks.segments]]
leading_diamond = ''
trailing_diamond = ''
template = ' {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<p:yellow>  </>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }}  {{ .StashCount }}{{ end }} '
foreground = 'p:bright_cyan'
background = 'p:bright_black'
type = 'git'
style = 'diamond'
[blocks.segments.properties]
branch_icon = ' '
cache_duration = 'none'
commit_icon = ' '
fetch_stash_count = true
fetch_status = true
fetch_upstream_icon = true
merge_icon = ' '
no_commits_icon = ' '
rebase_icon = ' '
revert_icon = ' '
tag_icon = ' '
[[blocks]]
type = 'prompt'
alignment = 'right'
[[blocks.segments]]
template = '{{ .FormattedMs }}'
foreground = 'p:green'
type = 'executiontime'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
style = 'austin'
[[blocks.segments]]
foreground = 'p:dark_30'
type = 'time'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
time_format = '3:04:05pm'
[[blocks.segments]]
template = '{{.UserName}}'
foreground = 'p:dark_50'
type = 'session'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
template = ' {{ if .SSHSession }}󰄙 {{ else }}@{{ end }} '
foreground = 'p:cyan'
type = 'session'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks.segments]]
template = '{{.HostName}}'
foreground = 'p:blue'
type = 'session'
style = 'plain'
[blocks.segments.properties]
cache_duration = 'none'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
template = '❯ '
background = 'transparent'
type = 'text'
style = 'plain'
foreground_templates = ['{{if gt .Code 0}}p:red{{end}}', '{{if eq .Code 0}}p:bright_green{{end}}']
[blocks.segments.properties]
cache_duration = 'none'
-26
View File
@@ -1,26 +0,0 @@
# The Fuck settings file
#
# The rules are defined as in the example bellow:
#
# rules = ['cd_parent', 'git_push', 'python_command', 'sudo']
#
# The default values are as follows. Uncomment and change to fit your needs.
# See https://github.com/nvbn/thefuck#settings for more information.
#
# rules = [<const: All rules enabled>]
# exclude_rules = []
# wait_command = 3
# require_confirmation = True
# no_colors = False
# debug = False
# priority = {}
# history_limit = None
# alter_history = True
# wait_slow_command = 15
# slow_commands = ['lein', 'react-native', 'gradle', './gradlew', 'vagrant']
# repeat = False
# instant_mode = False
# num_close_matches = 3
# env = {'LC_ALL': 'C', 'LANG': 'C', 'GIT_TRACE': '1'}
# excluded_search_path_prefixes = []