dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit fb2d7f4365a177bfa02474ec9d4b1c06e6965bf1 parent 1ce2b2c64b7c6c061f0f426ea6d4ba03df6acba1 Author: maydayv7 <maydayv7@gmail.com> Date: Fri, 18 Apr 2025 20:12:12 +0530 feat!: `shells` and `files` + Use `starship` prompt theme + refactor `files`
Diffstat:
47 files changed, 566 insertions(+), 1444 deletions(-)
diff --git a/README.md b/README.md @@ -32,24 +32,25 @@ This [repository](https://github.com/maydayv7/dotfiles) contains the configurati <details> <summary>Theming</summary> -- [Powerlevel10K](https://github.com/romkatv/powerlevel10k) Theme: ZSH Theme for the fancy-looking prompt with immense customization capabilities +- [Adwaita GTK3](https://github.com/lassekongo83/adw-gtk3): Theme from `libadwaita` ported to GTK3 - [Arc Theme](https://github.com/jnsh/arc-theme): Flat GTK theme with transparent elements for various desktop shells, window managers and applications +- [Arc KDE Theme](https://github.com/PapirusDevelopmentTeam/arc-kde): Port of the Arc GTK Theme for Plasma Desktop - [Bibata Cursor](https://github.com/ful1e5/Bibata_Cursor): Compact and material designed cursor set +- [Catppuccin](https://github.com/catppuccin) Theme: A community-driven Pastel Theme consisting of 4 soothing warm Flavors with 26 eye-candy Colors each - [DNOME](https://github.com/GeopJr/DNOME) Discord Theme: Discord Theme inspired by Adwaita, designed to integrate Discord with GNOME +- Firefox [Elementary Theme](https://github.com/Zonnev/elementaryos-firefox-theme): Elementary OS Theme for the Mozilla Firefox Browser, used for better desktop integration +- Firefox [GNOME Theme](https://github.com/rafaelmardojai/firefox-gnome-theme): GNOME Theme for the Mozilla Firefox Browser, used for better desktop integration +- [KvLibadwaita](https://github.com/GabePoel/KvLibadwaita) Kvantum Theme: Integrates QT Apps with GNOME Desktop - [Nordic](https://github.com/orblazer/discord-nordic) Discord Theme: Discord Theme using the [Nord](<(https://www.nordtheme.com/)>) color palette -- [Firefox GNOME Theme](https://github.com/rafaelmardojai/firefox-gnome-theme): GNOME Theme for the Mozilla Firefox Browser, used for better desktop integration -- [Firefox Elementary Theme](https://github.com/Zonnev/elementaryos-firefox-theme): Elementary OS Theme for the Mozilla Firefox Browser, used for better desktop integration +- [Starship](https://starship.rs/) Prompt Theme: Minimal, blazing-fast, and infinitely customizable prompt for any shell - [VS Code Adwaita Theme](https://github.com/piousdeer/vscode-adwaita): Integrates Visual Studio Code with GNOME Desktop - [VS Code Arc Theme](https://github.com/alvesvaren/arc-dark-vscode): Port of the Arc Dark GTK Theme for Visual Studio Code - [VS Code Elementary Theme](https://github.com/sixpounder/vscode-elementary-theme): Integrates Visual Studio Code with Pantheon Desktop -- [KvLibadwaita Kvantum Theme](https://github.com/GabePoel/KvLibadwaita): Integrates QT Apps with GNOME Desktop -- [Arc KDE Theme](https://github.com/PapirusDevelopmentTeam/arc-kde): Port of the Arc GTK Theme for Plasma Desktop +- Logseg [Nord Theme](https://github.com/Bad3r/Logseq-Nord-Theme): Logseq in an arctic, north-bluish color palette +- Logseq [Bonofix Theme][https://github.com/Sansui233/logseq-bonofix-theme]: A clean Logseq theme with focus on long-time writing experience - ULauncher [Adwaita Theme](https://github.com/gabrbrand/adwaita-dark-ulauncher): ULauncher Theme based on GNOME Desktop's Adwaita Dark Theme - ULauncher [Arc Theme](https://github.com/tjquillan/Arc-Dark-ULauncher): An Arc Dark Theme for ULauncher - ULauncher [Elementary Theme](https://github.com/heidefinnischen/ULauncher-elementary): ULauncher Themes for Elementary OS -- [Catppuccin](https://github.com/catppuccin) Theme: A community-driven Pastel Theme consisting of 4 soothing warm Flavors with 26 eye-candy Colors each -- Logseq [Bonofix Theme][https://github.com/Sansui233/logseq-bonofix-theme]: A clean Logseq theme with focus on long-time writing experience -- Logseg [Nord Theme](https://github.com/Bad3r/Logseq-Nord-Theme): Logseq in an arctic, north-bluish color palette </details> @@ -512,6 +513,9 @@ _Thanks a lot! ;)_ - Update Hyprland to v0.48.0 - Use `hyprswitch` to switch between windows - Use `pcmanfm-qt` to render desktop icons +- Update Shell Configuration + - Use `fastfetch` + - Use [`starship`](https://starship.rs/) shell prompt theme ### v25 diff --git a/devices/valkyrie/default.nix b/devices/valkyrie/default.nix @@ -28,7 +28,6 @@ }; }; - shell.utilities = true; apps = { wine.utilities = true; list = [ @@ -45,6 +44,11 @@ ]; }; + shell = { + prompt = true; + utilities = true; + }; + nix = { index = true; tools = true; diff --git a/devices/vortex.nix b/devices/vortex.nix @@ -22,7 +22,6 @@ }; }; - shell.utilities = true; apps = { wine.utilities = true; list = [ @@ -35,6 +34,11 @@ ]; }; + shell = { + prompt = true; + utilities = true; + }; + nix = { index = true; tools = true; diff --git a/files/archive/.keep b/files/.archive/.keep diff --git a/files/archive/Linux/Arch/COMMANDS.md b/files/.archive/Linux/Arch/COMMANDS.md diff --git a/files/archive/Linux/Arch/INSTALL.md b/files/.archive/Linux/Arch/INSTALL.md diff --git a/files/archive/Linux/Arch/zshrc b/files/.archive/Linux/Arch/zshrc diff --git a/files/archive/Linux/Pop/conky/conky.lua b/files/.archive/Linux/Pop/conky/conky.lua diff --git a/files/archive/Linux/Pop/conky/conkyrc b/files/.archive/Linux/Pop/conky/conkyrc diff --git a/files/archive/Linux/Pop/neofetch/config.conf b/files/.archive/Linux/Pop/neofetch/config.conf diff --git a/files/archive/Linux/Pop/p10k.zsh b/files/.archive/Linux/Pop/p10k.zsh diff --git a/files/archive/Windows/APPS.md b/files/.archive/Windows/APPS.md diff --git a/files/archive/Windows/Velociraptor.rmskin b/files/.archive/Windows/Velociraptor.rmskin Binary files differ. diff --git a/files/README.md b/files/README.md @@ -2,31 +2,4 @@ The `files` directory is used to store all my plain-text program configuration files _(or as we all love to call it, the `dotfiles`)_ -- [`repl.nix`](./repl.nix): Interactive Nix Shell to explore syntax and configuration - -- [`ascii`](./ascii) - Personal Collection of beautiful Ascii Art -- [`colors`](./colors) - Base16 Color Schemes -- [`fetch`](./fetch) - `fastfetch` CLI Theming -- [`geany`](./geany) - Configuration for Geany Text Editor -- [`git`](./git) - Configuration for `git` Version Control -- [`gnome`](./gnome) - Configuration Files for GNOME Desktop -- [`gpg`](./gpg) - Encrypted GPG Keys -- [`gtk`](./gtk) - GTK+ Theming and Styles -- [`hyprland`](./hyprland) - Hyprland WM Configuration -- [`images`](./images) - Personal Wallpapers and Profile Pictures -- [`logseq`](./logseq) - Logseq Notes Configuration -- [`nano`](./nano) - `nano` Text Editor Global Configuration -- [`pantheon`](./pantheon) - Configuration Files for Pantheon Desktop -- [`proprietary`](https://github.com/maydayv7/proprietary) - Custom Proprietary Files -- [`templates`](./templates) - Document Templates -- [`touchegg`](./touchegg) - Touchegg X11 Touchpad Gestures -- [`ulauncher`](./ulauncher) - ULauncher Application Launcher Settings & Plugins -- [`vesktop`](./vesktop) - Vesktop Discord Chat Configuration -- [`vscode`](./vscode) - Visual Studio Code Editor Configuration -- [`wine`](./wine) - Configuration and Theming for `wine` applications -- [`xdg`](./xdg) - XDG Desktop Utilities Configuration -- [`xfce`](./xfce) - Configuration Files for XFCE Desktop -- [`xorg`](./xorg) - X11 Display Server Configuration -- [`zsh`](./zsh) - Z Shell Configuration and Prompt Theming - -- [`archive`](./_archive) - Old, Archived Files +Read [`flake.nix`](./flake.nix) to understand how they are used diff --git a/files/colors/README.md b/files/colors/README.md @@ -1,4 +1,4 @@ -### Base 16 Color Schemes +### Base16 Color Schemes The color schemes are specified according to the following format - diff --git a/files/fastfetch.jsonc b/files/fastfetch.jsonc @@ -0,0 +1,165 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "auto", + "padding": { + "top": 6, + "left": 3 + }, + "color": { + "1": "blue", + "2": "white" + } + }, + "display": { + "separator": " : " + }, + "modules": [ + { + "type": "custom", + "format": "┌─⮞ {#1}Hardware{#}" + }, + { + "type": "host", + "key": " ", + "keyColor": "cyan" + }, + { + "type": "cpu", + "key": " ", + "keyColor": "cyan", + "showPeCoreCount": true + }, + { + "type": "gpu", + "key": " ", + "keyColor": "cyan", + "driverSpecific": true + }, + { + "type": "display", + "key": " ", + "keyColor": "cyan" + }, + { + "type": "memory", + "key": " ", + "keyColor": "green" + }, + { + "type": "disk", + "key": " ", + "keyColor": "green" + }, + { + "type": "custom", + "format": "└─" + }, + "break", + { + "type": "custom", + "format": "┌─⮞ {#1}Software{#}" + }, + { + "type": "os", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "kernel", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "bios", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "packages", + "key": " ", + "keyColor": "yellow" + }, + { + "type": "shell", + "key": " ", + "keyColor": "blue" + }, + { + "type": "de", + "key": " ", + "keyColor": "blue" + }, + { + "type": "wm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "lm", + "key": " ", + "keyColor": "blue" + }, + { + "type": "wmtheme", + "key": " ", + "keyColor": "blue" + }, + { + "type": "terminal", + "key": " ", + "keyColor": "blue" + }, + { + "type": "terminalfont", + "key": " ", + "keyColor": "light_red" + }, + { + "type": "theme", + "key": " ", + "keyColor": "light_red", + "format": "{2}" + }, + { + "type": "icons", + "key": " ", + "keyColor": "light_red" + }, + { + "type": "cursor", + "key": " ", + "keyColor": "light_red" + }, + { + "type": "custom", + "format": "└─" + }, + "break", + { + "type": "custom", + "format": "┌─⮞ {#1}Time{#}" + }, + { + "type": "command", + "key": " ", + "keyColor": "magenta", + "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" + }, + { + "type": "uptime", + "key": " ⊗", + "keyColor": "magenta" + }, + { + "type": "datetime", + "key": " ", + "keyColor": "magenta" + }, + { + "type": "custom", + "format": "└─" + }, + "break" + ] +} diff --git a/files/fetch/config.jsonc b/files/fetch/config.jsonc @@ -1,173 +0,0 @@ -{ - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "type": "auto", - "padding": { - "top": 6, - "left": 3 - }, - "color": { - "1": "blue", - "2": "white" - } - }, - "display": { - "separator": " : " - }, - "modules": [ - { - "type": "title", - "format": "{#1} {user-name} ✠ {host-name} {#}" - }, - { - "type": "colors", - "symbol": "circle" - }, - "break", - { - "type": "custom", - "format": "┌──────────────────────────── {#1}Hardware{#} ────────────────────────────┐" - }, - { - "type": "host", - "key": " ", - "keyColor": "cyan" - }, - { - "type": "cpu", - "key": " ", - "keyColor": "cyan", - "showPeCoreCount": true - }, - { - "type": "gpu", - "key": " ", - "keyColor": "cyan", - "driverSpecific": true - }, - { - "type": "display", - "key": " ", - "keyColor": "cyan" - }, - { - "type": "memory", - "key": " ", - "keyColor": "green" - }, - { - "type": "disk", - "key": " ", - "keyColor": "green" - }, - { - "type": "custom", - "format": "└──────────────────────────────────────────────────────────────────┘" - }, - "break", - { - "type": "custom", - "format": "┌──────────────────────────── {#1}Software{#} ────────────────────────────┐" - }, - { - "type": "os", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "kernel", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "bios", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "packages", - "key": " ", - "keyColor": "yellow" - }, - { - "type": "shell", - "key": " ", - "keyColor": "blue" - }, - { - "type": "de", - "key": " ", - "keyColor": "blue" - }, - { - "type": "wm", - "key": " ", - "keyColor": "blue" - }, - { - "type": "lm", - "key": " ", - "keyColor": "blue" - }, - { - "type": "wmtheme", - "key": " ", - "keyColor": "blue" - }, - { - "type": "terminal", - "key": " ", - "keyColor": "blue" - }, - { - "type": "terminalfont", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "theme", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "icons", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "cursor", - "key": " ", - "keyColor": "light_red" - }, - { - "type": "custom", - "format": "└──────────────────────────────────────────────────────────────────┘" - }, - "break", - { - "type": "custom", - "format": "┌────────────────────────────── {#1}Time{#} ──────────────────────────────┐" - }, - { - "type": "command", - "key": " ", - "keyColor": "magenta", - "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" - }, - { - "type": "uptime", - "key": " ⊗", - "keyColor": "magenta" - }, - { - "type": "datetime", - "key": " ", - "keyColor": "magenta" - }, - { - "type": "custom", - "format": "└──────────────────────────────────────────────────────────────────┘" - }, - "break" - ] -} diff --git a/files/flake.nix b/files/flake.nix @@ -15,6 +15,9 @@ system = "/etc/nixos"; # Configuration Directory persist = "/nix/state"; # Persisted Files + gpg = "/etc/gpg"; # GPG Keys Directory + sops = ../secrets/secrets.yaml; # Encrypted Secrets + cache = "maydayv7-dotfiles"; flake = "github:maydayv7/dotfiles"; repo = "https://github.com/maydayv7/dotfiles"; @@ -23,6 +26,10 @@ systemd = ''export PATH="''${XDG_BIN_HOME}:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin"''; }; + # Interactive Nix Shell + # To explore syntax and configuration + repl = ./repl.nix; + # ASCII Art ascii = map.files { directory = ./ascii; @@ -30,14 +37,20 @@ recursive = true; }; + # Directory Bookmarks + bookmarks = '' + file:///data/files Files + file:/// Computer + ''; + # Base16 Color Schemes colors = map.files { directory = ./colors; extension = ".yaml"; }; - # Hyfetch - fetch = readFile ./fetch/config.jsonc; + # Fastfetch + fetch = readFile ./fastfetch.jsonc; # Geany Text Editor geany = map.files { @@ -47,7 +60,7 @@ }; # X11 Touchpad Gestures - gestures = readFile ./touchegg/gestures.xml; + gestures = readFile ./touchegg.xml; # 'git' Version Control git.hooks = ./git/hooks; @@ -60,12 +73,6 @@ extension = ".json"; }; - # GPG Keys Directory - gpg = "/etc/gpg"; - - # GTK+ Settings - gtk.bookmarks = readFile ./gtk/bookmarks; - # Hyprland WM hyprland = { @@ -117,7 +124,7 @@ }; # Nano Text Editor - nano = readFile ./nano/nanorc; + nano = readFile ./nanorc; # Pantheon Desktop pantheon = { @@ -135,9 +142,6 @@ proprietary = inputs.proprietary.files; inherit (proprietary) wallpapers; - # Interactive Nix Shell - repl = ./repl.nix; - # Bash Scripts scripts = map.files { directory = ../scripts; @@ -145,9 +149,6 @@ extension = ".sh"; }; - # 'sops' Encrypted Secrets - sops = ../secrets/secrets.yaml; - # Document Templates templates = ./templates; @@ -177,9 +178,6 @@ extension = ".json"; }; - # XDG Settings - xdg.mime = import ./xdg/mime.nix; - # XFCE Desktop xfce = { css = readFile ./xfce/gtk.css; @@ -195,12 +193,6 @@ # My Personal Website website = ../site; - - # XORG Display Server - xorg = readFile ./xorg/Xresources; - - # Z Shell - zsh.prompt = readFile ./zsh/p10k.zsh; }; perSystem = _: { diff --git a/files/gtk/bookmarks b/files/gtk/bookmarks @@ -1,2 +0,0 @@ -file:///data/files Files -file:/// Computer diff --git a/files/nano/nanorc b/files/nanorc diff --git a/files/touchegg/gestures.xml b/files/touchegg.xml diff --git a/files/wine/theme.msstyles b/files/wine/theme.msstyles Binary files differ. diff --git a/files/xorg/Xresources b/files/xorg/Xresources @@ -1,6 +0,0 @@ -Xft.antialias: 1 -Xft.hinting: 1 -Xft.autohint: 0 -Xft.rgba: rgb -Xft.hintstyle: hintslight -Xft.lcdfilter: lcddefault diff --git a/files/zsh/p10k.zsh b/files/zsh/p10k.zsh @@ -1,972 +0,0 @@ -# ################################################################################### # -# My Epic P10k Config # -# Configuration for Powerlevel10k with Powerline Prompt Style and Colorful Background # -# ################################################################################### # - -# Temporarily Change Options -'builtin' 'local' '-a' 'p10k_config_opts' -[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') -[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') -[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') -'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' - -() { - emulate -L zsh -o extended_glob - - # Unset all Configuration Options - unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' - - # Required: ZSH >= 5.1 - autoload -Uz is-at-least && is-at-least 5.1 || return - - # Segments shown on the LEFT - typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( - ## Line 1 - os_icon # OS Identifier - context # USER@HOSTNAME - dir # Current Directory - vcs # 'git' Status - - ## Line 2 - newline # \n - ) - - # Segments shown on the RIGHT - typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( - ## Line 1 - status # Exit Code of the Last Command - background_jobs # Presence of Background Jobs - direnv # 'direnv' Status (https://direnv.net/) - asdf # ASDF Version Manager (https://github.com/asdf-vm/asdf) - virtualenv # Python Virtual Environment (https://docs.python.org/3/library/venv.html) - anaconda # Conda Environment (https://conda.io/) - pyenv # Python Environment (https://github.com/pyenv/pyenv) - goenv # Go Environment (https://github.com/syndbg/goenv) - nodenv # Node.js Version from NodENV (https://github.com/nodenv/nodenv) - nvm # Node.js Version from NVM (https://github.com/nvm-sh/nvm) - nodeenv # Node.js Environment (https://github.com/ekalinin/nodeenv) - # node_version # Node.js Version - # go_version # Go Version (https://golang.org) - # rust_version # Rustc Version (https://www.rust-lang.org) - # dotnet_version # .NET Version (https://dotnet.microsoft.com) - # php_version # PHP Version (https://www.php.net/) - # laravel_version # Laravel PHP Framework Version (https://laravel.com/) - # java_version # java Version (https://www.java.com/) - # package # Name@Version from Package.json (https://docs.npmjs.com/files/package.json) - rbenv # Ruby Version from RbENV (https://github.com/rbenv/rbenv) - rvm # Ruby Version from RVM (https://rvm.io) - fvm # Flutter Version Management (https://github.com/leoafarias/fvm) - luaenv # Lua Version from LuaENV (https://github.com/cehoffman/luaenv) - jenv # Java Version from JENV (https://github.com/jenv/jenv) - plenv # Perl Version from PlENV (https://github.com/tokuhirom/plenv) - phpenv # PHP Version from PHPENV (https://github.com/phpenv/phpenv) - scalaenv # Scala version from ScalaENV (https://github.com/scalaenv/scalaenv) - haskell_stack # Haskell Version from Stack (https://haskellstack.org/) - kubecontext # Current Kubernetes Context (https://kubernetes.io/) - terraform # Terraform Workspace (https://www.terraform.io) - aws # AWS Profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) - aws_eb_env # AWS Elastic Beanstalk Environment (https://aws.amazon.com/elasticbeanstalk/) - azure # Azure Account Name (https://docs.microsoft.com/en-us/cli/azure) - gcloud # Google Cloud CLI Account and Project (https://cloud.google.com/) - google_app_cred # Google Application Credentials (https://cloud.google.com/docs/authentication/production) - nordvpn # NordVPN Connection Status (https://nordvpn.com/) - ranger # Ranger Shell (https://github.com/ranger/ranger) - vim_shell # 'vim' Shell Indicator (:sh) - midnight_commander # Midnight Commander Shell (https://midnight-commander.org/) - nix_shell # Nix Shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) - vi_mode # 'vi' Mode - # vpn_ip # VPN Indicator - # load # CPU Load - # disk_usage # Disk Usage - ram # Free RAM - # swap # used SWAP - todo # ToDo Items (https://github.com/todotxt/todo.txt-cli) - timewarrior # TimeWarrior Tracking Status (https://timewarrior.net/) - taskwarrior # TaskWarrior Task Count (https://taskwarrior.org/) - battery # Internal Battery - command_execution_time # Duration of the Last Command - time # Current Time - - ## Line 2 - newline # \n - # ip # IP Address and Bandwidth Usage - # public_ip # Public IP Address - # wifi # WiFi Speed - ) - - ## Prompt - typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always - typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose - - # Character Set - typeset -g POWERLEVEL9K_MODE=nerdfont-complete - - # Icons - typeset -g POWERLEVEL9K_ICON_PADDING=none - typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= - typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 - typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 - - #typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' # Custom Icon - - # Connectors - typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' - typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' - - # Fillers - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─' - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= - typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= - if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then - typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' - typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' - fi - - # Separators - typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' - typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' - typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' - typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' - typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' - typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' - typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - - # Characters - typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= - typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 - typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' - typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' - typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= - typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= - - # Reload - typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true - (( ! $+functions[p10k] )) || p10k reload - - #E Directory Handling - # Colors - typeset -g POWERLEVEL9K_DIR_BACKGROUND=6 - typeset -g POWERLEVEL9K_DIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 - typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=0 - - # Unshortened Anchors - local anchor_files=( - .bzr - .citc - .git - .hg - .node-version - .python-version - .go-version - .ruby-version - .lua-version - .java-version - .perl-version - .php-version - .tool-version - .shorten_folder_marker - .svn - .terraform - CVS - Cargo.toml - composer.json - go.mod - package.json - stack.yaml - ) - - # Shorteners - typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique - typeset -g POWERLEVEL9K_SHORTEN_DELIMITER='...' - typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true - typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" - typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false - typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 - typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 - typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 - typeset -g POWERLEVEL9K_DIR_HYPERLINK=true - typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 - - #typeset -g POWERLEVEL9K_LOCK_ICON='⭐' # Custom Icon - #typeset -g POWERLEVEL9K_DIR_PREFIX='in ' # Custom Prefix - - # Custom Directories Styling - typeset -g POWERLEVEL9K_DIR_CLASSES=( - '~/work(|/*)' WORK '' - '~(|/*)' HOME '' - '*' DEFAULT '' - ) - - ## Version Control - # Colors - #typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 - #typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 - #typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 - #typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 - #typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 - - # Icons - typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' - typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' - - # Formatter - function my_git_formatter() { - emulate -L zsh - - if [[ -n $P9K_CONTENT ]]; then - typeset -g my_git_format=$P9K_CONTENT - return - fi - - # Styling - local meta='%7F' # White Foreground - local clean='%0F' # Black Foreground - local modified='%0F' # Black Foreground - local untracked='%0F' # Black Foreground - local conflicted='%1F' # Red Foreground - - local res - local where - if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then - res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}" - where=${(V)VCS_STATUS_LOCAL_BRANCH} - elif [[ -n $VCS_STATUS_TAG ]]; then - res+="${meta}#" - where=${(V)VCS_STATUS_TAG} - fi - - (( $#where > 32 )) && where[13,-13]="…" - res+="${clean}${where//\%/%%}" # escape % - [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" - if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then - res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % - fi - - (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" - (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" - (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" - (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " - (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" - (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" - [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" - (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" - (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" - (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" - (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" - (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" - typeset -g my_git_format=$res - } - functions -M my_git_formatter 2>/dev/null - - # Controllers - typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) - typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 - typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' - typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' - typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 - - #typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - #typeset -g POWERLEVEL9K_VCS_PREFIX='on ' # Custom Prefix - - ## Command Status - typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true - - # Success - typeset -g POWERLEVEL9K_STATUS_OK=true - typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 - - # Failure - typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 - - # Error Code - typeset -g POWERLEVEL9K_STATUS_ERROR=true - typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=0 - - # Termination - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true - typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=6 - typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=0 - - # Partial Failure - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=2 - typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=0 - - ## Command Duration - # Colors - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=6 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=0 - - # Precision - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 - typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' - - #typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - #typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' # Custom Prefix - - ## Background Jobs - # Colors - #typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 - #typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 - - # Controller - typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false - - #typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Context - # Colors - typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=4 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=4 - typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=0 - typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=4 - - # Format - typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' - typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n ✠ %m' - typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n ✠ %m' - #typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= - - #typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - #typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' # Custom Prefix - - ## RAM - # Colors - typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 - typeset -g POWERLEVEL9K_RAM_BACKGROUND=6 - - #typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## SWAP - # Colors - #typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 - #typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 - - #typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Battery - # Colors - typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 - typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 - typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=0 - typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=0 - typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' - typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false - typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=4 - - ## WiFi - # Colors - #typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 - #typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 - - # Signal Strength - #typeset -g my_wifi_fg=(0 0 0 0 0) - #typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') - #typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' - #typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' - - #typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## IP - # Colors - typeset -g POWERLEVEL9K_IP_BACKGROUND=4 - typeset -g POWERLEVEL9K_IP_FOREGROUND=0 - #typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 - #typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 - #typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 - #typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 - - # Controllers - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' - typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' - typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*' - typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false - - # Custom Icons - #typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Time - # Colors - #typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 - #typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 - - # Format - typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' - typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false - - typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='' # Custom Icon - #typeset -g POWERLEVEL9K_TIME_PREFIX='at ' # Custom Prefix - - ## CPU Load - typeset -g POWERLEVEL9K_LOAD_WHICH=5 - - # Colors - #typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 - #typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 - #typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 - #typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 - #typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 - #typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 - - #typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Disk Usage - # Colors - #typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 - #typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 - #typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 - #typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 - #typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 - #typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 - - # Thresholds - typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 - typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 - typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false - - #typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## DirENV - # Colors - #typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 - #typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 - - #typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## ASDF - # Colors - typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 - - # Controllers - typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= - - # Versions - # Ruby - typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 - #typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Python - typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 - #typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Go - typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 - #typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Node - typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 - #typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Rust - typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 - #typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' - - # .NET - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 - #typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Flutter - typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 - #typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Lua - typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 - #typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Java - typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 - typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 - #typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Perl - typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 - #typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Erlang - typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 - #typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Elixir - typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 - #typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Postgres - typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 - #typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' - - # PHP - typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 - #typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Haskell - typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 - #typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' - - # Julia - typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 - typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 - #typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' - - ## NordVPN - # Colors - #typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 - #typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 - - # Controllers - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= - typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= - - #typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Ranger - # Colors - #typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 - #typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 - - #typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Vim Shell - # Colors - #typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 - #typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 - - #typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Midnight Commander - # Colors - #typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 - #typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 - - #typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Nix Shell - # Colors - typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 - typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 - - # Controllers - #typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= - #typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Vi Mode - # Colors - typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 - typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL - typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 - typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL - typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 - typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE - typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 - typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= - typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 - - ## ToDo - # Colors - #typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 - #typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 - - # Controllers - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true - typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false - #typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' - - #typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## TimeWarrior - # Colors - #typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 - #typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 - - # Format - typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' - - #typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## TaskWarrior - # Colors - #typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 - #typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 - - # Format - #typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' - - #typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Languages - ## Python - # Colors - #typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 - #typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 - - # Controllers - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false - typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false - typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= - typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' - - # Custom Icons - #typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Anaconda - # Colors - #typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 - #typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 - - # Format - typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' - - #typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Go - # Colors - #typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 - #typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 - #typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 - - # Controllers - typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true - - # Custom Icons - #typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Node - # Colors - #typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 - #typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 - #typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 - #typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 - #typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 - #typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 - #typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 - #typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 - - # Controllers - typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false - typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= - typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true - - # Custom Icons - #typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Rust - # Colors - #typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 - #typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 - - # Controllers - typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true - - # Custom Icon - #typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## .NET - # Colors - #typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 - #typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 - - # Controllers - typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true - - # Custom Icon - #typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## PHP - # Colors - typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 - typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 - typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true - #typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 - - # Controllers - typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true - - # Custom Icons - #typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Laravel - # Colors - typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 - - #typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Ruby - # Colors - #typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 - #typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 - #typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 - - # Controllers - typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true - typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false - typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false - - # Custom Icons - #typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Java - # Colors - typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 - typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 - #typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 - #typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 - #typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 - #typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 - - # Controllers - typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true - typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false - #typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' - typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true - - # Custom Icons - #typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' - #typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Flutter - # Colors - #typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 - #typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 - - #typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Lua - # Colors - #typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 - - # Controllers - typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true - - #typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Perl - # Colors - #typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 - - # Controllers - typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true - - #typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Scala - # Colors - #typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 - #typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 - - # Controllers - typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) - typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false - typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true - - #typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Haskell - # Colors - #typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 - #typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 - - # Controllers - typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) - typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true - - #typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Terraform - typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false - - # Classes - typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( - '*prod*' PROD - '*test*' TEST - '*' OTHER - ) - - # Format - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 - typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 - #typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' - - ## Kubernetes - typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile' - - # Classes - typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( - '*prod*' PROD - '*test*' TEST - '*' DEFAULT - ) - - # Format - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 - #typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Expansions - typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' - POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' - - #typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' # Custom Prefix - - ## AWS - typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' - - # Colors - #typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 - #typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 - - # Classes - typeset -g POWERLEVEL9K_AWS_CLASSES=( - '*prod*' PROD - '*test*' TEST - '*' DEFAULT - ) - - # Format - #typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 - #typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 - #typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - #typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Azure - typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' - - # Colors - #typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 - #typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 - - #typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon - - ## Google - typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' - - # Colors - #typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 - #typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 - - # Classes - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( - '*:*prod*:*' PROD - '*:*test*:*' TEST - '*' DEFAULT - ) - - # Format - typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' - typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' - #typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 - #typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 - #typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' - - # Controllers - typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 - typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' - - #typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' # Custom Icon -} -typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} -(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} -'builtin' 'unset' 'p10k_config_opts' diff --git a/lib/README.md b/lib/README.md @@ -7,7 +7,7 @@ The `lib` directory contains custom-made utility functions (exposed as `util`), - [`build`](./build.nix): Configuration building functions for efficient system management and declaration - - `device`: Main system configuration building function, used to build the entire configuration for devices (`nixosConfigurations`) as per provided parameters - - `mime`: Builds and sets `mimetype` values according to specified application and types + - `mime`: Builds and sets `mimetype` values for specified application - `script`: Builds script from specified file by removing `shebangs` and exporting as a _string_ - `theme`: Builds specified file by replacing placeholders with provided theming elements - `until`: Returns part of _string_ before specified character, or entire _string_ if character is not present diff --git a/files/xdg/mime.nix b/lib/_mime.nix diff --git a/lib/build.nix b/lib/build.nix @@ -22,12 +22,12 @@ lib: let in { ## Builder Functions ## # Mime Types Handler - mime = values: option: + mime = option: listToAttrs (flatten (mapAttrsToList (name: types: if hasAttr name option then map (type: nameValuePair type option."${name}") types else []) - values)); + (import ./_mime.nix))); # Script Builder script = file: diff --git a/lib/map.nix b/lib/map.nix @@ -29,16 +29,15 @@ lib: let ; # Import Checks - checkName = name: type: type != null && !(hasPrefix "_" name); - checkAttr = name: let - file = import name; - in - typeOf file == "set" || typeOf file == "lambda"; + checkName = name: _: !(hasPrefix "_" name); + checkAttr = name: let type = typeOf (import name); in type == "set" || type == "lambda"; in rec { ## Mapping Functions ## array = list: func: forEach list (name: getAttrFromPath [name] func); - filter = name: func: attrs: filterAttrs name (mapAttrs' func attrs); list = func: foldl' (x: y: x + y + " ") "" (attrNames func); + filter = name: func: attrs: + filterAttrs (_: type: type != null) + (mapAttrs' func (filterAttrs name attrs)); ## Files Map files = { diff --git a/modules/README.md b/modules/README.md @@ -99,4 +99,5 @@ Configuration [Builder](./configuration.nix) - [`shell`](./shell): Module that contains User Shell Environment Configuration - - `utilities`: Enable Additional Shell Utilities - `true / false` + - `prompt`: Enable Fancy Shell Prompt - `true / false` - `support`: List of Additional Supported Shells - Ex. `[ "bash" ]` diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix @@ -3,7 +3,6 @@ lib, util, pkgs, - files, ... }: let enable = builtins.elem "firefox" config.apps.list; @@ -19,7 +18,7 @@ in { persist.directories = [".cache/mozilla/firefox" ".mozilla/firefox"]; homeConfig = { # File Associations - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { browser = ["firefox.desktop"]; }; diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -105,7 +105,7 @@ in { homeConfig = { # File Associations xdg.mimeApps.defaultApplications = - util.build.mime files.xdg.mime {office = ["onlyoffice-desktopeditors.desktop"];}; + util.build.mime {office = ["onlyoffice-desktopeditors.desktop"];}; home.file = { # Document Templates diff --git a/modules/apps/vscode.nix b/modules/apps/vscode.nix @@ -26,7 +26,7 @@ in { ]; # Environment - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { markdown = ["code.desktop"]; text = ["code.desktop"]; }; diff --git a/modules/gui/desktop/gnome/default.nix b/modules/gui/desktop/gnome/default.nix @@ -126,7 +126,7 @@ in { }; # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { archive = ["org.gnome.FileRoller.desktop"]; audio = ["org.gnome.Lollypop.desktop"]; calendar = ["org.gnome.Calendar.desktop"]; diff --git a/modules/gui/desktop/hyprland/apps/files.nix b/modules/gui/desktop/hyprland/apps/files.nix @@ -30,7 +30,7 @@ in { ]; homeConfig = { - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { archive = ["org.gnome.FileRoller.desktop"]; directory = ["nemo.desktop"]; }; diff --git a/modules/gui/desktop/hyprland/apps/media.nix b/modules/gui/desktop/hyprland/apps/media.nix @@ -1,7 +1,6 @@ { util, pkgs, - files, ... }: { ## Media Configuration @@ -26,7 +25,7 @@ homeConfig = { # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { audio = ["org.gnome.Lollypop.desktop"]; document = ["org.gnome.Papers.desktop"]; image = ["org.gnome.Shotwell-Viewer.desktop"]; diff --git a/modules/gui/desktop/hyprland/apps/terminal.nix b/modules/gui/desktop/hyprland/apps/terminal.nix @@ -21,6 +21,7 @@ copy_on_select = "clipboard"; scrollback_lines = 10000; + confirm_os_window_close = 2; enable_audio_bell = "no"; visual_bell_duration = "0.1"; }; diff --git a/modules/gui/desktop/hyprland/apps/text.nix b/modules/gui/desktop/hyprland/apps/text.nix @@ -16,7 +16,7 @@ homeConfig = { # Text Editor - xdg.mimeApps.defaultApplications = util.build.mime files.xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { markdown = ["geany.desktop"]; text = ["geany.desktop"]; }; diff --git a/modules/gui/desktop/pantheon.nix b/modules/gui/desktop/pantheon.nix @@ -96,7 +96,7 @@ in { stylix.targets.gnome.enable = false; # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { audio = ["io.elementary.files.desktop"]; calendar = ["io.elementary.calendar.desktop"]; directory = ["io.elementary.files.desktop"]; diff --git a/modules/gui/desktop/xfce/default.nix b/modules/gui/desktop/xfce/default.nix @@ -151,7 +151,7 @@ in { gtk = {gtk3.extraCss = xfce.css;}; # Default Applications - xdg.mimeApps.defaultApplications = util.build.mime xdg.mime { + xdg.mimeApps.defaultApplications = util.build.mime { archive = ["org.gnome.FileRoller.desktop"]; audio = ["org.xfce.Parole.desktop"]; calendar = ["org.xfce.orage.desktop"]; diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix @@ -47,7 +47,7 @@ in { homeConfig = { # Bookmarks home.file.".config/gtk-3.0/bookmarks" = { - text = files.gtk.bookmarks; + text = files.bookmarks; force = true; }; diff --git a/modules/gui/xorg.nix b/modules/gui/xorg.nix @@ -1,8 +1,4 @@ -{ - lib, - files, - ... -}: let +{lib, ...}: let inherit (lib) mkDefault mkForce mkOption types; in { options.gui.xorg.enable = mkOption { @@ -13,7 +9,6 @@ in { ## X11 Server Configuration ## config = { - user.homeConfig.xresources.extraConfig = files.xorg; services.xserver = { enable = true; autorun = true; @@ -22,6 +17,15 @@ in { videoDrivers = mkDefault ["modesetting"]; }; + user.homeConfig.xresources.extraConfig = '' + Xft.antialias: 1 + Xft.autohint: 0 + Xft.hinting: 1 + Xft.hintstyle: hintslight + Xft.lcdfilter: lcddefault + Xft.rgba: rgb + ''; + # System Specialisation specialisation.xorg.configuration = { system.nixos.label = "special.xorg"; diff --git a/modules/shell/bash.nix b/modules/shell/bash.nix @@ -4,9 +4,8 @@ pkgs, ... }: let - inherit (builtins) any attrValues elem mapAttrs; - inherit (config.user) settings; - enable = any (value: elem "bash" value.shells) (attrValues settings); + inherit (builtins) any attrValues elem; + enable = any (value: elem "bash" value.shells) (attrValues config.user.settings); in { ## Bourne Shell Configuration ## config = lib.mkIf enable { @@ -17,46 +16,26 @@ in { directories = [".local/share/bash"]; }; - # Settings - home-manager.users = mapAttrs (_: value: - lib.mkIf (elem "bash" value.shells) { - programs.bash = { - enable = true; - enableVteIntegration = true; + programs.bash = { + vteIntegration = true; + promptInit = '' + # Options + shopt -s autocd + shopt -s cdspell + shopt -s checkjobs + shopt -s checkwinsize + shopt -s cmdhist + shopt -s extglob + shopt -s globstar + shopt -s histappend + shopt -s no_empty_cmd_completion - # Options - shellOptions = [ - "autocd" - "cdspell" - "checkjobs" - "cmdhist" - "histappend" - "checkwinsize" - "extglob" - "globstar" - "no_empty_cmd_completion" - ]; - - # Prompt - initExtra = '' - function _update_ps1() { - local old_exit_status=$? - eval $(${lib.getExe pkgs.powerline-go} -error $old_exit_status -shell bash -eval -modules "host,cwd,exit,jobs,git" -newline) - return $old_exit_status - } - - if [ "$TERM" != "linux" ] - then - PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" - fi - ''; - - # Command History - historySize = 100000; - historyIgnore = ["rm" "killall"]; - historyControl = ["erasedups" "ignoredups" "ignorespace"]; - }; - }) - settings; + # Command History + HISTCONTROL=erasedups:ignoredups:ignorespace + HISTFILESIZE=100000 + HISTIGNORE=rm:killall + HISTSIZE=100000 + ''; + }; }; } diff --git a/modules/shell/default.nix b/modules/shell/default.nix @@ -10,6 +10,7 @@ with files; let inherit (util.map) modules; inherit (builtins) listToAttrs map; inherit (lib) getExe' mkEnableOption mkBefore mkIf mkMerge nameValuePair; + shells = lib.remove "prompt" (modules.name ./.); in { ## SHELL Configuration ## imports = modules.list ./.; @@ -32,7 +33,6 @@ in { # Utilities systemPackages = with pkgs; [ bat - browsh btop eza fastfetch @@ -46,19 +46,55 @@ in { # Fetch etc."fastfetch/config.jsonc".text = fetch; + + # Command Aliases + shellAliases = { + hi = "echo 'Hi there. How are you?'"; + bye = "exit"; + dotfiles = "cd ${path.system}"; + + # Programs + c = "bat"; + l = "eza -b -h -l -F --octal-permissions --time-style iso"; + grep = "grep --color"; + colors = "${scripts.colors}"; + sike = "fastfetch"; + }; }; ## Program Configuration services.lorri.enable = true; # Faster 'nix shell' - programs = { - command-not-found.enable = true; # Command Not Found Search + programs = + listToAttrs (map (shell: + nameValuePair shell + {promptInit = mkBefore ''eval $(${getExe' pkgs.thefuck "thefuck"} --alias "fix")'';}) + shells) + // { + command-not-found.enable = true; # Command Not Found Search + yazi.enable = true; # File Browser + + # Command Correction Helper + thefuck = { + enable = true; + alias = "fix"; # Use 'fix' to correct previous command + }; - # Command Correction Helper - thefuck = { - enable = true; - alias = "fix"; # Use 'fix' to correct previous command + # DirENV Support + direnv = { + enable = true; # Load Shell Variables from '.envrc' + nix-direnv.enable = true; + }; + + # Bat Configuration + bat = { + enable = true; + settings = { + style = "full"; + italic-text = "always"; + map-syntax = [".ignore:Git Ignore"]; + }; + }; }; - }; user = { persist = { @@ -70,79 +106,42 @@ in { }; homeConfig = { - programs = - listToAttrs (map (shell: - nameValuePair shell - {initExtra = mkBefore ''eval $(${getExe' pkgs.thefuck "thefuck"} --alias "fix")'';}) - (modules.name ./.)) - // { - btop.enable = true; # Resource Monitor - hstr.enable = true; # Command History Browser - yazi.enable = true; # File Browser - - # DirENV Support - direnv = { - enable = true; # Load Shell Variables from '.envrc' - nix-direnv.enable = true; - }; - - # Bat Configuration - bat = { - enable = true; - config = { - style = "full"; - italic-text = "always"; - map-syntax = [".ignore:Git Ignore"]; - }; - }; + programs = { + btop.enable = true; # Resource Monitor + hstr.enable = true; # Command History Browser - # Eza Configuration - eza = { - enable = true; - colors = "auto"; - icons = "auto"; - git = true; - extraOptions = ["--group-directories-first"]; - }; + # Eza Configuration + eza = { + enable = true; + colors = "auto"; + icons = "auto"; + git = true; + extraOptions = ["--group-directories-first"]; + }; - # Micro Configuration - micro = { - enable = true; - settings = { - autoindent = true; - backup = true; - clipboard = "external"; - cursorline = true; - eofnewline = false; - helpsplit = "vsplit"; - hltrailingws = true; - infobar = true; - matchbrace = true; - keymenu = true; - mouse = true; - reload = "prompt"; - ruler = true; - saveundo = true; - smartpaste = true; - statusline = true; - syntax = true; - }; + # Micro Configuration + micro = { + enable = true; + settings = { + autoindent = true; + backup = true; + clipboard = "external"; + cursorline = true; + eofnewline = false; + helpsplit = "vsplit"; + hltrailingws = true; + infobar = true; + matchbrace = true; + keymenu = true; + mouse = true; + reload = "prompt"; + ruler = true; + saveundo = true; + smartpaste = true; + statusline = true; + syntax = true; }; }; - - # Command Aliases - home.shellAliases = { - hi = "echo 'Hi there. How are you?'"; - bye = "exit"; - dotfiles = "cd ${path.system}"; - - # Programs - c = "bat"; - l = "eza -b -h -l -F --octal-permissions --time-style iso"; - grep = "grep --color"; - colors = "${scripts.colors}"; - edit = "sudo $EDITOR"; - sike = "fastfetch"; }; }; }; diff --git a/modules/shell/prompt.nix b/modules/shell/prompt.nix @@ -0,0 +1,184 @@ +{ + config, + lib, + ... +}: { + ## Shell Prompt Configuration ## + options.shell.prompt = lib.mkEnableOption "Enable Fancy Shell Prompt"; + + config = lib.mkIf config.shell.prompt { + programs.starship = { + enable = true; + settings = { + add_newline = true; + continuation_prompt = "⮞⮞ "; + format = "[╭](fg:base04)$os$directory$git_branch$git_status$fill$c$python$java$nodejs$dotnet$status$cmd_duration$shell$time$username$hostname$line_break$character"; + + os = { + disabled = false; + format = "(fg:base04)[](fg:white)[$symbol](fg:base01 bg:white)[](fg:white)"; + symbols = { + Android = ""; + Arch = ""; + Fedora = ""; + Linux = ""; + Macos = ""; + NixOS = ""; + Ubuntu = ""; + Windows = ""; + Unknown = ""; + }; + }; + + directory = { + disabled = false; + format = "[─](fg:base04)[](fg:blue)[](fg:base01 bg:blue)[](fg:blue bg:base04)[ $read_only$truncation_symbol$path](fg:white bg:base04)[](fg:base04)"; + home_symbol = "~"; + truncation_symbol = "…/"; + truncation_length = 4; + truncate_to_repo = false; + read_only = ""; + }; + + git_branch = { + disabled = false; + format = "[─](fg:base04)[](fg:green)[$symbol](fg:base01 bg:green)[](fg:green bg:base04)[ $branch](fg:white bg:base04)"; + symbol = ""; + }; + + git_status = { + disabled = false; + format = "[$ahead_behind$all_status](fg:green bg:base04)[](fg:base04)"; + ahead = " ⇡$count"; + behind = " ⇣$count"; + diverged = " ⇡$ahead_count ⇣$behind_count"; + conflicted = " =$count"; + deleted = " ×$count"; + modified = " !$count"; + renamed = " »$count"; + staged = " +$count"; + stashed = " *$count"; + untracked = " ?$count"; + up_to_date = ""; + }; + + c = { + format = "[─](fg:base04)[](fg:blue)[$symbol](fg:base01 bg:blue)[](fg:blue bg:base04)[ $version](fg:white bg:base04)[](fg:base04)"; + symbol = " C"; + }; + + python = { + format = "[─](fg:base04)[](fg:green)[$symbol](fg:base01 bg:green)[](fg:green bg:base04)[ $version](fg:white bg:base04)[](fg:base04)"; + symbol = " Python"; + }; + + java = { + format = "[─](fg:base04)[](fg:red)[$symbol](fg:base01 bg:red)[](fg:red bg:base04)[ $version](fg:white bg:base04)[](fg:base04)"; + symbol = " Java"; + }; + + nodejs = { + format = "[─](fg:base04)[](fg:green)[$symbol](fg:base01 bg:green)[](fg:green bg:base04)[ $version](fg:white bg:base04)[](fg:base04)"; + symbol = " Node.js"; + }; + + dotnet = { + format = "[─](fg:base04)[](fg:purple)[$symbol](fg:base01 bg:purple)[](fg:purple bg:base04)[ $tfm](fg:white bg:base04)[](fg:base04)"; + symbol = " .NET"; + }; + + fill = { + symbol = "─"; + style = "fg:base04"; + }; + + status = { + disabled = false; + format = "[─](fg:base04)[](fg:red)[](fg:base01 bg:red)[](fg:red bg:base04)[ $status](fg:white bg:base04)[](fg:base04)"; + }; + + cmd_duration = { + min_time = 500; + format = "[─](fg:base04)[](fg:orange)[](fg:base01 bg:orange)[](fg:orange bg:base04)[ $duration](fg:white bg:base04)[](fg:base04)"; + }; + + shell = { + disabled = false; + format = "[─](fg:base04)[](fg:purple)[](fg:base01 bg:purple)[](fg:purple bg:base04)[ $indicator](fg:white bg:base04)[](fg:base04)"; + bash_indicator = "bash"; + fish_indicator = "fish"; + zsh_indicator = "zsh"; + unknown_indicator = "shell"; + }; + + time = { + disabled = false; + format = "[─](fg:base04)[](fg:yellow)[](fg:base01 bg:yellow)[](fg:yellow bg:base04)[ $time](fg:white bg:base04)[](fg:base04)"; + time_format = "%H:%M"; + }; + + username = { + format = "[─](fg:base04)[](fg:bright-blue)[](fg:base01 bg:bright-blue)[](fg:bright-blue bg:base04)[ $user]($style bg:base04)[](fg:base04)"; + show_always = true; + style_user = "fg:white"; + style_root = "bold fg:red"; + }; + + hostname = { + disabled = false; + format = "[─](fg:base04)[](fg:cyan)[](fg:base01 bg:cyan)[](fg:cyan bg:base04)[ $hostname](fg:white bg:base04)[](fg:base04)"; + ssh_only = false; + }; + + character = { + format = "[╰─$symbol](fg:base04) "; + success_symbol = "[⮞](fg:bold white)"; + error_symbol = "[⮞](fg:bold red)"; + }; + + palette = "base16"; + palettes.base16 = with config.lib.stylix.colors.withHashtag; { + black = base00; + bright-black = base03; + white = base05; + bright-white = base07; + bright-yellow = yellow; + purple = magenta; + bright-purple = bright-magenta; + inherit + blue + brown + cyan + green + magenta + orange + red + yellow + bright-blue + bright-cyan + bright-green + bright-magenta + bright-orange + bright-red + base00 + base01 + base02 + base03 + base04 + base05 + base06 + base07 + base08 + base09 + base0A + base0B + base0C + base0D + base0E + base0F + ; + }; + }; + }; + }; +} diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix @@ -2,89 +2,55 @@ config, lib, pkgs, - files, ... -}: -with files; let - inherit (builtins) any attrValues elem mapAttrs; - inherit (config.user) settings; - enable = any (value: elem "zsh" value.shells) (attrValues settings); +}: let + inherit (builtins) any attrValues elem; + enable = any (value: elem "zsh" value.shells) (attrValues config.user.settings); in { ## Z Shell Configuration ## config = lib.mkIf enable { # Shell Environment programs.zsh = { enable = true; + + # Features + autosuggestions.enable = true; enableCompletion = false; + syntaxHighlighting.enable = true; + vteIntegration = true; + setOptions = [ + "autocd" + "EXTENDED_HISTORY" + "HIST_EXPIRE_DUPS_FIRST" + ]; + + # Keybindings + promptInit = '' + bindkey '^[[1;5C' forward-word + bindkey '^[[1;5D' backward-word + bindkey '^[[3;5~' kill-word + bindkey '^[[3~' delete-char + bindkey "^[[5~" beginning-of-history + bindkey "^[[6~" end-of-history + bindkey '^[[A' up-line-or-search + bindkey '^[[B' down-line-or-search + bindkey '^[[C' forward-char + bindkey '^[[D' backward-char + bindkey '^[[F' end-of-linegestures + bindkey '^[[H' beginning-of-line + bindkey '^J' backward-kill-line + ''; + + # Plugins + interactiveShellInit = '' + source ${pkgs.zsh-autopair}/share/zsh/zsh-autopair/autopair.zsh + ''; }; + system.userActivationScripts.zshrc = "touch .zshrc"; user.persist = { files = [".zsh_history"]; directories = [".cache/zsh"]; }; - - # Settings - home-manager.users = mapAttrs (_: value: - lib.mkIf (elem "zsh" value.shells) { - programs.zsh = { - enable = true; - - # Features - autocd = true; - autosuggestion.enable = true; - enableCompletion = true; - enableVteIntegration = true; - syntaxHighlighting.enable = true; - - # Initialization - initExtraBeforeCompInit = "source ~/.p10k.zsh"; - - # Keybindings - initExtra = '' - bindkey '^[[1;5C' forward-word - bindkey '^[[1;5D' backward-word - bindkey '^[[3;5~' kill-word - bindkey '^[[3~' delete-char - bindkey "^[[5~" beginning-of-history - bindkey "^[[6~" end-of-history - bindkey '^[[A' up-line-or-search - bindkey '^[[B' down-line-or-search - bindkey '^[[C' forward-char - bindkey '^[[D' backward-char - bindkey '^[[F' end-of-line - bindkey '^[[H' beginning-of-line - bindkey '^J' backward-kill-line - ''; - - # Command History - history = { - extended = true; - ignoreDups = true; - expireDuplicatesFirst = true; - ignorePatterns = ["rm *" "killall *"]; - }; - - # Additional Plugins - plugins = [ - { - name = "powerlevel10k"; - src = pkgs.zsh-powerlevel10k; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - } - { - name = "zsh-autopair"; - src = pkgs.zsh-autopair; - file = "share/zsh/zsh-autopair/autopair.zsh"; - } - ]; - }; - - # Utilities - home.packages = with pkgs; [fzf fzf-zsh]; - - # Prompt - home.file.".p10k.zsh".text = zsh.prompt; - }) - settings; }; } diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -205,7 +205,7 @@ in error "Expected a Build Command" else echo "Executing Command '" "''${@:2}" "'..." - cachix authtoken "$(find ${path.system} -name cachix-token.secret -exec sops --config ${sops} -d {} \+)" + cachix authtoken "$(find ${path.system} -name cachix-token.secret -exec sops --config ${path.sops} -d {} \+)" cachix watch-exec ${path.cache} "''${@:2}" fi ;; @@ -388,7 +388,7 @@ in "") error "Expected 'name' of Secret";; *) echo "Creating Secret '$3'..." - sops --config ${sops} -i ${path.system}/"$3".secret + sops --config ${path.sops} -i ${path.system}/"$3".secret ;; esac ;; @@ -399,7 +399,7 @@ in if find ${path.system} -name "$3".secret | grep "secret" &> /dev/null then echo "Editing Secret '$3'..." - find ${path.system} -name "$3".secret -exec sops --config ${sops} -i {} \+ + find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -i {} \+ else error "Unknown Secret '$3'" fi @@ -408,20 +408,20 @@ in ;; "list") echo "## Secrets in ${path.system} ##" - grep / ${sops} | sed -e 's|- path_regex:||' -e 's/\/\.\*\$//' -e 's| |${path.system}/|' | xargs tree -C --noreport -P '*.secret' -I '_*' | sed 's/\.secret//' + grep / ${path.sops} | sed -e 's|- path_regex:||' -e 's/\/\.\*\$//' -e 's| |${path.system}/|' | xargs tree -C --noreport -P '*.secret' -I '_*' | sed 's/\.secret//' ;; "show") if find ${path.system} -name "$3".secret | grep "secret" &> /dev/null then echo "Showing Secret '$3'..." - find ${path.system} -name "$3".secret -exec sops --config ${sops} -d {} \+ + find ${path.system} -name "$3".secret -exec sops --config ${path.sops} -d {} \+ else error "Unknown Secret '$3'" fi ;; "update") echo "Updating Secrets..." - find ${path.system} -name '*.secret' ! -name '_*' -exec sops --config ${sops} updatekeys {} \; + find ${path.system} -name '*.secret' ! -name '_*' -exec sops --config ${path.sops} updatekeys {} \; ;; *) error "Unknown Option '$2'" "${usage.secret}";; esac @@ -452,7 +452,7 @@ in cp -r "$KEY"/. ./keys fi echo "Importing Keys..." - find ./keys -name '*.gpg' -exec sudo gpg --homedir ${files.gpg} --import {} \+ + find ./keys -name '*.gpg' -exec sudo gpg --homedir ${path.gpg} --import {} \+ rm -rf ./keys newline diff --git a/secrets/default.nix b/secrets/default.nix @@ -5,19 +5,21 @@ pkgs, files, ... -}: { +}: let + path = files.path.gpg; +in { imports = [inputs.sops.nixosModules.sops]; ## Authentication Credentials Management ## config = { environment = { - persist.directories = [files.gpg]; + persist.directories = [path]; systemPackages = [pkgs.sops]; }; sops = { # GPG Key Import - gnupg.home = files.gpg; + gnupg.home = path; # Encrypted Secrets secrets = let