diff --git a/manjaro.sh b/manjaro.sh index 0930a18..70b0270 100755 --- a/manjaro.sh +++ b/manjaro.sh @@ -16,15 +16,14 @@ yay -S python-pip pyenv ipython yay -S manjaro-pipewire pavucontrol # terminal and shell -yay -S wezterm zsh urxvt-resize-font -chsh -s /usr/bin/zsh +yay -S wezterm nushell urxvt-resize-font +chsh -s /usr/bin/nu -# zsh setup -yay -S zsh-theme-powerlevel10k \ - zsh-git-prompt \ - zsh-autosuggestions \ - zsh-history-substring-search \ - zsh-syntax-highlighting +# nushell +yay -S oh-my-posh argc +oh-my-posh init nu --config ~/dotfiles/nushell/theme.omp.json +git clone https://github.com/sigoden/argc-completions.git ~/.local/share/argc-completions/ +wget -P ~/.config/nushell -O theme.omp.json https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/free-ukraine.omp.json # code yay -S neovim tmux tig diff-so-fancy ripgrep nvimpager diff --git a/nushell/config.nu b/nushell/config.nu new file mode 100644 index 0000000..03d4138 --- /dev/null +++ b/nushell/config.nu @@ -0,0 +1,45 @@ +$env.config.show_banner = false +$env.config.edit_mode = 'vi' +$env.config = { + cursor_shape: { + vi_insert: line + vi_normal: block + } + history: { + max_size: 100_000 + sync_on_enter: true + file_format: "plaintext" + isolation: false + } + keybindings: [ + { + name: history_menu + modifier: control + keycode: char_r + mode: [ emacs, vi_insert, vi_normal ] + event: { send: menu name: history_menu } + } + { + name: move_right_or_take_history_hint + modifier: control + keycode: char_f + mode: [ emacs, vi_insert, vi_normal ] + event: { + until: [ + { send: historyhintcomplete } + { send: menuright } + { send: right } + ] + } + } + ] +} +oh-my-posh init nu --config ~/.config/nushell/theme.omp.json +source ~/.oh-my-posh.nu + +# argc-completions +$env.ARGC_COMPLETIONS_ROOT = '/home/hjalmarlucius/.local/share/argc-completions' +$env.ARGC_COMPLETIONS_PATH = ($env.ARGC_COMPLETIONS_ROOT + '/completions/linux:' + $env.ARGC_COMPLETIONS_ROOT + '/completions') +$env.PATH = ($env.PATH | prepend ($env.ARGC_COMPLETIONS_ROOT + '/bin')) +argc --argc-completions nushell | save -f '/home/hjalmarlucius/.local/share/argc-completions/tmp/argc-completions.nu' +source '/home/hjalmarlucius/.local/share/argc-completions/tmp/argc-completions.nu' diff --git a/nushell/env.nu b/nushell/env.nu new file mode 100644 index 0000000..e69de29 diff --git a/nushell/theme.omp.json b/nushell/theme.omp.json new file mode 100644 index 0000000..6e66265 --- /dev/null +++ b/nushell/theme.omp.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", + "palette": { + "white": "#FFFFFF", + "tan": "#CC3802", + "teal": "#047E84", + "plum": "#9A348E", + "blush": "#DA627D", + "salmon": "#FCA17D", + "sky": "#86BBD8", + "teal_blue": "#33658A" + }, + "blocks": [ + { + "alignment": "left", + "segments": [ + { + "type": "text", + "style": "diamond", + "leading_diamond": "\ue0b6", + "foreground": "p:white", + "background": "p:tan", + "template": "{{ if .Env.PNPPSHOST }} \uf8c5 {{ .Env.PNPPSHOST }} {{ end }}" + }, + { + "type": "text", + "style": "powerline", + "foreground": "p:white", + "background": "p:teal", + "powerline_symbol": "\ue0b0", + "template": "{{ if .Env.PNPPSSITE }} \uf2dd {{ .Env.PNPPSSITE }}{{ end }}" + }, + { + "type": "text", + "style": "diamond", + "trailing_diamond": "\ue0b4", + "foreground": "p:white", + "background": "p:teal", + "template": "{{ if .Env.PNPPSSITE }}\u00A0{{ end }}" + } + ], + "type": "rprompt" + }, + { + "alignment": "left", + "segments": [ + { + "background": "p:plum", + "foreground": "p:white", + "leading_diamond": "\ue0b6", + "style": "diamond", + "template": "{{ .UserName }} ", + "type": "session" + }, + { + "background": "p:blush", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", + "properties": { + "style": "folder" + }, + "style": "powerline", + "template": " {{ .Path }} ", + "type": "path" + }, + { + "background": "p:salmon", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", + "properties": { + "branch_icon": "", + "fetch_stash_count": true, + "fetch_status": false, + "fetch_upstream_icon": true + }, + "style": "powerline", + "template": " \u279c ({{ .UpstreamIcon }}{{ .HEAD }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }}) ", + "type": "git" + }, + { + "background": "p:sky", + "foreground": "p:white", + "powerline_symbol": "\ue0b0", + "style": "powerline", + "template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ", + "type": "node" + }, + { + "background": "p:teal_blue", + "foreground": "p:white", + "properties": { + "time_format": "15:04" + }, + "style": "diamond", + "template": " \u2665 {{ .CurrentDate | date .Format }} ", + "trailing_diamond": "\ue0b0", + "type": "time" + } + ], + "type": "prompt" + } + ], + "final_space": true, + "version": 3 +} diff --git a/nvim/init.lua b/nvim/init.lua index b813995..4bd1f79 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -387,6 +387,7 @@ local function makespec_lspconfig() local lspconfig = require("lspconfig") lspconfig.tinymist.setup({}) lspconfig.bashls.setup({}) + lspconfig.nushell.setup({}) lspconfig.lua_ls.setup({ cmd = { "lua-language-server" }, settings = { @@ -1267,6 +1268,7 @@ local function makespec_treesitter() "git_rebase", "gitcommit", "lua", + "nu", "python", "regex", "vimdoc", diff --git a/ranger/rc.conf b/ranger/rc.conf index 7b157e9..8054ce6 100644 --- a/ranger/rc.conf +++ b/ranger/rc.conf @@ -18,9 +18,3 @@ map w9 tab_open 9 map w taskview_open map scroll_preview 1 map scroll_preview -1 -setinregex re=/mnt/hdd1/gdrive preview_directories false -setinregex re=/mnt/hdd1/gdrive preview_files false -setinregex re=/mnt/hdd1/gdrive preview_images false -setinregex re=/mnt/hdd1/gdrive collapse_preview true -setinregex re=/mnt/hdd1/gdrive padding_right false -setinregex re=/mnt/hdd1/gdrive vcs_aware false diff --git a/tmux/tmux.conf b/tmux/tmux.conf index ac2ffb3..8fc5a16 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -20,7 +20,7 @@ set -g history-limit 20000 set -g focus-events on # terminal -set -g default-shell /bin/zsh +set -g default-shell /bin/nu # screen colors set -ga terminal-overrides ",*-256color*:Tc" diff --git a/zsh/.p10k.zsh b/zsh/.p10k.zsh index 5207f51..fde3a07 100644 --- a/zsh/.p10k.zsh +++ b/zsh/.p10k.zsh @@ -1,11 +1,10 @@ -# Generated by Powerlevel10k configuration wizard on 2024-02-02 at 23:10 CET. -# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 57817. -# Wizard options: nerdfont-v3 + powerline, small icons, classic, unicode, darkest, -# 24h time, round separators, round heads, flat tails, 2 lines, solid, full frame, -# sparse, many icons, fluent, instant_prompt=verbose. +# Generated by Powerlevel10k configuration wizard on 2025-04-10 at 20:41 CEST. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 37983. +# Wizard options: nerdfont-v3 + powerline, small icons, unicode, lean, 24h time, 1 line, +# sparse, few icons, concise, transient_prompt, instant_prompt=verbose. # Type `p10k configure` to generate another config. # -# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate # your own config based on it. # # Tip: Looking for a nice color? Here's a one-liner to print colormap. @@ -31,13 +30,10 @@ # The list of segments shown on the left. Fill it with the most important segments. typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= - os_icon # os identifier + # os_icon # os identifier dir # current directory vcs # git status - # =========================[ Line #2 ]========================= - newline # \n - # prompt_char # prompt symbol + prompt_char # prompt symbol ) # The list of segments shown on the right. Fill it with less important segments. @@ -45,7 +41,6 @@ # automatically hidden when the input line reaches it. Right prompt above the # last prompt line gets hidden if it would overlap with left prompt. typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( - # =========================[ Line #1 ]========================= status # exit code of the last command command_execution_time # duration of the last command background_jobs # presence of background jobs @@ -88,6 +83,7 @@ context # user@hostname nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) ranger # ranger shell (https://github.com/ranger/ranger) + yazi # yazi shell (https://github.com/sxyazi/yazi) nnn # nnn shell (https://github.com/jarun/nnn) lf # lf shell (https://github.com/gokcehan/lf) xplr # xplr shell (https://github.com/sayanarijit/xplr) @@ -95,7 +91,6 @@ midnight_commander # midnight commander shell (https://midnight-commander.org/) nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) chezmoi_shell # chezmoi shell (https://www.chezmoi.io/) - vi_mode # vi mode (you don't need this if you've enabled prompt_char) # vpn_ip # virtual private network indicator # load # CPU load # disk_usage # disk usage @@ -107,8 +102,6 @@ per_directory_history # Oh My Zsh per-directory-history local/global indicator # cpu_arch # CPU architecture time # current time - # =========================[ Line #2 ]========================= - newline # \n # ip # ip address and bandwidth usage for a specified network interface # public_ip # public IP address # proxy # system-wide http/https/ftp proxy @@ -123,6 +116,13 @@ # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. typeset -g POWERLEVEL9K_ICON_PADDING=none + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + # When set to true, icons appear before content on both sides of the prompt. When set # to false, icons go after content. If empty or not set, icons go before content in the left # prompt and after content in the right prompt. @@ -134,72 +134,59 @@ # Or for a specific segment in specific state: # # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false - typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true # Add an empty line before each prompt. typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true - # Connect left prompt lines with these symbols. You'll probably want to use the same color - # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%238F╭─' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%238F├─' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%238F╰─' + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= # Connect right prompt lines with these symbols. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%238F─╮' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%238F─┤' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%238F─╯' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= - # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or - # '─'. The last two make it easier to see the alignment between left and right prompt and to - # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false - # for more compact prompt if using this option. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=242 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then - # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE - # ornaments defined above. - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238 + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + # Add a space between the end of left prompt and the filler. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' + # Add a space between the filler and the start of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' # Start filler from the edge of the screen if there are no left segments on the first line. typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' # End filler on the edge of the screen if there are no right segments on the first line. typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' fi - # Default background color. - typeset -g POWERLEVEL9K_BACKGROUND=234 - - # Separator between same-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='%242F\uE0B5' - # Separator between same-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='%242F\uE0B7' - # Separator between different-color segments on the left. - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B4' - # Separator between different-color segments on the right. - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B6' - # To remove a separator between two segments, add "_joined" to the second segment name. - # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined) - - # The right end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B4' - # The left end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B6' - # The left end of left prompt. - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' - # The right end of right prompt. - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' - # Left prompt terminator for lines without any segments. - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - #################################[ os_icon: os identifier ]################################## # OS identifier color. - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=255 + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= # Custom icon. # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' ################################[ prompt_char: prompt symbol ]################################ - # Transparent background. - typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= # Green prompt symbol if the last command succeeded. typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 # Red prompt symbol if the last command failed. @@ -214,11 +201,9 @@ typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true # No line terminator if prompt_char is the last segment. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' # No line introducer if prompt_char is the first segment. typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= - # No surrounding whitespace. - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= ##################################[ dir: current directory ]################################## # Default current directory color. @@ -250,6 +235,7 @@ .perl-version .php-version .tool-versions + .mise.toml .shorten_folder_marker .svn .terraform @@ -349,14 +335,14 @@ # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls # back to POWERLEVEL9K_DIR_FOREGROUND. # - # typeset -g POWERLEVEL9K_DIR_CLASSES=() + typeset -g POWERLEVEL9K_DIR_CLASSES=() # Custom prefix. - # typeset -g POWERLEVEL9K_DIR_PREFIX='%244Fin ' + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' #####################################[ vcs: git status ]###################################### # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. - typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= # Untracked files icon. It's really a question mark, your font isn't broken. # Change the value of this parameter to show a different icon. @@ -382,7 +368,7 @@ if (( $1 )); then # Styling for up-to-date Git status. - local meta='%244F' # grey foreground + local meta='%f' # default foreground local clean='%76F' # green foreground local modified='%178F' # yellow foreground local untracked='%39F' # blue foreground @@ -430,6 +416,11 @@ res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" fi + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then # ⇣42 if behind the remote. (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" @@ -497,13 +488,13 @@ typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 # Custom icon. - # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= # Custom prefix. - typeset -g POWERLEVEL9K_VCS_PREFIX='%244Fon ' + # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' # Show status of repositories of these types. You can add svn and/or hg if you are # using them. If you do, your prompt may become slow even when your current directory - # isn't in an svn or hg reposotiry. + # isn't in an svn or hg repository. typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) # These settings are used for repositories other than Git or when gitstatusd fails and @@ -519,7 +510,7 @@ # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as # it will signify success by turning green. - typeset -g POWERLEVEL9K_STATUS_OK=true + typeset -g POWERLEVEL9K_STATUS_OK=false typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' @@ -531,7 +522,7 @@ # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as # it will signify error by turning red. - typeset -g POWERLEVEL9K_STATUS_ERROR=true + typeset -g POWERLEVEL9K_STATUS_ERROR=false typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' @@ -554,19 +545,19 @@ # Show this many fractional digits. Zero means round to seconds. typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 # Execution time color. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=248 + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 # Duration format: 1d 2h 3m 4s. typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' # Custom icon. - # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= # Custom prefix. - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%244Ftook ' + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' #######################[ background_jobs: presence of background jobs ]####################### # Don't show the number of background jobs. typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false # Background jobs color. - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=37 + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 # Custom icon. # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' @@ -664,7 +655,7 @@ # .NET Core version from asdf. typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' # Flutter version from asdf. typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 @@ -730,6 +721,12 @@ typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 # Custom icon. # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ yazi: yazi shell (https://github.com/sxyazi/yazi) ]##################### + # Yazi shell color. + typeset -g POWERLEVEL9K_YAZI_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_YAZI_VISUAL_IDENTIFIER_EXPANSION='⭐' ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### # Nnn shell color. @@ -793,23 +790,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### - # Text and color for normal (a.k.a. command) vi mode. - typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL - typeset -g POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND=106 - # Text and color for visual vi mode. - typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL - typeset -g POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND=68 - # Text and color for overtype (a.k.a. overwrite and replace) vi mode. - typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE - typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND=172 - # Text and color for insert vi mode. - typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= - typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=66 - - # Custom icon. - # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' - ######################################[ ram: free RAM ]####################################### # RAM color. typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 @@ -936,7 +916,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%244Fwith ' + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### # Python virtual environment color. @@ -1243,45 +1223,6 @@ # Custom icon. # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' - ################[ terraform: terraform workspace (https://www.terraform.io) ]################# - # Don't show terraform workspace if it's literally "default". - typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false - # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element - # in each pair defines a pattern against which the current terraform workspace gets matched. - # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) - # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, - # you'll see this value in your prompt. The second element of each pair in - # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The - # first match wins. - # - # For example, given these settings: - # - # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD - # '*test*' TEST - # '*' OTHER) - # - # If your current terraform workspace is "project_test", its class is TEST because "project_test" - # doesn't match the pattern '*prod*' but does match '*test*'. - # - # You can define different colors, icons and content expansions for different classes: - # - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' - # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' - typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - # '*prod*' PROD # These values are examples that are unlikely - # '*test*' TEST # to match your needs. Customize them as needed. - '*' OTHER) - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 - # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #############[ terraform_version: terraform version (https://www.terraform.io) ]############## - # Terraform version color. - typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 - # Custom icon. - # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# # Show kubecontext only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show kubecontext. @@ -1367,7 +1308,46 @@ POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' # Custom prefix. - typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%244Fat ' + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ terraform_version: terraform version (https://www.terraform.io) ]############## + # Terraform version color. + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# # Show aws only when the command you are typing invokes one of these tools. @@ -1557,7 +1537,7 @@ # Custom icon. # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom prefix. - typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%244Fin ' + # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin ' ###############################[ public_ip: public IP address ]############################### # Public IP color. @@ -1596,7 +1576,7 @@ # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' @@ -1658,9 +1638,9 @@ # behavior where they contain the end times of their preceding commands. typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false # Custom icon. - # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= # Custom prefix. - typeset -g POWERLEVEL9K_TIME_PREFIX='%244Fat ' + # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' # Example of a user-defined prompt segment. Function prompt_example will be called on every # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or @@ -1673,7 +1653,7 @@ # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job # is to generate the prompt segment for display in instant prompt. See - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k @@ -1701,7 +1681,7 @@ # - always: Trim down prompt when accepting a command line. # - same-dir: Trim down prompt when accepting a command line unless this is the first command # typed after changing current working directory. - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always # Instant prompt mode. # @@ -1709,7 +1689,7 @@ # it incompatible with your zsh configuration files. # - quiet: Enable instant prompt and don't print warnings when detecting console output # during zsh initialization. Choose this if you've read and understood - # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # https://github.com/romkatv/powerlevel10k#instant-prompt. # - verbose: Enable instant prompt and print a warning when detecting console output during # zsh initialization. Choose this if you've never tried instant prompt, haven't # seen the warning, or if you are unsure what this all means.