From 16363a1f4a3912097b61b3b87cd4ee25d40cc021 Mon Sep 17 00:00:00 2001 From: AngeD Date: Tue, 7 Nov 2023 23:49:57 +0100 Subject: [PATCH] feat: update p10k config --- .config/zsh/.p10k.zsh | 83 +++++++++++++++++++++++++++++++-------- .config/zsh/powerlevel10k | 2 +- .xinitrc | 2 +- bin/keepassxc | 5 --- bin/sbar | 2 +- 5 files changed, 69 insertions(+), 25 deletions(-) delete mode 100755 bin/keepassxc diff --git a/.config/zsh/.p10k.zsh b/.config/zsh/.p10k.zsh index 0a9683d..591a892 100644 --- a/.config/zsh/.p10k.zsh +++ b/.config/zsh/.p10k.zsh @@ -1,7 +1,7 @@ -# Generated by Powerlevel10k configuration wizard on 2023-11-07 at 21:34 CET. -# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 03275. -# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 1 line, -# compact, few icons, concise, instant_prompt=quiet. +# Generated by Powerlevel10k configuration wizard on 2023-11-07 at 23:48 CET. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 61526. +# Wizard options: awesome-fontconfig + powerline + python, large icons, unicode, lean, +# 1 line, compact, few icons, concise, instant_prompt=quiet. # Type `p10k configure` to generate another config. # # Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate @@ -98,6 +98,7 @@ todo # todo items (https://github.com/todotxt/todo.txt-cli) timewarrior # timewarrior tracking status (https://timewarrior.net/) taskwarrior # taskwarrior task count (https://taskwarrior.org/) + #per_directory_history # Oh My Zsh per-directory-history local/global indicator # cpu_arch # CPU architecture # time # current time # ip # ip address and bandwidth usage for a specified network interface @@ -109,10 +110,10 @@ ) # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. - typeset -g POWERLEVEL9K_MODE=nerdfont-complete + typeset -g POWERLEVEL9K_MODE=awesome-fontconfig # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. - typeset -g POWERLEVEL9K_ICON_PADDING=none + typeset -g POWERLEVEL9K_ICON_PADDING=moderate # Basic style options that define the overall look of your prompt. You probably don't want to # change them. @@ -190,9 +191,9 @@ # Red prompt symbol if the last command failed. typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 # Default prompt symbol. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='' # Prompt symbol in command vi mode. - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='' # Prompt symbol in visual vi mode. typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' # Prompt symbol in overwrite vi mode. @@ -232,7 +233,7 @@ .java-version .perl-version .php-version - .tool-version + .tool-versions .shorten_folder_marker .svn .terraform @@ -418,11 +419,17 @@ res+=" ${modified}wip" fi - # ⇣42 if behind the remote. - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + 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}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" + fi + # ⇠42 if behind the push remote. (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " @@ -855,6 +862,19 @@ # Custom icon. # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]####### + # Color when using local/global history. + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130 + + # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION='' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION='' + + # Custom icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + ################################[ cpu_arch: CPU architecture ]################################ # CPU architecture color. typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172 @@ -1372,10 +1392,39 @@ # Show azure only when the command you are typing invokes one of these tools. # Tip: Remove the next line to always show azure. typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current azure account name 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_AZURE_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current azure account is "company_test", its class is TEST because "company_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_AZURE_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + # Azure account name color. - typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32 # Custom icon. - # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### # Show gcloud only when the command you are typing invokes one of these tools. @@ -1541,7 +1590,7 @@ # Show battery in yellow when it's discharging. typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 # Battery pictograms going from low to high level of charge. - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' + typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█') # Don't show the remaining time to charge/discharge. typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false diff --git a/.config/zsh/powerlevel10k b/.config/zsh/powerlevel10k index 017395a..174ce9b 160000 --- a/.config/zsh/powerlevel10k +++ b/.config/zsh/powerlevel10k @@ -1 +1 @@ -Subproject commit 017395a266aa15011c09e64e44a1c98ed91c478c +Subproject commit 174ce9bf0166c657404a21f4dc9608da935f7325 diff --git a/.xinitrc b/.xinitrc index b1a9d05..1f1e46c 100644 --- a/.xinitrc +++ b/.xinitrc @@ -11,6 +11,6 @@ xss-lock -n screensaver -- lock & picom & gammastep 2> /dev/null & sbar & -./keepass/start.sh & +"$HOME/keepass/keepassxc" & exec dbus-launch dwm diff --git a/bin/keepassxc b/bin/keepassxc deleted file mode 100755 index 589325c..0000000 --- a/bin/keepassxc +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -KEEPASS="$HOME/keepass" - -/usr/bin/keepassxc --config "$KEEPASS/keepassxc.ini" "$KEEPASS/Passwords.kdbx" diff --git a/bin/sbar b/bin/sbar index 6193e8b..6629db5 100755 --- a/bin/sbar +++ b/bin/sbar @@ -40,7 +40,7 @@ update_wlp() { [ -z "$ssid" ] && wlp='⚠' && return [ -z "$sig" ] && sig=0 - # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/libnmc-base/nm-client-utils.c#L628 + # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/d9b06a95/src/libnmc-base/nm-client-utils.c#L628 { [ "$sig" -gt 5600 ] && wlp="▂▄▆█ $ssid"; } || { [ "$sig" -gt 3850 ] && wlp="▂▄▆_ $ssid"; } || { [ "$sig" -gt 1650 ] && wlp="▂▄__ $ssid"; } ||