├── .gitignore ├── .gitmodules ├── LICENSE.md ├── NOTES.md ├── README.md ├── common ├── aliases │ └── main.sh ├── assets │ └── fonts │ │ ├── Meslo LG M DZ Regular for Powerline.otf │ │ ├── MesloLGS NF Bold Italic.ttf │ │ ├── MesloLGS NF Bold.ttf │ │ ├── MesloLGS NF Italic.ttf │ │ └── MesloLGS NF Regular.ttf ├── bin │ ├── diff-so-fancy │ ├── latexnew │ ├── lib │ │ └── DiffHighlight.pm │ └── mk-url-file ├── git │ ├── .gitconfig │ └── .gitignore_global ├── npm │ ├── .npmrc │ └── install-global-npm.sh ├── templates │ └── latex │ │ ├── document.tex │ │ └── img │ │ ├── block_diagram.png │ │ └── circuit.png ├── tmux │ └── .tmux.conf.local ├── vim │ └── .vimrc └── zsh │ ├── .zshenv │ ├── .zshrc │ ├── oh-my-zsh-custom │ ├── plugins │ │ ├── git-open │ │ ├── nix-shell │ │ └── zsh-syntax-highlighting │ └── themes │ │ ├── bullet-train.zsh-theme │ │ └── powerlevel10k.zsh-theme │ └── p10k.zsh ├── dotfile_configure.sh ├── linux ├── aliases │ └── main.sh ├── bin │ ├── gui │ └── toggle-zeal ├── dnf │ └── global_packages.txt ├── etc │ ├── acpi │ │ ├── actions │ │ │ └── laptop-lid.sh │ │ └── events │ │ │ └── laptop-lid │ ├── dnf │ │ └── dnf.conf │ ├── sudoers.d │ │ └── bogdan-sudo-rules │ └── systemd │ │ └── system │ │ └── laptop-lid.service ├── gnome │ └── extensions │ │ └── app-toggler@bogdanvitoc.com │ │ ├── README.md │ │ ├── extension.js │ │ ├── keybinder.js │ │ ├── logging.js │ │ ├── metadata.json │ │ ├── schemas │ │ ├── gschemas.compiled │ │ └── org.gnome.shell.extensions.app-toggler.gschema.xml │ │ └── stylesheet.css ├── gtile │ └── gtile.conf ├── proton │ └── aoe2de_mpfix ├── vdirsyncer │ └── config └── zsh │ ├── .zshenv_linux │ └── .zshrc_linux ├── macos ├── .macos ├── aliases │ └── main.sh ├── bin │ ├── itbadge │ ├── pdf2jpg │ ├── pkg-diff │ ├── sssh │ ├── vag │ └── vsz ├── divvy │ └── divvy-shortcuts.txt ├── homebrew │ └── .Brewfile ├── iterm │ └── iterm_color_profile.itermcolors └── zsh │ ├── .zshenv_macos │ └── .zshrc_macos └── osid.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "oh-my-zsh"] 2 | path = external/oh-my-zsh 3 | url = git@github.com:robbyrussell/oh-my-zsh.git 4 | [submodule "bullet-train-oh-my-zsh-theme"] 5 | path = external/bullet-train-oh-my-zsh-theme 6 | url = https://github.com/caiogondim/bullet-train-oh-my-zsh-theme.git 7 | [submodule "git-open"] 8 | path = external/git-open 9 | url = git@github.com:paulirish/git-open.git 10 | [submodule "zsh-syntax-highlighting"] 11 | path = external/zsh-syntax-highlighting 12 | url = git@github.com:zsh-users/zsh-syntax-highlighting.git 13 | [submodule "amix_vimrc"] 14 | path = external/amix_vimrc 15 | url = git@github.com:amix/vimrc.git 16 | [submodule "gpakosz_tmux"] 17 | path = external/gpakosz_tmux 18 | url = git@github.com:gpakosz/.tmux.git 19 | [submodule "ModSimPy"] 20 | path = external/ModSimPy 21 | url = git@github.com:AllenDowney/ModSimPy.git 22 | [submodule "z_jump-around"] 23 | path = external/z_jump-around 24 | url = git@github.com:rupa/z.git 25 | [submodule "external/diff-so-fancy"] 26 | path = external/diff-so-fancy 27 | url = git@github.com:so-fancy/diff-so-fancy.git 28 | [submodule "external/gimp-config"] 29 | path = external/gimp-config 30 | url = git@github.com:Bogidon/gimp-config.git 31 | [submodule "external/ardba_proton_aoe2de_mpfix"] 32 | path = external/ardba_proton_aoe2de_mpfix 33 | url = https://github.com/ardba/proton_aoe2de_mpfix 34 | [submodule "external/nix-shell"] 35 | path = external/nix-shell 36 | url = https://github.com/chisui/zsh-nix-shell.git 37 | [submodule "external/powerlevel10k-zsh-theme"] 38 | path = external/powerlevel10k-zsh-theme 39 | url = https://github.com/romkatv/powerlevel10k.git 40 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /NOTES.md: -------------------------------------------------------------------------------- 1 | File for collecting notes on various fragments of system configuration that either can't be made deterministic or I haven't yet spent the time to try. 2 | 3 | # Linux 4 | 5 | ## Sublime 6 | - Better to install via native package managers than flathub due to better updates. https://www.sublimetext.com/docs/linux_repositories.html#yum 7 | - Preference sync: location for user preferences is `~/.config/sublime-text/` 8 | - If installing via flathub: 9 | - Sync: user preferences in `~/.var/app/com.sublimetext.three/config/sublime-text-3/Packages` (on Fedora35 Sublime3) 10 | - binary must be symlinked for `subl` command `ln -s /var/lib/flatpak/exports/bin/com.sublimetext.three /usr/local/bin/subl`. From: https://github.com/flathub/com.sublimetext.three/issues/24 11 | 12 | ## Tweaking the desktop 13 | - Gnome extensions: very useful. I should figure out how to save ones I am using to dotfiles. 14 | - Gnome Tweak Tool 15 | 16 | ## Window Management 17 | - gTile is like Divvy but better. 18 | - how to export settings: https://github.com/gTile/gTile/issues/121 19 | 20 | ## Special Character input 21 | Ibus installed by default: https://wiki.archlinux.org/title/IBus#Emoji_input 22 | 23 | ## Images 24 | - image viewer: 25 | - gThumbnail (chosen) - more capable image viewer than the built in one 26 | - alternatives: XnView, Shotwell, Darktable (full photo organization) 27 | 28 | 29 | # Framework Laptop 30 | 31 | ## Acceleration 32 | - https://community.frame.work/t/linux-battery-life-tuning 33 | ``` 34 | GPU rendering with Firefox and Chrome (WIP) 35 | Install igt-gpu-tools 36 | Ensure that intel_gpu_top is showing GPU usage when watching video on browser. 37 | Firefox 92 → about:config → layers.acceleration.force-enabled 38 | ``` 39 | 40 | 41 | ## Power 42 | - Getting deep sleep working: https://community.frame.work/t/fedora-34-on-the-framework-laptop/2723/49?u=bogdan_vitoc 43 | - but keeping my luks uuid for disk encryption 44 | - Installed TLP 45 | - SSD suspend battery life: `sudo grubby --update-kernel=ALL --args="nvme.noacpi=1"` 46 | 47 | ## Bluetooth Issues 48 | Disabling autosuspend of bluetooth devices: 49 | sudo grubby --update-kernel /boot/vmlinuz-5.15.6-200.fc35.x86_64 --args="btusb.enable_autosuspend=0" 50 | from: https://bugzilla.redhat.com/show_bug.cgi?id=1589548 51 | how to add kernel command line args: https://fedoramagazine.org/setting-kernel-command-line-arguments-with-fedora-30/ 52 | 53 | problems with bluetooth adapter after "warm boot" (i.e. restart): https://bugzilla.kernel.org/show_bug.cgi?id=213829#c26 54 | supposedly fixed in kernel 5.15.6-ish 55 | 56 | This was fixed by updating to 5.16.11 (though I also disabled autosuspend and didn't test independently so could have been that). 57 | 58 | ## Displays 59 | Had an issue with my Dell U2421E monitor being locked to 30hz when used over USB-C-to-C w/ PD. Swapped for HDMI-HDMI, no issue. Displayport-to-USB-C, no issue. Back to USB-C-to-C, now no issue! Works with 60fps. 60 | 61 | Issue with U2421E blackscreening. 62 | https://bugzilla.kernel.org/show_bug.cgi?id=211807 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | These are my dotfiles. They work on macOS and Ubuntu. Steal what you like, leave what you don't, make your own! 2 | 3 | ### To use: 4 | - `git clone --recurse` this repo to `~/.dotfiles` 5 | - run `dotfile_configure.sh` 6 | - restart your terminal 7 | - Pretty colors! Many goodies! 8 | 9 | ### Additional Info 10 | - Current Homebrew packages can be saved every now and then with `brew bundle dump --global --force` 11 | - You can create a per-machine configs with the following files: 12 | - `~/.zshrc_local` 13 | - `~/.zshenv_local` 14 | - `~/.gitconfig_local` 15 | - I use Dropbox to sync preferences of Alfred, iTerm, Dash, etc 16 | 17 |
18 | Screenshot: 19 | 20 | screenshot of terminal with powerline 21 |
22 | -------------------------------------------------------------------------------- /common/aliases/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | alias reload='source ~/.zshenv && source ~/.zshrc' 3 | alias dotedit="subl $DOTFILES" 4 | alias sm='smerge' 5 | 6 | # git 7 | alias gxb='git xbranch' 8 | alias gbn='git rev-parse --abbrev-ref HEAD' # print branch name 9 | alias gdn='git diff --name-status' # print files changed between commits 10 | alias gpoh='git push -u origin head' # push current head to origin 11 | 12 | # Tmux 13 | alias tas="tmux attach-session" 14 | 15 | # Filesystem 16 | 17 | ## `ls -l` + chmod code for each item https://stackoverflow.com/a/1796009/1888489 18 | alias lschmod="ls -l | awk '{k=0;for(i=0;i<=8;i++)k+=((substr(\$1,i+2,1)~/[rwx]/)*2^(8-i));if(k)printf(\"%0o \",k);print}'" -------------------------------------------------------------------------------- /common/assets/fonts/Meslo LG M DZ Regular for Powerline.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/assets/fonts/Meslo LG M DZ Regular for Powerline.otf -------------------------------------------------------------------------------- /common/assets/fonts/MesloLGS NF Bold Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/assets/fonts/MesloLGS NF Bold Italic.ttf -------------------------------------------------------------------------------- /common/assets/fonts/MesloLGS NF Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/assets/fonts/MesloLGS NF Bold.ttf -------------------------------------------------------------------------------- /common/assets/fonts/MesloLGS NF Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/assets/fonts/MesloLGS NF Italic.ttf -------------------------------------------------------------------------------- /common/assets/fonts/MesloLGS NF Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/assets/fonts/MesloLGS NF Regular.ttf -------------------------------------------------------------------------------- /common/bin/diff-so-fancy: -------------------------------------------------------------------------------- 1 | ../../external/diff-so-fancy/diff-so-fancy -------------------------------------------------------------------------------- /common/bin/latexnew: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # New LaTex project 3 | 4 | DIRECTORY='' 5 | 6 | while getopts 'ho:' flag; do 7 | case "${flag}" in 8 | o) DIRECTORY="${OPTARG}" ;; 9 | h) echo " 10 | latexnew: creates base directory for optimal LaTeXing. 11 | 12 | -o: specify output directory. If not specified, creates directory in /tmp. 13 | -h: displays this help message. 14 | " ;; 15 | *) error "Unexpected option ${flag}" ;; 16 | esac 17 | done 18 | 19 | if [[ -z "$DIRECTORY" ]] ; then # if DIRECTORY is not set, create tmp 20 | DIRECTORY=$(mktemp -d /tmp/latextmp.XXXXXXXXXX) 21 | fi 22 | 23 | cp -R "$DOTFILES/common/templates/latex/" "$DIRECTORY" 24 | echo "Created base latex directory: $DIRECTORY" 25 | 26 | # Offer to open Sublime 27 | echo -n "Open in Sublime (y/n)? " 28 | old_stty_cfg=$(stty -g) 29 | stty raw -echo ; answer=$(head -c 1) ; stty $old_stty_cfg 30 | if echo "$answer" | grep -iq "^y" ;then 31 | subl "$DIRECTORY"; 32 | fi -------------------------------------------------------------------------------- /common/bin/lib/DiffHighlight.pm: -------------------------------------------------------------------------------- 1 | ../../../external/diff-so-fancy/lib/DiffHighlight.pm -------------------------------------------------------------------------------- /common/bin/mk-url-file: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo " 3 | 4 | 5 | Automatic redirect to $1 6 | 7 | 8 | 9 |

Redirecting to $1

10 | 11 | " > "$2" 12 | -------------------------------------------------------------------------------- /common/git/.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = Bogdan Vitoc 3 | email = bog@bogdanvitoc.com 4 | signingkey = BDF750412486DE3B 5 | 6 | [core] 7 | excludesfile = ~/.gitignore_global 8 | pager = diff-so-fancy | less --tabs=4 -RFX 9 | # you might want to do this locally: 10 | # editor = "'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' --wait" 11 | 12 | [commit] 13 | gpgsign = true 14 | 15 | [alias] 16 | # ignore/unignore changes to files 17 | hide = update-index --skip-worktree 18 | unhide = update-index --no-skip-worktree 19 | unhide-all = ! git hidden | xargs git update-index --no-skip-worktree 20 | hidden = ! git ls-files -v | grep '^S' | cut -c3- | sed 's/^/\"/' | sed 's/$/\"/' 21 | # interactive rebase up to the point at which your current head branched from 22 | tofork = "!f() { git rebase -i $(git merge-base --fork-point \"$1\"); }; f" 23 | 24 | # delete all but branches specified 25 | # argument of form: "branch1|branch2|branch3" 26 | delallbut = "!f() { git branch | egrep -v \"(\\b(master|dev|$1)\\b)\" | rev | cut -c 4- | rev | xargs -L 1 git branch -D; }; f" 27 | 28 | # delete all merged branches but those specified 29 | # argument of form: "branch1|branch2|branch3" 30 | delmergedbut = "!f() { git branch --no-color --merged | egrep -v \"(\\b(master|dev|$1)\\b)\" | xargs git branch -d; }; f" 31 | 32 | # pretty log 33 | lgm = log --graph --all --pretty=medium --decorate=short 34 | 35 | # ex-branch (get last Nth branch by last commit date) 36 | xbranch = "!f() { git branch --sort=-committerdate --format='%(refname:short)' | sed -n "${1:-1}p"; }; f" 37 | 38 | [color] 39 | ui = always 40 | 41 | [color "diff"] 42 | meta = yellow bold 43 | commit = green bold 44 | frag = magenta bold 45 | old = red bold 46 | new = green bold 47 | whitespace = red reverse 48 | 49 | [color "diff-highlight"] 50 | oldNormal = red bold 51 | oldHighlight = "red bold 52" 52 | newNormal = "green bold" 53 | newHighlight = "green bold 22" 54 | 55 | [advice] 56 | detachedHead = false 57 | 58 | 59 | [include] 60 | path = ~/.gitconfig_local 61 | 62 | [url "git@github.com:"] 63 | insteadOf = https://github.com/ 64 | 65 | [init] 66 | defaultBranch = main 67 | 68 | [pull] 69 | ff = only 70 | 71 | [push] 72 | default = upstream 73 | autoSetupRemote = true 74 | -------------------------------------------------------------------------------- /common/git/.gitignore_global: -------------------------------------------------------------------------------- 1 | *.sublime-project 2 | *.sublime-workspace 3 | bogscratch -------------------------------------------------------------------------------- /common/npm/.npmrc: -------------------------------------------------------------------------------- 1 | prefer-offline=false 2 | -------------------------------------------------------------------------------- /common/npm/install-global-npm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | modules=( 3 | git-checkout-interactive # easily switch to recently used branches with `gci` 4 | @jarred/git-peek # very quickly open repo with editor locally with `git peek` 5 | ntl # quickly select an npm run-script to run 6 | ) 7 | 8 | npm install -g ${modules[@]} 9 | -------------------------------------------------------------------------------- /common/templates/latex/document.tex: -------------------------------------------------------------------------------- 1 | %!TEX output_directory = <> 2 | %!TEX copy_output_on_build = true 3 | 4 | \documentclass[11pt]{article} 5 | 6 | \usepackage[utf8]{inputenc} 7 | 8 | \usepackage{amsmath} % lets you input equations in math mode 9 | \usepackage{graphicx} % lets you include images 10 | \usepackage{enumerate} % lets you make lists 11 | \usepackage{hyperref} % lets you make links 12 | \usepackage{subcaption} % if you want to use subcaptions 13 | \usepackage[all]{hypcap} % makes links refer to figures and not captions 14 | \usepackage{relsize} % lets you use relative font sizes 15 | \usepackage{caption} % lets you add captions 16 | \usepackage{array} % lets you specify table column widths 17 | \usepackage{cite} 18 | \usepackage{float} 19 | \usepackage{array} 20 | \usepackage{cellspace} 21 | \usepackage[margin=1in, paperwidth=8.5in, paperheight=11in]{geometry} % 22 | 23 | % oooOhmmmmmmmmmm 24 | \newcommand{\megaOhm}{M$\Omega$} 25 | \newcommand{\kiloOhm}{k$\Omega$} 26 | \newcommand{\ohm}{$\Omega$} 27 | \newcommand{\microFarad}{$\mu$F} 28 | 29 | \setlength\cellspacetoplimit{8pt} 30 | \setlength\cellspacebottomlimit{8pt} 31 | \newcommand\cincludegraphics[2][]{\raisebox{-.3\height}{\includegraphics[#1]{#2}}} 32 | 33 | % place graphics in ./img/ 34 | \graphicspath{ {img/} } 35 | 36 | \begin{document} 37 | 38 | 39 | 40 | \title{Title} 41 | \author{Bogdan Vitoc} 42 | % \date{date here} % leave this commented to display the current date 43 | \maketitle 44 | 45 | 46 | 47 | \begin{abstract} 48 | Maecenas sed diam eget risus varius blandit sit amet non magna. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 49 | \end{abstract} 50 | 51 | 52 | \section{Sit Ultricies Malesuada Nibh} 53 | 54 | Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec ullamcorper nulla non metus auctor fringilla. 55 | 56 | % Example figure 1 57 | \begin{figure} [H] % H: forces layout according to position in the source 58 | \centering 59 | 60 | \includegraphics[width=0.8\textwidth]{block_diagram} 61 | 62 | \captionsetup{margin={0.2\textwidth,0.2\textwidth}} 63 | \caption{Sed posuere consectetur est at lobortis.} 64 | \caption*{\small (Egestas Justo Commodo)} 65 | \end{figure} 66 | 67 | 68 | \section{Etiam Sollicitudin Vehicula} 69 | 70 | Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. 71 | 72 | % Example figure 2 73 | \begin{figure} [H] 74 | \centering 75 | 76 | \includegraphics[width=0.8\textwidth]{circuit} 77 | 78 | \captionsetup{margin={0.2\textwidth,0.2\textwidth}} 79 | \caption{Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.} 80 | \end{figure} 81 | 82 | 83 | \end{document} -------------------------------------------------------------------------------- /common/templates/latex/img/block_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/templates/latex/img/block_diagram.png -------------------------------------------------------------------------------- /common/templates/latex/img/circuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/common/templates/latex/img/circuit.png -------------------------------------------------------------------------------- /common/tmux/.tmux.conf.local: -------------------------------------------------------------------------------- 1 | # https://github.com/gpakosz/.tmux 2 | # (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, 3 | # without any warranty. 4 | # Copyright 2012— Gregory Pakosz (@gpakosz). 5 | 6 | # Tmux conf provided by github:gpakosz/.tmux for user customization 7 | 8 | 9 | # -- Mine! ---------------------------------------------------------- 10 | 11 | set-window-option -g mode-keys vi 12 | bind-key -T copy-mode-vi 'v' send -X begin-selection 13 | bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel 14 | 15 | # Unbind C-a to disable Screen-compatible prefix added by gpakosz/.tmux 16 | # https://github.com/gpakosz/.tmux/issues/53 17 | set -gu prefix2 18 | unbind C-a 19 | 20 | 21 | # -- navigation ---------------------------------------------------------------- 22 | 23 | # if you're running tmux within iTerm2 24 | # - and tmux is 1.9 or 1.9a 25 | # - and iTerm2 is configured to let option key act as +Esc 26 | # - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys 27 | # then uncomment the following line to make Meta + arrow keys mapping work 28 | set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D" 29 | 30 | 31 | # -- windows & pane creation --------------------------------------------------- 32 | 33 | # new window retains current path, possible values are: 34 | # - true 35 | # - false (default) 36 | tmux_conf_new_window_retain_current_path=false 37 | 38 | # new pane retains current path, possible values are: 39 | # - true (default) 40 | # - false 41 | tmux_conf_new_pane_retain_current_path=true 42 | 43 | # new pane tries to reconnect ssh sessions (experimental), possible values are: 44 | # - true 45 | # - false (default) 46 | tmux_conf_new_pane_reconnect_ssh=false 47 | 48 | # prompt for session name when creating a new session, possible values are: 49 | # - true 50 | # - false (default) 51 | tmux_conf_new_session_prompt=false 52 | 53 | 54 | # -- display ------------------------------------------------------------------- 55 | 56 | # RGB 24-bit colour support (tmux >= 2.2), possible values are: 57 | # - true 58 | # - false (default) 59 | tmux_conf_theme_24b_colour=true 60 | 61 | # window style 62 | tmux_conf_theme_window_fg='default' 63 | tmux_conf_theme_window_bg='default' 64 | 65 | # highlight focused pane (tmux >= 2.1), possible values are: 66 | # - true 67 | # - false (default) 68 | tmux_conf_theme_highlight_focused_pane=false 69 | 70 | # focused pane colours: 71 | tmux_conf_theme_focused_pane_fg='default' 72 | tmux_conf_theme_focused_pane_bg='#0087d7' # light blue 73 | 74 | # pane border style, possible values are: 75 | # - thin (default) 76 | # - fat 77 | tmux_conf_theme_pane_border_style=thin 78 | 79 | # pane borders colours: 80 | tmux_conf_theme_pane_border='#011974' # dark blue 81 | tmux_conf_theme_pane_active_border='#00afff' # light blue 82 | 83 | # pane indicator colours 84 | tmux_conf_theme_pane_indicator='#00afff' # light blue 85 | tmux_conf_theme_pane_active_indicator='#00afff' # light blue 86 | 87 | # status line style 88 | tmux_conf_theme_message_fg='#000000' # black 89 | tmux_conf_theme_message_bg='#ffff00' # yellow 90 | tmux_conf_theme_message_attr='bold' 91 | 92 | # status line command style ( : Escape) 93 | tmux_conf_theme_message_command_fg='#ffff00' # yellow 94 | tmux_conf_theme_message_command_bg='#000000' # black 95 | tmux_conf_theme_message_command_attr='bold' 96 | 97 | # window modes style 98 | tmux_conf_theme_mode_fg='#000000' # black 99 | tmux_conf_theme_mode_bg='#ffff00' # yellow 100 | tmux_conf_theme_mode_attr='bold' 101 | 102 | # status line style 103 | tmux_conf_theme_status_fg='#8a8a8a' # light gray 104 | tmux_conf_theme_status_bg='#080808' # dark gray 105 | tmux_conf_theme_status_attr='none' 106 | 107 | # window status style 108 | # - built-in variables are: 109 | # - #{circled_window_index} 110 | tmux_conf_theme_window_status_fg='#8a8a8a' # light gray 111 | tmux_conf_theme_window_status_bg='#080808' # dark gray 112 | tmux_conf_theme_window_status_attr='none' 113 | tmux_conf_theme_window_status_format='#I #W' 114 | #tmux_conf_theme_window_status_format='#{circled_window_index} #W' 115 | #tmux_conf_theme_window_status_format='#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}' 116 | 117 | # window current status style 118 | # - built-in variables are: 119 | # - #{circled_window_index} 120 | tmux_conf_theme_window_status_current_fg='#000000' # black 121 | tmux_conf_theme_window_status_current_bg='#00afff' # light blue 122 | tmux_conf_theme_window_status_current_attr='bold' 123 | tmux_conf_theme_window_status_current_format='#I #W' 124 | #tmux_conf_theme_window_status_current_format='#{circled_window_index} #W' 125 | #tmux_conf_theme_window_status_current_format='#I #W#{?window_zoomed_flag,🔍,}' 126 | 127 | # window activity status style 128 | tmux_conf_theme_window_status_activity_fg='default' 129 | tmux_conf_theme_window_status_activity_bg='default' 130 | tmux_conf_theme_window_status_activity_attr='underscore' 131 | 132 | # window bell status style 133 | tmux_conf_theme_window_status_bell_fg='#ffff00' # yellow 134 | tmux_conf_theme_window_status_bell_bg='default' 135 | tmux_conf_theme_window_status_bell_attr='blink,bold' 136 | 137 | # window last status style 138 | tmux_conf_theme_window_status_last_fg='#00afff' # light blue 139 | tmux_conf_theme_window_status_last_bg='default' 140 | tmux_conf_theme_window_status_last_attr='none' 141 | 142 | # status left/right sections separators 143 | tmux_conf_theme_left_separator_main='' # /!\ you don't need to install Powerline 144 | tmux_conf_theme_left_separator_sub='' # you only need fonts patched with 145 | tmux_conf_theme_right_separator_main='' # Powerline symbols or the standalone 146 | tmux_conf_theme_right_separator_sub='' # PowerlineSymbols.otf font 147 | 148 | # status left/right content: 149 | # - separate main sections with '|' 150 | # - separate subsections with ',' 151 | # - built-in variables are: 152 | # - #{battery_bar} 153 | # - #{battery_hbar} 154 | # - #{battery_percentage} 155 | # - #{battery_status} 156 | # - #{battery_vbar} 157 | # - #{circled_session_name} 158 | # - #{hostname_ssh} 159 | # - #{hostname} 160 | # - #{loadavg} 161 | # - #{pairing} 162 | # - #{prefix} 163 | # - #{root} 164 | # - #{uptime_d} 165 | # - #{uptime_h} 166 | # - #{uptime_m} 167 | # - #{uptime_s} 168 | # - #{username} 169 | # - #{username_ssh} 170 | tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} ' 171 | tmux_conf_theme_status_right='#{prefix}#{pairing} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} ' 172 | 173 | # status left style 174 | tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4' # black, white , white 175 | tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff' # yellow, pink, white blue 176 | tmux_conf_theme_status_left_attr='bold,none,none' 177 | 178 | # status right style 179 | tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000' # light gray, white, black 180 | tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4' # dark gray, red, white 181 | tmux_conf_theme_status_right_attr='none,none,bold' 182 | 183 | # pairing indicator 184 | tmux_conf_theme_pairing='👓 ' # U+1F453 185 | tmux_conf_theme_pairing_fg='none' 186 | tmux_conf_theme_pairing_bg='none' 187 | tmux_conf_theme_pairing_attr='none' 188 | 189 | # prefix indicator 190 | tmux_conf_theme_prefix='⌨ ' # U+2328 191 | tmux_conf_theme_prefix_fg='none' 192 | tmux_conf_theme_prefix_bg='none' 193 | tmux_conf_theme_prefix_attr='none' 194 | 195 | # root indicator 196 | tmux_conf_theme_root='!' 197 | tmux_conf_theme_root_fg='none' 198 | tmux_conf_theme_root_bg='none' 199 | tmux_conf_theme_root_attr='bold,blink' 200 | 201 | # battery bar symbols 202 | tmux_conf_battery_bar_symbol_full='◼' 203 | tmux_conf_battery_bar_symbol_empty='◻' 204 | #tmux_conf_battery_bar_symbol_full='♥' 205 | #tmux_conf_battery_bar_symbol_empty='·' 206 | 207 | # battery bar length (in number of symbols), possible values are: 208 | # - auto 209 | # - a number, e.g. 5 210 | tmux_conf_battery_bar_length='auto' 211 | 212 | # battery bar palette, possible values are: 213 | # - gradient (default) 214 | # - heat 215 | # - 'colour_full_fg,colour_empty_fg,colour_bg' 216 | tmux_conf_battery_bar_palette='gradient' 217 | #tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000' # red, white, black 218 | 219 | # battery hbar palette, possible values are: 220 | # - gradient (default) 221 | # - heat 222 | # - 'colour_low,colour_half,colour_full' 223 | tmux_conf_battery_hbar_palette='gradient' 224 | #tmux_conf_battery_hbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green 225 | 226 | # battery vbar palette, possible values are: 227 | # - gradient (default) 228 | # - heat 229 | # - 'colour_low,colour_half,colour_full' 230 | tmux_conf_battery_vbar_palette='gradient' 231 | #tmux_conf_battery_vbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green 232 | 233 | # symbols used to indicate whether battery is charging or discharging 234 | tmux_conf_battery_status_charging='↑' # U+2191 235 | tmux_conf_battery_status_discharging='↓' # U+2193 236 | #tmux_conf_battery_status_charging='⚡ ' # U+26A1 237 | #tmux_conf_battery_status_charging='🔌 ' # U+1F50C 238 | #tmux_conf_battery_status_discharging='🔋 ' # U+1F50B 239 | 240 | # clock style 241 | tmux_conf_theme_clock_colour='#00afff' # light blue 242 | tmux_conf_theme_clock_style='24' 243 | 244 | 245 | # -- clipboard ----------------------------------------------------------------- 246 | 247 | # in copy mode, copying selection also copies to the OS clipboard 248 | # - true 249 | # - false (default) 250 | # on macOS, this requires installing reattach-to-user-namespace, see README.md 251 | # on Linux, this requires xsel or xclip 252 | tmux_conf_copy_to_os_clipboard=false 253 | 254 | 255 | # -- user customizations ------------------------------------------------------- 256 | # this is the place to override or undo settings 257 | 258 | # increase history size 259 | #set -g history-limit 10000 260 | 261 | # start with mouse mode enabled 262 | set -g mouse on 263 | 264 | # force Vi mode 265 | # really you should export VISUAL or EDITOR environment variable, see manual 266 | #set -g status-keys vi 267 | #set -g mode-keys vi 268 | 269 | # replace C-b by C-a instead of using both prefixes 270 | # set -gu prefix2 271 | # unbind C-a 272 | # unbind C-b 273 | # set -g prefix C-a 274 | # bind C-a send-prefix 275 | 276 | # move status line to top 277 | #set -g status-position top 278 | -------------------------------------------------------------------------------- /common/vim/.vimrc: -------------------------------------------------------------------------------- 1 | " github amix/vimrc 2 | 3 | let vim_runtime = $HOME . '/.dotfiles/external/amix_vimrc' 4 | execute 'set runtimepath+=' . vim_runtime 5 | execute 'source ' . vim_runtime . '/vimrcs/basic.vim' 6 | execute 'source ' . vim_runtime . '/vimrcs/filetypes.vim' 7 | execute 'source ' . vim_runtime . '/vimrcs/plugins_config.vim' 8 | execute 'source ' . vim_runtime . '/vimrcs/extended.vim' 9 | 10 | " My .vimrc 11 | let NERDTreeShowHidden=1 12 | set number 13 | -------------------------------------------------------------------------------- /common/zsh/.zshenv: -------------------------------------------------------------------------------- 1 | export DOTFILES="$HOME/.dotfiles" 2 | export TERM="xterm-256color" 3 | export ZSH="$DOTFILES/external/oh-my-zsh" 4 | 5 | export NVM_DIR="$HOME/.nvm" 6 | export PYENV_ROOT="$HOME/.pyenv/" 7 | 8 | # Machine specific .zshenv 9 | if [[ -f "$HOME/.zshenv_local" ]]; then 10 | source "$HOME/.zshenv_local" 11 | fi 12 | 13 | # Sets $BOGDAN_OSID 14 | source "$DOTFILES/osid.sh" 15 | 16 | # Custom path 17 | export PATH=$(echo " 18 | $DOTFILES/$BOGDAN_OSID/bin 19 | :$DOTFILES/common/bin 20 | :$HOME/bin 21 | :$PYENV_ROOT/bin 22 | :$PATH 23 | :$DOTFILES/common/zsh/oh-my-zsh-custom/plugins/git-open 24 | " | tr -d '\n') # remove newlines 25 | 26 | # OS-specific .zshenv 27 | source "$DOTFILES/$BOGDAN_OSID/zsh/.zshenv_$BOGDAN_OSID" 28 | -------------------------------------------------------------------------------- /common/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. 2 | # Initialization code that may require console input (password prompts, [y/n] 3 | # confirmations, etc.) must go above this block; everything else may go below. 4 | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then 5 | source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" 6 | fi 7 | 8 | ############################################################################### 9 | # ZSH # 10 | ############################################################################### 11 | 12 | ZSH_CUSTOM="$DOTFILES/common/zsh/oh-my-zsh-custom" 13 | 14 | # plugins 15 | plugins=(git git-open git-extras sublime postgres zsh-syntax-highlighting gradle docker tmux nix-shell) 16 | 17 | # P10K Prompt (ZSH Theme) 18 | # To customize prompt, run `p10k configure` or edit $POWERLEVEL9K_CONFIG_FILE 19 | ZSH_THEME="powerlevel10k" 20 | POWERLEVEL9K_CONFIG_FILE=$DOTFILES/common/zsh/p10k.zsh 21 | [[ ! -f $POWERLEVEL9K_CONFIG_FILE ]] || source $POWERLEVEL9K_CONFIG_FILE 22 | 23 | # keys 24 | bindkey '^_' undo # undo completion with ctrl + _ 25 | 26 | # enable extended pattern matching 27 | setopt extended_glob 28 | 29 | # source oh-my-zsh 30 | source $ZSH/oh-my-zsh.sh 31 | 32 | # completion system 33 | autoload -U compinit 34 | compinit -u 35 | _comp_options+=(globdots) # show hidden files and folders 36 | 37 | # mass rename files 38 | autoload zmv 39 | 40 | # exclude items from completion 41 | zstyle ':completion:*' ignored-patterns '__nvmrc_loader|__nvm_forward' 42 | 43 | ############################################################################### 44 | # Other software # 45 | ############################################################################### 46 | 47 | # z - jump around 48 | . "$DOTFILES/external/z_jump-around/z.sh" 49 | 50 | # bat - better cat 51 | export MANPAGER="sh -c 'col -bx | bat -l man -p'" # colorize man pages 52 | export MANROFFOPT="-c" 53 | 54 | # nvm (node) 55 | export NVM_DIR="$HOME/.nvm" 56 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm 57 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion 58 | 59 | # pyenv (Python) 60 | eval "$(pyenv init -)" 61 | 62 | 63 | # Terraform 64 | autoload -U +X bashcompinit && bashcompinit 65 | complete -o nospace -C /usr/bin/terraform terraform 66 | 67 | # Direnv 68 | # eval "$(direnv hook zsh)" 69 | 70 | # # Silence direnv noisy diff messages 71 | # # from: https://github.com/direnv/direnv/issues/68#issuecomment-1003426550 72 | # copy_function() { 73 | # test -n "$(declare -f "$1")" || return 74 | # eval "${_/$1/$2}" 75 | # } 76 | 77 | # copy_function _direnv_hook _direnv_hook__old 78 | 79 | # _direnv_hook() { 80 | # _direnv_hook__old "$@" 2> >(egrep -v '^direnv: (export)') 81 | # } 82 | 83 | 84 | ############################################################################### 85 | # Other dotfiles # 86 | ############################################################################### 87 | 88 | # OS-specific .zshrc 89 | source "$DOTFILES/$BOGDAN_OSID/zsh/.zshrc_$BOGDAN_OSID" 90 | 91 | # Machine specific .zshrc 92 | if [[ -f "$HOME/.zshrc_local" ]]; then 93 | source "$HOME/.zshrc_local" 94 | fi 95 | 96 | # Aliases 97 | for f in $DOTFILES/common/aliases/*; do source $f; done 98 | for f in $DOTFILES/$BOGDAN_OSID/aliases/*; do source $f; done 99 | -------------------------------------------------------------------------------- /common/zsh/oh-my-zsh-custom/plugins/git-open: -------------------------------------------------------------------------------- 1 | /home/bogdan/.dotfiles/external/git-open -------------------------------------------------------------------------------- /common/zsh/oh-my-zsh-custom/plugins/nix-shell: -------------------------------------------------------------------------------- 1 | ../../../../external/nix-shell -------------------------------------------------------------------------------- /common/zsh/oh-my-zsh-custom/plugins/zsh-syntax-highlighting: -------------------------------------------------------------------------------- 1 | /home/bogdan/.dotfiles/external/zsh-syntax-highlighting -------------------------------------------------------------------------------- /common/zsh/oh-my-zsh-custom/themes/bullet-train.zsh-theme: -------------------------------------------------------------------------------- 1 | /home/bogdan/.dotfiles/external/bullet-train-oh-my-zsh-theme/bullet-train.zsh-theme -------------------------------------------------------------------------------- /common/zsh/oh-my-zsh-custom/themes/powerlevel10k.zsh-theme: -------------------------------------------------------------------------------- 1 | ../../../../external/powerlevel10k-zsh-theme/powerlevel10k.zsh-theme -------------------------------------------------------------------------------- /common/zsh/p10k.zsh: -------------------------------------------------------------------------------- 1 | # Generated by Powerlevel10k configuration wizard on 2022-07-04 at 16:08 EDT. 2 | # Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 24045. 3 | # Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode, 4 | # 24h time, angled separators, sharp heads, flat tails, 2 lines, dotted, no frame, 5 | # light-ornaments, sparse, few icons, concise, instant_prompt=verbose. 6 | # Type `p10k configure` to generate another config. 7 | # 8 | # Config for Powerlevel10k with powerline prompt style with colorful background. 9 | # Type `p10k configure` to generate your own config based on it. 10 | # 11 | # Tip: Looking for a nice color? Here's a one-liner to print colormap. 12 | # 13 | # for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done 14 | 15 | # Temporarily change options. 16 | 'builtin' 'local' '-a' 'p10k_config_opts' 17 | [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') 18 | [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') 19 | [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 20 | 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' 21 | 22 | () { 23 | emulate -L zsh -o extended_glob 24 | 25 | # Unset all configuration options. This allows you to apply configuration changes without 26 | # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. 27 | unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' 28 | 29 | # Zsh >= 5.1 is required. 30 | autoload -Uz is-at-least && is-at-least 5.1 || return 31 | 32 | 33 | # The list of segments shown on the left. Fill it with the most important segments. 34 | typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( 35 | # =========================[ Line #1 ]========================= 36 | # os_icon # os identifier 37 | dir # current directory 38 | vcs # git status 39 | # =========================[ Line #2 ]========================= 40 | newline # \n 41 | prompt_char # prompt symbol 42 | ) 43 | 44 | # The list of segments shown on the right. Fill it with less important segments. 45 | # Right prompt on the last prompt line (where you are typing your commands) gets 46 | # automatically hidden when the input line reaches it. Right prompt above the 47 | # last prompt line gets hidden if it would overlap with left prompt. 48 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( 49 | # =========================[ Line #1 ]========================= 50 | status # exit code of the last command 51 | command_execution_time # duration of the last command 52 | background_jobs # presence of background jobs 53 | direnv # direnv status (https://direnv.net/) 54 | asdf # asdf version manager (https://github.com/asdf-vm/asdf) 55 | virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) 56 | anaconda # conda environment (https://conda.io/) 57 | pyenv # python environment (https://github.com/pyenv/pyenv) 58 | goenv # go environment (https://github.com/syndbg/goenv) 59 | nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) 60 | nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) 61 | nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) 62 | # node_version # node.js version 63 | # go_version # go version (https://golang.org) 64 | # rust_version # rustc version (https://www.rust-lang.org) 65 | # dotnet_version # .NET version (https://dotnet.microsoft.com) 66 | # php_version # php version (https://www.php.net/) 67 | # laravel_version # laravel php framework version (https://laravel.com/) 68 | # java_version # java version (https://www.java.com/) 69 | # package # name@version from package.json (https://docs.npmjs.com/files/package.json) 70 | rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) 71 | rvm # ruby version from rvm (https://rvm.io) 72 | fvm # flutter version management (https://github.com/leoafarias/fvm) 73 | luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) 74 | jenv # java version from jenv (https://github.com/jenv/jenv) 75 | plenv # perl version from plenv (https://github.com/tokuhirom/plenv) 76 | perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) 77 | phpenv # php version from phpenv (https://github.com/phpenv/phpenv) 78 | scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) 79 | haskell_stack # haskell version from stack (https://haskellstack.org/) 80 | kubecontext # current kubernetes context (https://kubernetes.io/) 81 | terraform # terraform workspace (https://www.terraform.io) 82 | # terraform_version # terraform version (https://www.terraform.io) 83 | aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) 84 | aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) 85 | azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) 86 | gcloud # google cloud cli account and project (https://cloud.google.com/) 87 | google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) 88 | toolbox # toolbox name (https://github.com/containers/toolbox) 89 | context # user@hostname 90 | nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) 91 | ranger # ranger shell (https://github.com/ranger/ranger) 92 | nnn # nnn shell (https://github.com/jarun/nnn) 93 | xplr # xplr shell (https://github.com/sayanarijit/xplr) 94 | vim_shell # vim shell indicator (:sh) 95 | midnight_commander # midnight commander shell (https://midnight-commander.org/) 96 | nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) 97 | # vi_mode # vi mode (you don't need this if you've enabled prompt_char) 98 | # vpn_ip # virtual private network indicator 99 | # load # CPU load 100 | # disk_usage # disk usage 101 | # ram # free RAM 102 | # swap # used swap 103 | todo # todo items (https://github.com/todotxt/todo.txt-cli) 104 | timewarrior # timewarrior tracking status (https://timewarrior.net/) 105 | taskwarrior # taskwarrior task count (https://taskwarrior.org/) 106 | time # current time 107 | # =========================[ Line #2 ]========================= 108 | newline 109 | # ip # ip address and bandwidth usage for a specified network interface 110 | # public_ip # public IP address 111 | # proxy # system-wide http/https/ftp proxy 112 | # battery # internal battery 113 | # wifi # wifi speed 114 | # example # example user-defined segment (see prompt_example function below) 115 | ) 116 | 117 | # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. 118 | typeset -g POWERLEVEL9K_MODE=nerdfont-complete 119 | # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid 120 | # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. 121 | typeset -g POWERLEVEL9K_ICON_PADDING=none 122 | 123 | # When set to true, icons appear before content on both sides of the prompt. When set 124 | # to false, icons go after content. If empty or not set, icons go before content in the left 125 | # prompt and after content in the right prompt. 126 | # 127 | # You can also override it for a specific segment: 128 | # 129 | # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false 130 | # 131 | # Or for a specific segment in specific state: 132 | # 133 | # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false 134 | typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= 135 | 136 | # Add an empty line before each prompt. 137 | typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true 138 | 139 | # Connect left prompt lines with these symbols. You'll probably want to use the same color 140 | # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. 141 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX= 142 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX= 143 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX= 144 | # Connect right prompt lines with these symbols. 145 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= 146 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= 147 | typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= 148 | 149 | # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or 150 | # '─'. The last two make it easier to see the alignment between left and right prompt and to 151 | # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false 152 | # for more compact prompt if using this option. 153 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='·' 154 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= 155 | typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= 156 | if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then 157 | # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE 158 | # ornaments defined above. 159 | typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 160 | # Start filler from the edge of the screen if there are no left segments on the first line. 161 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' 162 | # End filler on the edge of the screen if there are no right segments on the first line. 163 | typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' 164 | fi 165 | 166 | # Separator between same-color segments on the left. 167 | typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' 168 | # Separator between same-color segments on the right. 169 | typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' 170 | # Separator between different-color segments on the left. 171 | typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' 172 | # Separator between different-color segments on the right. 173 | typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' 174 | # The right end of left prompt. 175 | typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' 176 | # The left end of right prompt. 177 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' 178 | # The left end of left prompt. 179 | typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='' 180 | # The right end of right prompt. 181 | typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='' 182 | # Left prompt terminator for lines without any segments. 183 | typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 184 | 185 | #################################[ os_icon: os identifier ]################################## 186 | # OS identifier color. 187 | typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 188 | typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 189 | # Custom icon. 190 | # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' 191 | 192 | ################################[ prompt_char: prompt symbol ]################################ 193 | # Transparent background. 194 | typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= 195 | # Green prompt symbol if the last command succeeded. 196 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 197 | # Red prompt symbol if the last command failed. 198 | typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 199 | # Default prompt symbol. 200 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' 201 | # Prompt symbol in command vi mode. 202 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' 203 | # Prompt symbol in visual vi mode. 204 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' 205 | # Prompt symbol in overwrite vi mode. 206 | typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' 207 | typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true 208 | # No line terminator if prompt_char is the last segment. 209 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= 210 | # No line introducer if prompt_char is the first segment. 211 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= 212 | # No surrounding whitespace. 213 | typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= 214 | 215 | ##################################[ dir: current directory ]################################## 216 | # Current directory background color. 217 | typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 218 | # Default current directory foreground color. 219 | typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 220 | # If directory is too long, shorten some of its segments to the shortest possible unique 221 | # prefix. The shortened directory can be tab-completed to the original. 222 | typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique 223 | # Replace removed segment suffixes with this symbol. 224 | typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= 225 | # Color of the shortened directory segments. 226 | typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 227 | # Color of the anchor directory segments. Anchor segments are never shortened. The first 228 | # segment is always an anchor. 229 | typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 230 | # Display anchor directory segments in bold. 231 | typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true 232 | # Don't shorten directories that contain any of these files. They are anchors. 233 | local anchor_files=( 234 | .bzr 235 | .citc 236 | .git 237 | .hg 238 | .node-version 239 | .python-version 240 | .go-version 241 | .ruby-version 242 | .lua-version 243 | .java-version 244 | .perl-version 245 | .php-version 246 | .tool-version 247 | .shorten_folder_marker 248 | .svn 249 | .terraform 250 | CVS 251 | Cargo.toml 252 | composer.json 253 | go.mod 254 | package.json 255 | stack.yaml 256 | ) 257 | typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" 258 | # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains 259 | # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is 260 | # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) 261 | # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers 262 | # and other directories don't. 263 | # 264 | # Optionally, "first" and "last" can be followed by ":" where is an integer. 265 | # This moves the truncation point to the right (positive offset) or to the left (negative offset) 266 | # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" 267 | # respectively. 268 | typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false 269 | # Don't shorten this many last directory segments. They are anchors. 270 | typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 271 | # Shorten directory if it's longer than this even if there is space for it. The value can 272 | # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, 273 | # directory will be shortened only when prompt doesn't fit or when other parameters demand it 274 | # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). 275 | # If set to `0`, directory will always be shortened to its minimum length. 276 | typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 277 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this 278 | # many columns for typing commands. 279 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 280 | # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least 281 | # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. 282 | typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 283 | # If set to true, embed a hyperlink into the directory. Useful for quickly 284 | # opening a directory in the file manager simply by clicking the link. 285 | # Can also be handy when the directory is shortened, as it allows you to see 286 | # the full directory that was used in previous commands. 287 | typeset -g POWERLEVEL9K_DIR_HYPERLINK=false 288 | 289 | # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON 290 | # and POWERLEVEL9K_DIR_CLASSES below. 291 | typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 292 | 293 | # The default icon shown next to non-writable and non-existent directories when 294 | # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. 295 | # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' 296 | 297 | # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different 298 | # directories. It must be an array with 3 * N elements. Each triplet consists of: 299 | # 300 | # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with 301 | # extended_glob option enabled. 302 | # 2. Directory class for the purpose of styling. 303 | # 3. An empty string. 304 | # 305 | # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. 306 | # 307 | # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories 308 | # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. 309 | # 310 | # For example, given these settings: 311 | # 312 | # typeset -g POWERLEVEL9K_DIR_CLASSES=( 313 | # '~/work(|/*)' WORK '' 314 | # '~(|/*)' HOME '' 315 | # '*' DEFAULT '') 316 | # 317 | # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one 318 | # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or 319 | # WORK_NON_EXISTENT. 320 | # 321 | # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an 322 | # option to define custom colors and icons for different directory classes. 323 | # 324 | # # Styling for WORK. 325 | # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' 326 | # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 327 | # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 328 | # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 329 | # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 330 | # 331 | # # Styling for WORK_NOT_WRITABLE. 332 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 333 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 334 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 335 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 336 | # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 337 | # 338 | # # Styling for WORK_NON_EXISTENT. 339 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' 340 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4 341 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254 342 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250 343 | # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255 344 | # 345 | # If a styling parameter isn't explicitly defined for some class, it falls back to the classless 346 | # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls 347 | # back to POWERLEVEL9K_DIR_FOREGROUND. 348 | # 349 | typeset -g POWERLEVEL9K_DIR_CLASSES=() 350 | 351 | # Custom prefix. 352 | # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' 353 | 354 | #####################################[ vcs: git status ]###################################### 355 | # Version control system colors. 356 | typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 357 | typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 358 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 359 | typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 360 | typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 361 | 362 | # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. 363 | typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= 364 | 365 | # Untracked files icon. It's really a question mark, your font isn't broken. 366 | # Change the value of this parameter to show a different icon. 367 | typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' 368 | 369 | # Formatter for Git status. 370 | # 371 | # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. 372 | # 373 | # You can edit the function to customize how Git status looks. 374 | # 375 | # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: 376 | # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. 377 | function my_git_formatter() { 378 | emulate -L zsh 379 | 380 | if [[ -n $P9K_CONTENT ]]; then 381 | # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from 382 | # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. 383 | typeset -g my_git_format=$P9K_CONTENT 384 | return 385 | fi 386 | 387 | # Styling for different parts of Git status. 388 | local meta='%7F' # white foreground 389 | local clean='%0F' # black foreground 390 | local modified='%0F' # black foreground 391 | local untracked='%0F' # black foreground 392 | local conflicted='%1F' # red foreground 393 | 394 | local res 395 | 396 | if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then 397 | local branch=${(V)VCS_STATUS_LOCAL_BRANCH} 398 | # If local branch name is at most 32 characters long, show it in full. 399 | # Otherwise show the first 12 … the last 12. 400 | # Tip: To always show local branch name in full without truncation, delete the next line. 401 | (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line 402 | res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" 403 | fi 404 | 405 | if [[ -n $VCS_STATUS_TAG 406 | # Show tag only if not on a branch. 407 | # Tip: To always show tag, delete the next line. 408 | && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line 409 | ]]; then 410 | local tag=${(V)VCS_STATUS_TAG} 411 | # If tag name is at most 32 characters long, show it in full. 412 | # Otherwise show the first 12 … the last 12. 413 | # Tip: To always show tag name in full without truncation, delete the next line. 414 | (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line 415 | res+="${meta}#${clean}${tag//\%/%%}" 416 | fi 417 | 418 | # Display the current Git commit if there is no branch and no tag. 419 | # Tip: To always display the current Git commit, delete the next line. 420 | [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line 421 | res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" 422 | 423 | # Show tracking branch name if it differs from local branch. 424 | if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then 425 | res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" 426 | fi 427 | 428 | # Display "wip" if the latest commit's summary contains "wip" or "WIP". 429 | if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then 430 | res+=" ${modified}wip" 431 | fi 432 | 433 | # ⇣42 if behind the remote. 434 | (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" 435 | # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. 436 | (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " 437 | (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" 438 | # ⇠42 if behind the push remote. 439 | (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" 440 | (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " 441 | # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. 442 | (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" 443 | # *42 if have stashes. 444 | (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" 445 | # 'merge' if the repo is in an unusual state. 446 | [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" 447 | # ~42 if have merge conflicts. 448 | (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" 449 | # +42 if have staged changes. 450 | (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" 451 | # !42 if have unstaged changes. 452 | (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" 453 | # ?42 if have untracked files. It's really a question mark, your font isn't broken. 454 | # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. 455 | # Remove the next line if you don't want to see untracked files at all. 456 | (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" 457 | # "─" if the number of unstaged files is unknown. This can happen due to 458 | # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower 459 | # than the number of files in the Git index, or due to bash.showDirtyState being set to false 460 | # in the repository config. The number of staged and untracked files may also be unknown 461 | # in this case. 462 | (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" 463 | 464 | typeset -g my_git_format=$res 465 | } 466 | functions -M my_git_formatter 2>/dev/null 467 | 468 | # Don't count the number of unstaged, untracked and conflicted files in Git repositories with 469 | # more than this many files in the index. Negative value means infinity. 470 | # 471 | # If you are working in Git repositories with tens of millions of files and seeing performance 472 | # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output 473 | # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's 474 | # config: `git config bash.showDirtyState false`. 475 | typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 476 | 477 | # Don't show Git status in prompt for repositories whose workdir matches this pattern. 478 | # For example, if set to '~', the Git repository at $HOME/.git will be ignored. 479 | # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. 480 | typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' 481 | 482 | # Disable the default Git status formatting. 483 | typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true 484 | # Install our own Git status formatter. 485 | typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' 486 | # Enable counters for staged, unstaged, etc. 487 | typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 488 | 489 | # Custom icon. 490 | typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION= 491 | # Custom prefix. 492 | # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' 493 | 494 | # Show status of repositories of these types. You can add svn and/or hg if you are 495 | # using them. If you do, your prompt may become slow even when your current directory 496 | # isn't in an svn or hg repository. 497 | typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) 498 | 499 | ##########################[ status: exit code of the last command ]########################### 500 | # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and 501 | # style them independently from the regular OK and ERROR state. 502 | typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true 503 | 504 | # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as 505 | # it will signify success by turning green. 506 | typeset -g POWERLEVEL9K_STATUS_OK=false 507 | typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' 508 | typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 509 | typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 510 | 511 | # Status when some part of a pipe command fails but the overall exit status is zero. It may look 512 | # like this: 1|0. 513 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true 514 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' 515 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 516 | typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 517 | 518 | # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as 519 | # it will signify error by turning red. 520 | typeset -g POWERLEVEL9K_STATUS_ERROR=false 521 | typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' 522 | typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 523 | typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 524 | 525 | # Status when the last command was terminated by a signal. 526 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true 527 | # Use terse signal names: "INT" instead of "SIGINT(2)". 528 | typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false 529 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' 530 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 531 | typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 532 | 533 | # Status when some part of a pipe command fails and the overall exit status is also non-zero. 534 | # It may look like this: 1|0. 535 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true 536 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' 537 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 538 | typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 539 | 540 | ###################[ command_execution_time: duration of the last command ]################### 541 | # Execution time color. 542 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 543 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 544 | # Show duration of the last command if takes at least this many seconds. 545 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 546 | # Show this many fractional digits. Zero means round to seconds. 547 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 548 | # Duration format: 1d 2h 3m 4s. 549 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' 550 | # Custom icon. 551 | typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION= 552 | # Custom prefix. 553 | # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' 554 | 555 | #######################[ background_jobs: presence of background jobs ]####################### 556 | # Background jobs color. 557 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 558 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 559 | # Don't show the number of background jobs. 560 | typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false 561 | # Custom icon. 562 | # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' 563 | 564 | #######################[ direnv: direnv status (https://direnv.net/) ]######################## 565 | # Direnv color. 566 | typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 567 | typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 568 | # Custom icon. 569 | # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 570 | 571 | ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### 572 | # Default asdf color. Only used to display tools for which there is no color override (see below). 573 | # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and 574 | # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. 575 | typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 576 | typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 577 | 578 | # There are four parameters that can be used to hide asdf tools. Each parameter describes 579 | # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at 580 | # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to 581 | # hide a tool, it gets shown. 582 | # 583 | # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and 584 | # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: 585 | # 586 | # asdf local python 3.8.1 587 | # asdf global python 3.8.1 588 | # 589 | # After running both commands the current python version is 3.8.1 and its source is "local" as 590 | # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, 591 | # it'll hide python version in this case because 3.8.1 is the same as the global version. 592 | # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't 593 | # contain "local". 594 | 595 | # Hide tool versions that don't come from one of these sources. 596 | # 597 | # Available sources: 598 | # 599 | # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" 600 | # - local `asdf current` says "set by /some/not/home/directory/file" 601 | # - global `asdf current` says "set by /home/username/file" 602 | # 603 | # Note: If this parameter is set to (shell local global), it won't hide tools. 604 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. 605 | typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) 606 | 607 | # If set to false, hide tool versions that are the same as global. 608 | # 609 | # Note: The name of this parameter doesn't reflect its meaning at all. 610 | # Note: If this parameter is set to true, it won't hide tools. 611 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. 612 | typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false 613 | 614 | # If set to false, hide tool versions that are equal to "system". 615 | # 616 | # Note: If this parameter is set to true, it won't hide tools. 617 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. 618 | typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true 619 | 620 | # If set to non-empty value, hide tools unless there is a file matching the specified file pattern 621 | # in the current directory, or its parent directory, or its grandparent directory, and so on. 622 | # 623 | # Note: If this parameter is set to empty value, it won't hide tools. 624 | # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. 625 | # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. 626 | # 627 | # Example: Hide nodejs version when there is no package.json and no *.js files in the current 628 | # directory, in `..`, in `../..` and so on. 629 | # 630 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' 631 | typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= 632 | 633 | # Ruby version from asdf. 634 | typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 635 | typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 636 | # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' 637 | # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' 638 | 639 | # Python version from asdf. 640 | typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 641 | typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 642 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' 643 | # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' 644 | 645 | # Go version from asdf. 646 | typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 647 | typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 648 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 649 | # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 650 | 651 | # Node.js version from asdf. 652 | typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 653 | typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 654 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' 655 | # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' 656 | 657 | # Rust version from asdf. 658 | typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 659 | typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 660 | # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' 661 | # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' 662 | 663 | # .NET Core version from asdf. 664 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 665 | typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 666 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' 667 | # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' 668 | 669 | # Flutter version from asdf. 670 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 671 | typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 672 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' 673 | # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' 674 | 675 | # Lua version from asdf. 676 | typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 677 | typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 678 | # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' 679 | # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' 680 | 681 | # Java version from asdf. 682 | typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 683 | typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 684 | # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' 685 | # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' 686 | 687 | # Perl version from asdf. 688 | typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 689 | typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 690 | # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' 691 | # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' 692 | 693 | # Erlang version from asdf. 694 | typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 695 | typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 696 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' 697 | # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' 698 | 699 | # Elixir version from asdf. 700 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 701 | typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 702 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' 703 | # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' 704 | 705 | # Postgres version from asdf. 706 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 707 | typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 708 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' 709 | # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' 710 | 711 | # PHP version from asdf. 712 | typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 713 | typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 714 | # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' 715 | # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' 716 | 717 | # Haskell version from asdf. 718 | typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 719 | typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 720 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 721 | # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' 722 | 723 | # Julia version from asdf. 724 | typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 725 | typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 726 | # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' 727 | # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' 728 | 729 | ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### 730 | # NordVPN connection indicator color. 731 | typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 732 | typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 733 | # Hide NordVPN connection indicator when not connected. 734 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= 735 | typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= 736 | # Custom icon. 737 | # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' 738 | 739 | #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## 740 | # Ranger shell color. 741 | typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 742 | typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 743 | # Custom icon. 744 | # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' 745 | 746 | ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### 747 | # Nnn shell color. 748 | typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 749 | typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 750 | # Custom icon. 751 | # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' 752 | 753 | ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## 754 | # xplr shell color. 755 | typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0 756 | typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6 757 | # Custom icon. 758 | # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' 759 | 760 | ###########################[ vim_shell: vim shell indicator (:sh) ]########################### 761 | # Vim shell indicator color. 762 | typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 763 | typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 764 | # Custom icon. 765 | # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 766 | 767 | ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### 768 | # Midnight Commander shell color. 769 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 770 | typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 771 | # Custom icon. 772 | # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' 773 | 774 | #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## 775 | # Nix shell color. 776 | typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 777 | typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 778 | 779 | # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. 780 | # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= 781 | 782 | # Custom icon. 783 | # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' 784 | 785 | ##################################[ disk_usage: disk usage ]################################## 786 | # Colors for different levels of disk usage. 787 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 788 | typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 789 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 790 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 791 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 792 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 793 | # Thresholds for different levels of disk usage (percentage points). 794 | typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 795 | typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 796 | # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. 797 | typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false 798 | # Custom icon. 799 | # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 800 | 801 | ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### 802 | # Foreground color. 803 | typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 804 | # Text and color for normal (a.k.a. command) vi mode. 805 | typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL 806 | typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 807 | # Text and color for visual vi mode. 808 | typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL 809 | typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 810 | # Text and color for overtype (a.k.a. overwrite and replace) vi mode. 811 | typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE 812 | typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 813 | # Text and color for insert vi mode. 814 | typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= 815 | typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 816 | 817 | ######################################[ ram: free RAM ]####################################### 818 | # RAM color. 819 | typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 820 | typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 821 | # Custom icon. 822 | # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' 823 | 824 | #####################################[ swap: used swap ]###################################### 825 | # Swap color. 826 | typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 827 | typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 828 | # Custom icon. 829 | # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' 830 | 831 | ######################################[ load: CPU load ]###################################### 832 | # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. 833 | typeset -g POWERLEVEL9K_LOAD_WHICH=5 834 | # Load color when load is under 50%. 835 | typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 836 | typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 837 | # Load color when load is between 50% and 70%. 838 | typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 839 | typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 840 | # Load color when load is over 70%. 841 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 842 | typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 843 | # Custom icon. 844 | # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' 845 | 846 | ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ 847 | # Todo color. 848 | typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 849 | typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 850 | # Hide todo when the total number of tasks is zero. 851 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true 852 | # Hide todo when the number of tasks after filtering is zero. 853 | typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false 854 | 855 | # Todo format. The following parameters are available within the expansion. 856 | # 857 | # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. 858 | # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. 859 | # 860 | # These variables correspond to the last line of the output of `todo.sh -p ls`: 861 | # 862 | # TODO: 24 of 42 tasks shown 863 | # 864 | # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. 865 | # 866 | # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' 867 | 868 | # Custom icon. 869 | # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' 870 | 871 | ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ 872 | # Timewarrior color. 873 | typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 874 | typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 875 | 876 | # If the tracked task is longer than 24 characters, truncate and append "…". 877 | # Tip: To always display tasks without truncation, delete the following parameter. 878 | # Tip: To hide task names and display just the icon when time tracking is enabled, set the 879 | # value of the following parameter to "". 880 | typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' 881 | 882 | # Custom icon. 883 | # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 884 | 885 | ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## 886 | # Taskwarrior color. 887 | typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 888 | typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 889 | 890 | # Taskwarrior segment format. The following parameters are available within the expansion. 891 | # 892 | # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. 893 | # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. 894 | # 895 | # Zero values are represented as empty parameters. 896 | # 897 | # The default format: 898 | # 899 | # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' 900 | # 901 | # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' 902 | 903 | # Custom icon. 904 | # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' 905 | 906 | ##################################[ context: user@hostname ]################################## 907 | # Context color when running with privileges. 908 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 909 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 910 | # Context color in SSH without privileges. 911 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 912 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 913 | # Default context color (no privileges, no SSH). 914 | typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 915 | typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 916 | 917 | # Context format when running with privileges: user@hostname. 918 | typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' 919 | # Context format when in SSH without privileges: user@hostname. 920 | typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' 921 | # Default context format (no privileges, no SSH): user@hostname. 922 | typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' 923 | 924 | # Don't show context unless running with privileges or in SSH. 925 | # Tip: Remove the next line to always show context. 926 | typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= 927 | 928 | # Custom icon. 929 | # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' 930 | # Custom prefix. 931 | # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' 932 | 933 | ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### 934 | # Python virtual environment color. 935 | typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 936 | typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 937 | # Don't show Python version next to the virtual environment name. 938 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false 939 | # If set to "false", won't show virtualenv if pyenv is already shown. 940 | # If set to "if-different", won't show virtualenv if it's the same as pyenv. 941 | typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false 942 | # Separate environment name from Python version only with a space. 943 | typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= 944 | # Custom icon. 945 | # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 946 | 947 | #####################[ anaconda: conda environment (https://conda.io/) ]###################### 948 | # Anaconda environment color. 949 | typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 950 | typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 951 | 952 | # Anaconda segment format. The following parameters are available within the expansion. 953 | # 954 | # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. 955 | # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. 956 | # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). 957 | # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). 958 | # 959 | # CONDA_PROMPT_MODIFIER can be configured with the following command: 960 | # 961 | # conda config --set env_prompt '({default_env}) ' 962 | # 963 | # The last argument is a Python format string that can use the following variables: 964 | # 965 | # - prefix The same as CONDA_PREFIX. 966 | # - default_env The same as CONDA_DEFAULT_ENV. 967 | # - name The last segment of CONDA_PREFIX. 968 | # - stacked_env Comma-separated list of names in the environment stack. The first element is 969 | # always the same as default_env. 970 | # 971 | # Note: '({default_env}) ' is the default value of env_prompt. 972 | # 973 | # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER 974 | # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former 975 | # is empty. 976 | typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' 977 | 978 | # Custom icon. 979 | # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' 980 | 981 | ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ 982 | # Pyenv color. 983 | typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 984 | typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 985 | # Hide python version if it doesn't come from one of these sources. 986 | typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) 987 | # If set to false, hide python version if it's the same as global: 988 | # $(pyenv version-name) == $(pyenv global). 989 | typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false 990 | # If set to false, hide python version if it's equal to "system". 991 | typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true 992 | 993 | # Pyenv segment format. The following parameters are available within the expansion. 994 | # 995 | # - P9K_CONTENT Current pyenv environment (pyenv version-name). 996 | # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). 997 | # 998 | # The default format has the following logic: 999 | # 1000 | # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or 1001 | # starts with "$P9K_PYENV_PYTHON_VERSION/". 1002 | # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". 1003 | typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' 1004 | 1005 | # Custom icon. 1006 | # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1007 | 1008 | ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ 1009 | # Goenv color. 1010 | typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 1011 | typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 1012 | # Hide go version if it doesn't come from one of these sources. 1013 | typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) 1014 | # If set to false, hide go version if it's the same as global: 1015 | # $(goenv version-name) == $(goenv global). 1016 | typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false 1017 | # If set to false, hide go version if it's equal to "system". 1018 | typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true 1019 | # Custom icon. 1020 | # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1021 | 1022 | ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## 1023 | # Nodenv color. 1024 | typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 1025 | typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 1026 | # Hide node version if it doesn't come from one of these sources. 1027 | typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) 1028 | # If set to false, hide node version if it's the same as global: 1029 | # $(nodenv version-name) == $(nodenv global). 1030 | typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false 1031 | # If set to false, hide node version if it's equal to "system". 1032 | typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true 1033 | # Custom icon. 1034 | # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1035 | 1036 | ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### 1037 | # Nvm color. 1038 | typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 1039 | typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 1040 | # Custom icon. 1041 | # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1042 | 1043 | ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ 1044 | # Nodeenv color. 1045 | typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 1046 | typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 1047 | # Don't show Node version next to the environment name. 1048 | typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false 1049 | # Separate environment name from Node version only with a space. 1050 | typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= 1051 | # Custom icon. 1052 | # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1053 | 1054 | ##############################[ node_version: node.js version ]############################### 1055 | # Node version color. 1056 | typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 1057 | typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 1058 | # Show node version only when in a directory tree containing package.json. 1059 | typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true 1060 | # Custom icon. 1061 | # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1062 | 1063 | #######################[ go_version: go version (https://golang.org) ]######################## 1064 | # Go version color. 1065 | typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 1066 | typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 1067 | # Show go version only when in a go project subdirectory. 1068 | typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true 1069 | # Custom icon. 1070 | # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1071 | 1072 | #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## 1073 | # Rust version color. 1074 | typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 1075 | typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 1076 | # Show rust version only when in a rust project subdirectory. 1077 | typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true 1078 | # Custom icon. 1079 | # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1080 | 1081 | ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ 1082 | # .NET version color. 1083 | typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 1084 | typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 1085 | # Show .NET version only when in a .NET project subdirectory. 1086 | typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true 1087 | # Custom icon. 1088 | # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1089 | 1090 | #####################[ php_version: php version (https://www.php.net/) ]###################### 1091 | # PHP version color. 1092 | typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 1093 | typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 1094 | # Show PHP version only when in a PHP project subdirectory. 1095 | typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true 1096 | # Custom icon. 1097 | # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1098 | 1099 | ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### 1100 | # Laravel version color. 1101 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 1102 | typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 1103 | # Custom icon. 1104 | # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1105 | 1106 | #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## 1107 | # Rbenv color. 1108 | typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 1109 | typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 1110 | # Hide ruby version if it doesn't come from one of these sources. 1111 | typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) 1112 | # If set to false, hide ruby version if it's the same as global: 1113 | # $(rbenv version-name) == $(rbenv global). 1114 | typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false 1115 | # If set to false, hide ruby version if it's equal to "system". 1116 | typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true 1117 | # Custom icon. 1118 | # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1119 | 1120 | ####################[ java_version: java version (https://www.java.com/) ]#################### 1121 | # Java version color. 1122 | typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 1123 | typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 1124 | # Show java version only when in a java project subdirectory. 1125 | typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true 1126 | # Show brief version. 1127 | typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false 1128 | # Custom icon. 1129 | # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1130 | 1131 | ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### 1132 | # Package color. 1133 | typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 1134 | typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 1135 | 1136 | # Package format. The following parameters are available within the expansion. 1137 | # 1138 | # - P9K_PACKAGE_NAME The value of `name` field in package.json. 1139 | # - P9K_PACKAGE_VERSION The value of `version` field in package.json. 1140 | # 1141 | # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' 1142 | 1143 | # Custom icon. 1144 | # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1145 | 1146 | #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## 1147 | # Rvm color. 1148 | typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 1149 | typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 1150 | # Don't show @gemset at the end. 1151 | typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false 1152 | # Don't show ruby- at the front. 1153 | typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false 1154 | # Custom icon. 1155 | # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1156 | 1157 | ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ 1158 | # Fvm color. 1159 | typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 1160 | typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 1161 | # Custom icon. 1162 | # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' 1163 | 1164 | ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### 1165 | # Lua color. 1166 | typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 1167 | typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 1168 | # Hide lua version if it doesn't come from one of these sources. 1169 | typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) 1170 | # If set to false, hide lua version if it's the same as global: 1171 | # $(luaenv version-name) == $(luaenv global). 1172 | typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false 1173 | # If set to false, hide lua version if it's equal to "system". 1174 | typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true 1175 | # Custom icon. 1176 | # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1177 | 1178 | ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ 1179 | # Java color. 1180 | typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 1181 | typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 1182 | # Hide java version if it doesn't come from one of these sources. 1183 | typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) 1184 | # If set to false, hide java version if it's the same as global: 1185 | # $(jenv version-name) == $(jenv global). 1186 | typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false 1187 | # If set to false, hide java version if it's equal to "system". 1188 | typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true 1189 | # Custom icon. 1190 | # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1191 | 1192 | ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ 1193 | # Perl color. 1194 | typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 1195 | typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 1196 | # Hide perl version if it doesn't come from one of these sources. 1197 | typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) 1198 | # If set to false, hide perl version if it's the same as global: 1199 | # $(plenv version-name) == $(plenv global). 1200 | typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false 1201 | # If set to false, hide perl version if it's equal to "system". 1202 | typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true 1203 | # Custom icon. 1204 | # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1205 | 1206 | ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ 1207 | # Perlbrew color. 1208 | typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 1209 | # Show perlbrew version only when in a perl project subdirectory. 1210 | typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true 1211 | # Don't show "perl-" at the front. 1212 | typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false 1213 | # Custom icon. 1214 | # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' 1215 | 1216 | ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ 1217 | # PHP color. 1218 | typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 1219 | typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 1220 | # Hide php version if it doesn't come from one of these sources. 1221 | typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) 1222 | # If set to false, hide php version if it's the same as global: 1223 | # $(phpenv version-name) == $(phpenv global). 1224 | typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false 1225 | # If set to false, hide PHP version if it's equal to "system". 1226 | typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true 1227 | # Custom icon. 1228 | # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1229 | 1230 | #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### 1231 | # Scala color. 1232 | typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 1233 | typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 1234 | # Hide scala version if it doesn't come from one of these sources. 1235 | typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) 1236 | # If set to false, hide scala version if it's the same as global: 1237 | # $(scalaenv version-name) == $(scalaenv global). 1238 | typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false 1239 | # If set to false, hide scala version if it's equal to "system". 1240 | typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true 1241 | # Custom icon. 1242 | # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1243 | 1244 | ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### 1245 | # Haskell color. 1246 | typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 1247 | typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 1248 | 1249 | # Hide haskell version if it doesn't come from one of these sources. 1250 | # 1251 | # shell: version is set by STACK_YAML 1252 | # local: version is set by stack.yaml up the directory tree 1253 | # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) 1254 | typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) 1255 | # If set to false, hide haskell version if it's the same as in the implicit global project. 1256 | typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true 1257 | # Custom icon. 1258 | # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' 1259 | 1260 | ################[ terraform: terraform workspace (https://www.terraform.io) ]################# 1261 | # Don't show terraform workspace if it's literally "default". 1262 | typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false 1263 | # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element 1264 | # in each pair defines a pattern against which the current terraform workspace gets matched. 1265 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1266 | # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, 1267 | # you'll see this value in your prompt. The second element of each pair in 1268 | # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The 1269 | # first match wins. 1270 | # 1271 | # For example, given these settings: 1272 | # 1273 | # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1274 | # '*prod*' PROD 1275 | # '*test*' TEST 1276 | # '*' OTHER) 1277 | # 1278 | # If your current terraform workspace is "project_test", its class is TEST because "project_test" 1279 | # doesn't match the pattern '*prod*' but does match '*test*'. 1280 | # 1281 | # You can define different colors, icons and content expansions for different classes: 1282 | # 1283 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 1284 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0 1285 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1286 | # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1287 | typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( 1288 | # '*prod*' PROD # These values are examples that are unlikely 1289 | # '*test*' TEST # to match your needs. Customize them as needed. 1290 | '*' OTHER) 1291 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 1292 | typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 1293 | # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' 1294 | 1295 | #############[ terraform_version: terraform version (https://www.terraform.io) ]############## 1296 | # Terraform version color. 1297 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4 1298 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0 1299 | # Custom icon. 1300 | # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' 1301 | 1302 | ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# 1303 | typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' 1304 | 1305 | #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# 1306 | # Show kubecontext only when the command you are typing invokes one of these tools. 1307 | # Tip: Remove the next line to always show kubecontext. 1308 | typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold' 1309 | 1310 | # Kubernetes context classes for the purpose of using different colors, icons and expansions with 1311 | # different contexts. 1312 | # 1313 | # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element 1314 | # in each pair defines a pattern against which the current kubernetes context gets matched. 1315 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1316 | # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, 1317 | # you'll see this value in your prompt. The second element of each pair in 1318 | # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The 1319 | # first match wins. 1320 | # 1321 | # For example, given these settings: 1322 | # 1323 | # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1324 | # '*prod*' PROD 1325 | # '*test*' TEST 1326 | # '*' DEFAULT) 1327 | # 1328 | # If your current kubernetes context is "deathray-testing/default", its class is TEST 1329 | # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. 1330 | # 1331 | # You can define different colors, icons and content expansions for different classes: 1332 | # 1333 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 1334 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 1335 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1336 | # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1337 | typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( 1338 | # '*prod*' PROD # These values are examples that are unlikely 1339 | # '*test*' TEST # to match your needs. Customize them as needed. 1340 | '*' DEFAULT) 1341 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 1342 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 1343 | # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1344 | 1345 | # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext 1346 | # segment. Parameter expansions are very flexible and fast, too. See reference: 1347 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1348 | # 1349 | # Within the expansion the following parameters are always available: 1350 | # 1351 | # - P9K_CONTENT The content that would've been displayed if there was no content 1352 | # expansion defined. 1353 | # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the 1354 | # output of `kubectl config get-contexts`. 1355 | # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the 1356 | # output of `kubectl config get-contexts`. 1357 | # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE 1358 | # in the output of `kubectl config get-contexts`. If there is no 1359 | # namespace, the parameter is set to "default". 1360 | # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the 1361 | # output of `kubectl config get-contexts`. 1362 | # 1363 | # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), 1364 | # the following extra parameters are available: 1365 | # 1366 | # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". 1367 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. 1368 | # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. 1369 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. 1370 | # 1371 | # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, 1372 | # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": 1373 | # 1374 | # - P9K_KUBECONTEXT_CLOUD_NAME=gke 1375 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account 1376 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a 1377 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1378 | # 1379 | # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": 1380 | # 1381 | # - P9K_KUBECONTEXT_CLOUD_NAME=eks 1382 | # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 1383 | # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 1384 | # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 1385 | typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= 1386 | # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. 1387 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' 1388 | # Append the current context's namespace if it's not "default". 1389 | POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' 1390 | 1391 | # Custom prefix. 1392 | # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' 1393 | 1394 | #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# 1395 | # Show aws only when the command you are typing invokes one of these tools. 1396 | # Tip: Remove the next line to always show aws. 1397 | typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' 1398 | 1399 | # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element 1400 | # in each pair defines a pattern against which the current AWS profile gets matched. 1401 | # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) 1402 | # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, 1403 | # you'll see this value in your prompt. The second element of each pair in 1404 | # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The 1405 | # first match wins. 1406 | # 1407 | # For example, given these settings: 1408 | # 1409 | # typeset -g POWERLEVEL9K_AWS_CLASSES=( 1410 | # '*prod*' PROD 1411 | # '*test*' TEST 1412 | # '*' DEFAULT) 1413 | # 1414 | # If your current AWS profile is "company_test", its class is TEST 1415 | # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. 1416 | # 1417 | # You can define different colors, icons and content expansions for different classes: 1418 | # 1419 | # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 1420 | # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1421 | # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' 1422 | typeset -g POWERLEVEL9K_AWS_CLASSES=( 1423 | # '*prod*' PROD # These values are examples that are unlikely 1424 | # '*test*' TEST # to match your needs. Customize them as needed. 1425 | '*' DEFAULT) 1426 | typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 1427 | typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 1428 | # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1429 | 1430 | # AWS segment format. The following parameters are available within the expansion. 1431 | # 1432 | # - P9K_AWS_PROFILE The name of the current AWS profile. 1433 | # - P9K_AWS_REGION The region associated with the current AWS profile. 1434 | typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' 1435 | 1436 | #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# 1437 | # AWS Elastic Beanstalk environment color. 1438 | typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 1439 | typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 1440 | # Custom icon. 1441 | # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' 1442 | 1443 | ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## 1444 | # Show azure only when the command you are typing invokes one of these tools. 1445 | # Tip: Remove the next line to always show azure. 1446 | typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' 1447 | # Azure account name color. 1448 | typeset -g POWERLEVEL9K_AZURE_FOREGROUND=7 1449 | typeset -g POWERLEVEL9K_AZURE_BACKGROUND=4 1450 | # Custom icon. 1451 | # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1452 | 1453 | ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### 1454 | # Show gcloud only when the command you are typing invokes one of these tools. 1455 | # Tip: Remove the next line to always show gcloud. 1456 | typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' 1457 | # Google cloud color. 1458 | typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 1459 | typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 1460 | 1461 | # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or 1462 | # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative 1463 | # enough. You can use the following parameters in the expansions. Each of them corresponds to the 1464 | # output of `gcloud` tool. 1465 | # 1466 | # Parameter | Source 1467 | # -------------------------|-------------------------------------------------------------------- 1468 | # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' 1469 | # P9K_GCLOUD_ACCOUNT | gcloud config get-value account 1470 | # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project 1471 | # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' 1472 | # 1473 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. 1474 | # 1475 | # Obtaining project name requires sending a request to Google servers. This can take a long time 1476 | # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud 1477 | # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets 1478 | # set and gcloud prompt segment transitions to state COMPLETE. 1479 | # 1480 | # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL 1481 | # and COMPLETE. You can also hide gcloud in state PARTIAL by setting 1482 | # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and 1483 | # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. 1484 | typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' 1485 | typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' 1486 | 1487 | # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name 1488 | # this often. Negative value disables periodic polling. In this mode project name is retrieved 1489 | # only when the current configuration, account or project id changes. 1490 | typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 1491 | 1492 | # Custom icon. 1493 | # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' 1494 | 1495 | #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# 1496 | # Show google_app_cred only when the command you are typing invokes one of these tools. 1497 | # Tip: Remove the next line to always show google_app_cred. 1498 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' 1499 | 1500 | # Google application credentials classes for the purpose of using different colors, icons and 1501 | # expansions with different credentials. 1502 | # 1503 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first 1504 | # element in each pair defines a pattern against which the current kubernetes context gets 1505 | # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion 1506 | # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION 1507 | # parameters, you'll see this value in your prompt. The second element of each pair in 1508 | # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. 1509 | # The first match wins. 1510 | # 1511 | # For example, given these settings: 1512 | # 1513 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1514 | # '*:*prod*:*' PROD 1515 | # '*:*test*:*' TEST 1516 | # '*' DEFAULT) 1517 | # 1518 | # If your current Google application credentials is "service_account deathray-testing x@y.com", 1519 | # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. 1520 | # 1521 | # You can define different colors, icons and content expansions for different classes: 1522 | # 1523 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 1524 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' 1525 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' 1526 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( 1527 | # '*:*prod*:*' PROD # These values are examples that are unlikely 1528 | # '*:*test*:*' TEST # to match your needs. Customize them as needed. 1529 | '*' DEFAULT) 1530 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 1531 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 1532 | # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' 1533 | 1534 | # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by 1535 | # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: 1536 | # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. 1537 | # 1538 | # You can use the following parameters in the expansion. Each of them corresponds to one of the 1539 | # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. 1540 | # 1541 | # Parameter | JSON key file field 1542 | # ---------------------------------+--------------- 1543 | # P9K_GOOGLE_APP_CRED_TYPE | type 1544 | # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id 1545 | # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email 1546 | # 1547 | # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. 1548 | typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' 1549 | 1550 | ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### 1551 | # Toolbox color. 1552 | typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0 1553 | typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3 1554 | # Don't display the name of the toolbox if it matches fedora-toolbox-*. 1555 | typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' 1556 | # Custom icon. 1557 | # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' 1558 | # Custom prefix. 1559 | # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' 1560 | 1561 | ###############################[ public_ip: public IP address ]############################### 1562 | # Public IP color. 1563 | typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 1564 | typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 1565 | # Custom icon. 1566 | # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1567 | 1568 | ########################[ vpn_ip: virtual private network indicator ]######################### 1569 | # VPN IP color. 1570 | typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 1571 | typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 1572 | # When on VPN, show just an icon without the IP address. 1573 | # Tip: To display the private IP address when on VPN, remove the next line. 1574 | typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= 1575 | # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN 1576 | # to see the name of the interface. 1577 | typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*' 1578 | # If set to true, show one segment per matching network interface. If set to false, show only 1579 | # one segment corresponding to the first matching network interface. 1580 | # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. 1581 | typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false 1582 | # Custom icon. 1583 | # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1584 | 1585 | ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### 1586 | # IP color. 1587 | typeset -g POWERLEVEL9K_IP_BACKGROUND=4 1588 | typeset -g POWERLEVEL9K_IP_FOREGROUND=0 1589 | # The following parameters are accessible within the expansion: 1590 | # 1591 | # Parameter | Meaning 1592 | # ----------------------+------------------------------------------- 1593 | # P9K_IP_IP | IP address 1594 | # P9K_IP_INTERFACE | network interface 1595 | # P9K_IP_RX_BYTES | total number of bytes received 1596 | # P9K_IP_TX_BYTES | total number of bytes sent 1597 | # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt 1598 | # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt 1599 | # P9K_IP_RX_RATE | receive rate (since last prompt) 1600 | # P9K_IP_TX_RATE | send rate (since last prompt) 1601 | 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' 1602 | # Show information for the first network interface whose name matches this regular expression. 1603 | # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. 1604 | typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' 1605 | # Custom icon. 1606 | # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' 1607 | 1608 | #########################[ proxy: system-wide http/https/ftp proxy ]########################## 1609 | # Proxy color. 1610 | typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 1611 | typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 1612 | # Custom icon. 1613 | # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' 1614 | 1615 | ################################[ battery: internal battery ]################################# 1616 | # Show battery in red when it's below this level and not connected to power supply. 1617 | typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 1618 | typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 1619 | # Show battery in green when it's charging or fully charged. 1620 | typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 1621 | # Show battery in yellow when it's discharging. 1622 | typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 1623 | # Battery pictograms going from low to high level of charge. 1624 | typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' 1625 | # Don't show the remaining time to charge/discharge. 1626 | typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false 1627 | typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 1628 | 1629 | #####################################[ wifi: wifi speed ]##################################### 1630 | # WiFi color. 1631 | typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 1632 | typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 1633 | # Custom icon. 1634 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' 1635 | 1636 | # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). 1637 | # 1638 | # # Wifi colors and icons for different signal strength levels (low to high). 1639 | # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values 1640 | # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values 1641 | # 1642 | # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' 1643 | # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' 1644 | # 1645 | # The following parameters are accessible within the expansions: 1646 | # 1647 | # Parameter | Meaning 1648 | # ----------------------+--------------- 1649 | # P9K_WIFI_SSID | service set identifier, a.k.a. network name 1650 | # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown 1651 | # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second 1652 | # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 1653 | # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 1654 | # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) 1655 | 1656 | ####################################[ time: current time ]#################################### 1657 | # Current time color. 1658 | typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 1659 | typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 1660 | # Format for the current time: 09:51:02. See `man 3 strftime`. 1661 | typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' 1662 | # If set to true, time will update when you hit enter. This way prompts for the past 1663 | # commands will contain the start times of their commands as opposed to the default 1664 | # behavior where they contain the end times of their preceding commands. 1665 | typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false 1666 | # Custom icon. 1667 | typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION= 1668 | # Custom prefix. 1669 | # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' 1670 | 1671 | # Example of a user-defined prompt segment. Function prompt_example will be called on every 1672 | # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or 1673 | # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background 1674 | # greeting the user. 1675 | # 1676 | # Type `p10k help segment` for documentation and a more sophisticated example. 1677 | function prompt_example() { 1678 | p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' 1679 | } 1680 | 1681 | # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job 1682 | # is to generate the prompt segment for display in instant prompt. See 1683 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1684 | # 1685 | # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function 1686 | # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k 1687 | # will replay these calls without actually calling instant_prompt_*. It is imperative that 1688 | # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this 1689 | # rule is not observed, the content of instant prompt will be incorrect. 1690 | # 1691 | # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If 1692 | # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. 1693 | function instant_prompt_example() { 1694 | # Since prompt_example always makes the same `p10k segment` calls, we can call it from 1695 | # instant_prompt_example. This will give us the same `example` prompt segment in the instant 1696 | # and regular prompts. 1697 | prompt_example 1698 | } 1699 | 1700 | # User-defined prompt segments can be customized the same way as built-in segments. 1701 | typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 1702 | typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1 1703 | # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' 1704 | 1705 | # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt 1706 | # when accepting a command line. Supported values: 1707 | # 1708 | # - off: Don't change prompt when accepting a command line. 1709 | # - always: Trim down prompt when accepting a command line. 1710 | # - same-dir: Trim down prompt when accepting a command line unless this is the first command 1711 | # typed after changing current working directory. 1712 | typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off 1713 | 1714 | # Instant prompt mode. 1715 | # 1716 | # - off: Disable instant prompt. Choose this if you've tried instant prompt and found 1717 | # it incompatible with your zsh configuration files. 1718 | # - quiet: Enable instant prompt and don't print warnings when detecting console output 1719 | # during zsh initialization. Choose this if you've read and understood 1720 | # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. 1721 | # - verbose: Enable instant prompt and print a warning when detecting console output during 1722 | # zsh initialization. Choose this if you've never tried instant prompt, haven't 1723 | # seen the warning, or if you are unsure what this all means. 1724 | typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet 1725 | 1726 | # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. 1727 | # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload 1728 | # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you 1729 | # really need it. 1730 | typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true 1731 | 1732 | # If p10k is already loaded, reload configuration. 1733 | # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. 1734 | (( ! $+functions[p10k] )) || p10k reload 1735 | } 1736 | 1737 | # Tell `p10k configure` which file it should overwrite. 1738 | typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} 1739 | 1740 | (( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} 1741 | 'builtin' 'unset' 'p10k_config_opts' 1742 | -------------------------------------------------------------------------------- /dotfile_configure.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Linux 3 | # 4 | configure_linux() { 5 | echo "Configure for Linux..." 6 | 7 | echo "== Install Dependencies (Linux) ==" 8 | install_dependencies() { 9 | sudo apt-get install -y \ 10 | bat \ 11 | ttf-ancient-fonts \ 12 | dconf-cli \ 13 | python-pip \ 14 | python3 \ 15 | python3-pip \ 16 | vim 17 | 18 | echo "Install NVM" 19 | curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh" | sh 20 | [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" 21 | 22 | sudo pip install --upgrade pip 23 | sudo pip3 install --upgrade pip 24 | sudo pip3 install thefuck 25 | } ; install_dependencies 26 | 27 | echo "== Move assets (Linux) ==" 28 | move_assets() { 29 | echo "Moving assets..." 30 | mkdir -p "$HOME/.fonts" 31 | cp -r "$DOTFILES/common/assets/fonts/." "$HOME/.fonts" 32 | echo "Finished moving assets." 33 | } ; move_assets 34 | 35 | echo "== Configure Gnome Terminal (Linux) ==" 36 | configure_gnome_terminal() { 37 | echo "Configuring gnome-terminal..." 38 | profile=$(gsettings get org.gnome.Terminal.ProfilesList default) 39 | profile=${profile:1:-1} 40 | schema="org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/" 41 | schemapath="$schema:$profile/" 42 | 43 | palette=( 44 | "'#000000'", # normal black 45 | "'#b71800'", # normal red 46 | "'#C6B85B'", # normal green 47 | "'#ffd42b'", # normal yellow 48 | "'#46ace2'", # normal blue 49 | "'#ca30c7'", # normal magenta 50 | "'#00c5c7'", # normal cyan 51 | "'#c7c7c7'", # normal white 52 | "'#686868'", # bright gray 53 | "'#ff2600'", # bright red 54 | "'#a2cf76'", # bright green 55 | "'#fff786'", # bright yellow 56 | "'#afdfff'", # bright blue 57 | "'#ff77ff'", # bright magenta 58 | "'#60fdff'", # bright cyan 59 | "'#ffffff'" # bright white 60 | ) 61 | palette="[$(printf "%s" "${palette[@]}")]" # join and surround in [] 62 | 63 | gsettings set $schemapath palette $palette 64 | gsettings set $schemapath background-color "#353f42" 65 | gsettings set $schemapath foreground-color "#d6d6d6" 66 | gsettings set $schemapath bold-color "#ffffff" 67 | gsettings set $schemapath allow-bold "true" 68 | gsettings set $schemapath use-transparent-background "false" 69 | gsettings set $schemapath use-theme-transparency 'false' # don't use default system theme transparency 70 | gsettings set $schemapath font "'MesloLGS NF 10'" 71 | gsettings set $schemapath use-system-font "false" 72 | gsettings set $schemapath bold-color-same-as-fg "false" 73 | gsettings set $schemapath rewrap-on-resize "true" 74 | gsettings set $schemapath use-theme-colors "false" # don't use default system theme colors 75 | gsettings set $schemapath visible-name "bogdan (dotfiles)" 76 | gsettings set $schemapath cursor-shape "underline" 77 | gsettings set $schemapath encoding "'UTF-8'" 78 | gsettings set $schemapath scrollback-unlimited "false" 79 | gsettings set $schemapath scrollback-lines 10000 80 | gsettings set $schemapath use-custom-command "true" 81 | gsettings set $schemapath custom-command "'/usr/bin/zsh'" 82 | gsettings set $schemapath login-shell "false" 83 | gsettings set $schemapath exit-action "close" 84 | 85 | echo "Finished configuring gnome-terminal." 86 | } ; configure_gnome_terminal 87 | 88 | echo "Liinux configuration complete. Please restart your terminal session." 89 | } ; 90 | 91 | # 92 | # macOS 93 | # 94 | configure_macos() { 95 | echo "Configure for macOS..." 96 | 97 | echo "== Configure Settings (macOS) ==" 98 | configure_settings() { 99 | echo "Configure macOS settings" 100 | sh ./macos/.macos 101 | } ; configure_settings 102 | 103 | echo "== Install Dependencies (macOS) ==" 104 | install_dependencies() { 105 | which -s brew 106 | if [[ $? != 0 ]] ; then 107 | echo "Install Homebrew" 108 | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 109 | else 110 | echo "Update Homebrew" 111 | brew update 112 | fi 113 | 114 | brew install mas 115 | mas account 116 | if [[ $? != 0 ]] ; then 117 | echo "Please sign in to the App Store" 118 | exit 1 119 | fi 120 | 121 | echo "Install from Brewfile" 122 | ln -s -f $DOTFILES/macos/homebrew/.Brewfile $HOME 123 | yes | brew bundle install --global 124 | 125 | echo "Install GVM" 126 | curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer | sh 127 | 128 | echo "Install nvm" 129 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | sh 130 | [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" 131 | } ; install_dependencies 132 | 133 | echo "== Change default shell to zsh (macOS) ==" 134 | change_shell() { 135 | # append homebrew zsh to /etc/shells 136 | ZSHPATH='/usr/local/bin/zsh' 137 | sudo grep -xq $ZSHPATH /etc/shells || echo $ZSHPATH | sudo tee -a /etc/shells 138 | ln -s -f $ZSHPATH /bin/zsh 139 | chsh -s /usr/local/bin/zsh 140 | } ; change_shell 141 | 142 | echo "== Configure iTerm (macOS) ==" 143 | configure_iterm() { 144 | curl -L https://iterm2.com/shell_integration/zsh -o "$HOME/.iterm2_shell_integration.zsh" 145 | } ; configure_iterm 146 | 147 | echo "== Move assets (macOS) ==" 148 | move_assets() { 149 | cp "$DOTFILES/common/assets/Meslo LG M DZ Regular for Powerline.otf" "$HOME/Library/Fonts" 150 | } ; move_assets 151 | } ; 152 | 153 | # 154 | # General 155 | # 156 | configure() { 157 | echo "== Symlink (general) ==" 158 | symlink() { 159 | ln -s -f $DOTFILES/common/zsh/.zshrc $HOME 160 | ln -s -f $DOTFILES/common/zsh/.zshenv $HOME 161 | ln -s -f $DOTFILES/common/git/.gitconfig $HOME 162 | ln -s -f $DOTFILES/common/git/.gitignore_global $HOME 163 | ln -s -f $DOTFILES/common/vim/.vimrc $HOME 164 | ln -s -f $DOTFILES/common/tmux/.tmux.conf.local $HOME 165 | ln -s -f $DOTFILES/common/npm/.npmrc $HOME 166 | ln -s -f $DOTFILES/common/eslint/.eslintrc $HOME 167 | ln -s -f $DOTFILES/external/gpakosz_tmux/.tmux.conf $HOME 168 | } ; symlink 169 | 170 | echo "osid: $BOGDAN_OSID" 171 | case "$BOGDAN_OSID" in 172 | linux*) configure_linux;; 173 | macos*) configure_macos;; 174 | esac 175 | 176 | echo "== Install Dependencies (general) ==" 177 | install_dependencies() { 178 | echo "Install global npm packages" 179 | $DOTFILES/common/npm/install-global-npm.sh 180 | } ; install_dependencies 181 | 182 | echo "√√ Configuration complete √√" 183 | } 184 | 185 | # 186 | # -- execute -- 187 | source ./common/zsh/.zshenv && configure 188 | -------------------------------------------------------------------------------- /linux/aliases/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | alias open="xdg-open" 3 | alias vs="code" 4 | 5 | # Copy & paste to/from general clipboard 6 | alias xc="xclip -selection clipboard" 7 | alias xp="xclip -o -selection clipboard" 8 | 9 | alias ctop="docker run --rm -ti --name=ctop --volume /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop:latest" -------------------------------------------------------------------------------- /linux/bin/gui: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Open a GUI application in the background, disown, and divert logs to common location. 3 | # Accomplished through nohup command: 4 | 5 | # Fix problem so Wayland/GUI apps can run as root 6 | # (for apps that don't properly request permission escalation in some instances) 7 | # see: https://github.com/unetbootin/unetbootin/issues/194#issuecomment-433417580 8 | if (( $EUID == 0 )); then 9 | export QT_X11_NO_MITSHM=1 10 | fi 11 | 12 | nohup $1 > "/var/log/bogscripts/$1-$USER.nohup.log" 2> "/var/log/bogscripts/$1-$USER.nohup.err" & -------------------------------------------------------------------------------- /linux/bin/toggle-zeal: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Toggle zeal, by closing if open or opening if closed 3 | # For recreating shortcut functionality through Gnome Keyboard Shortcuts 4 | # https://github.com/zealdocs/zeal/issues/1249#issuecomment-903054600 5 | 6 | zeal_pid=$(pgrep -x zeal) 7 | 8 | if [[ -n "$zeal_pid" ]]; then 9 | kill -9 $zeal_pid 10 | else 11 | zeal -qwindowgeometry 1000x1000+200+200 & 12 | fi 13 | -------------------------------------------------------------------------------- /linux/dnf/global_packages.txt: -------------------------------------------------------------------------------- 1 | direnv 2 | acpid # power lid close detection -------------------------------------------------------------------------------- /linux/etc/acpi/actions/laptop-lid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # from https://serverfault.com/a/310104 4 | addtimestamp() { 5 | while IFS= read -r line; do 6 | printf '%s: %s\n' "$(date)" "$line"; 7 | done 8 | } 9 | 10 | # from https://unix.stackexchange.com/a/678610 11 | lock=$HOME/fprint-disabled 12 | msg="" 13 | { 14 | if grep -Fq closed /proc/acpi/button/lid/LID0/state 15 | then 16 | touch "$lock" 17 | systemctl stop fprintd 18 | systemctl mask fprintd 19 | msg="stopped fprint" 20 | elif [ -f "$lock" ] 21 | then 22 | systemctl unmask fprintd 23 | systemctl start fprintd 24 | rm "$lock" 25 | msg="started fprint" 26 | else 27 | msg="did nothing (state not matched)" 28 | fi 29 | echo $msg 30 | } | addtimestamp &>> /var/log/laptop-lid.log 31 | -------------------------------------------------------------------------------- /linux/etc/acpi/events/laptop-lid: -------------------------------------------------------------------------------- 1 | event=button/lid.* 2 | action=/etc/acpi/actions/laptop-lid.sh 3 | -------------------------------------------------------------------------------- /linux/etc/dnf/dnf.conf: -------------------------------------------------------------------------------- 1 | # see `man dnf.conf` for defaults and possible options 2 | 3 | [main] 4 | gpgcheck=True 5 | installonly_limit=3 6 | clean_requirements_on_remove=True 7 | best=False 8 | skip_if_unavailable=True 9 | max_parallel_downloads=10 10 | deltarpm=false 11 | keepcache=true 12 | check_config_file_age=False 13 | metadata_expire=1 -------------------------------------------------------------------------------- /linux/etc/sudoers.d/bogdan-sudo-rules: -------------------------------------------------------------------------------- 1 | Defaults timestamp_timeout=30 2 | -------------------------------------------------------------------------------- /linux/etc/systemd/system/laptop-lid.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Laptop Lid 3 | After=suspend.target 4 | 5 | [Service] 6 | ExecStart=/etc/acpi/laptop-lid.sh 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | WantedBy=suspend.target 11 | -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/README.md: -------------------------------------------------------------------------------- 1 | This is a gnome extension that will allow you to toggle an app using a keyboard shortcut. 2 | 3 | To install the extension: 4 | 1. Symlink folder into `~/.local/share/gnome-shell/extensions/` 5 | 2. Enable the extension: `gnome-extensions enable app-toggler@bogdanvitoc.com` 6 | 3. View logs: `journalctl -f -o cat /usr/bin/gnome-shell` 7 | 8 | To add a new app: 9 | 1. Place the `wmclass` for the app in the Apps array in `extension.js`. 10 | 2. Configure a new keybinding for the app in `schemas/org.gnome.shell.extensions.app-toggler.gschema.xml` 11 | 3. Compile the schema: `glib-compile-schemas schemas/` 12 | 4. Restart x11/wayland 13 | 14 | Documentation: 15 | - GJS reference: https://gjs-docs.gnome.org 16 | - Gnome extensions: https://gjs.guide/extensions/overview/architecture.html#clutter-and-st 17 | - Keybindings: https://github.com/gTile/gTile/blob/14de1786818e56aa797229ebcece861360276134/app.ts 18 | - Workspace stuff: https://github.com/satran/fullscreenworkspace-satran.in/blob/master/extension.js -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/extension.js: -------------------------------------------------------------------------------- 1 | const Main = imports.ui.main; 2 | const Shell = imports.gi.Shell; 3 | const ExtensionUtils = imports.misc.extensionUtils; 4 | 5 | // Extension imports 6 | // docs: https://gjs.guide/extensions/overview/imports-and-modules.html 7 | const Me = ExtensionUtils.getCurrentExtension(); 8 | const Keybinder = Me.imports.keybinder; 9 | const log = Me.imports.logging.log; 10 | 11 | // Add apps you want to toggle here simply via their wmclass. 12 | // Find it in the corresponding .desktop file or via looking glass. 13 | // Then configure the keybinding in the settings schema. 14 | const Apps = ["Zeal"]; 15 | 16 | const Keybindings = Apps.map(wmclass => ({ 17 | key: `toggle-${wmclass.toLowerCase()}`, 18 | callback: () => toggleApp(wmclass), 19 | })); 20 | 21 | 22 | function init() {} 23 | 24 | function enable() { 25 | log("extension enable begin"); 26 | 27 | Keybinder.bind(Keybindings); 28 | 29 | log("extension enable complete"); 30 | } 31 | 32 | 33 | function disable() { 34 | log("extension disable begin"); 35 | 36 | Keybinder.unbind(Keybindings); 37 | 38 | log("extension disable complete"); 39 | } 40 | 41 | toggleApp = (wmclass) => { 42 | const appWindow = global.get_window_actors() 43 | .map(wa => wa.meta_window) 44 | .find(w => w.wm_class.toLowerCase().includes(wmclass.toLowerCase())); 45 | 46 | // Launch app if window not open 47 | if (!appWindow) { 48 | Shell.AppSystem.get_default().lookup_startup_wmclass(wmclass).activate(); 49 | } 50 | 51 | // Focus app if running but not focused 52 | else if (!appWindow.appears_focused) { 53 | const activeWorkspace = global.workspace_manager.get_active_workspace_index(); 54 | appWindow.change_workspace_by_index(activeWorkspace, true); 55 | Main.activateWindow(appWindow); 56 | } 57 | 58 | // Otherwise minimize app if focused 59 | // log(`appWindow.appears_focused: ${appWindow.appears_focused}`) 60 | else { 61 | appWindow.minimize(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/keybinder.js: -------------------------------------------------------------------------------- 1 | // This file adapted from gTile 2 | // https://github.com/gTile/gTile/blob/14de1786818e56aa797229ebcece861360276134/hotkeys.ts 3 | 4 | // Library imports 5 | const Main = imports.ui.main; 6 | const Meta = imports.gi.Meta; 7 | const Shell = imports.gi.Shell; 8 | const ExtensionUtils = imports.misc.extensionUtils; 9 | 10 | // Extension imports 11 | const Me = imports.misc.extensionUtils.getCurrentExtension(); 12 | const log = Me.imports.logging.log; 13 | 14 | let mySettings = ExtensionUtils.getSettings("org.gnome.shell.extensions.app-toggler"); 15 | 16 | 17 | function bind(keyBindings) { 18 | log("Binding keys"); 19 | 20 | keyBindings.forEach(({ key, callback }) => { 21 | if (Main.wm.addKeybinding && Shell.ActionMode) { // introduced in 3.16 22 | const args = [key, 23 | mySettings, 24 | Meta.KeyBindingFlags.NONE, 25 | Shell.ActionMode.NORMAL, 26 | callback]; 27 | Main.wm.addKeybinding(...args); 28 | } 29 | else if (Main.wm.addKeybinding && Shell.KeyBindingMode) { // introduced in 3.7.5 30 | Main.wm.addKeybinding( 31 | key, 32 | mySettings, 33 | Meta.KeyBindingFlags.NONE, 34 | Shell.KeyBindingMode.NORMAL | Shell.KeyBindingMode.MESSAGE_TRAY, 35 | callback 36 | ); 37 | } 38 | else { 39 | global.display.add_keybinding( 40 | key, 41 | mySettings, 42 | Meta.KeyBindingFlags.NONE, 43 | callback 44 | ); 45 | } 46 | }); 47 | } 48 | 49 | function unbind(keyBindings) { 50 | log("Unbinding keys"); 51 | keyBindings.forEach(({ key }) => { 52 | if (Main.wm.removeKeybinding) { // introduced in 3.7.2 53 | Main.wm.removeKeybinding(key); 54 | } 55 | else { 56 | global.display.remove_keybinding(key); 57 | } 58 | }) 59 | } -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/logging.js: -------------------------------------------------------------------------------- 1 | let debug = true; 2 | 3 | /** 4 | * If called with a false argument, log statements are suppressed. 5 | */ 6 | function setLoggingEnabled(enabled) { 7 | debug = enabled; 8 | } 9 | 10 | /** 11 | * Log logs the given message using the gnome shell logger (global.log) if the 12 | * debug variable is set to true. 13 | * 14 | * Debug messages may be viewed using the bash command `journalctl 15 | * /usr/bin/gnome-shell` and grepping the results for 'toggler'. 16 | */ 17 | function log(message) { 18 | if(debug) { 19 | global.log("app-toggler: " + message); 20 | } 21 | } -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App Toggler", 3 | "description": "App Toggler (hide/show or launch if not running)", 4 | "uuid": "app-toggler@bogdanvitoc.com", 5 | "shell-version": [ 6 | "41", 7 | "42" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/schemas/gschemas.compiled: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bogidon/dotfiles/8d6137a6957b18088a968aa154473322c8655385/linux/gnome/extensions/app-toggler@bogdanvitoc.com/schemas/gschemas.compiled -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/schemas/org.gnome.shell.extensions.app-toggler.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Space']]]> 7 | The key to toggle Zeal. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /linux/gnome/extensions/app-toggler@bogdanvitoc.com/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Add your custom extension styling here */ 2 | -------------------------------------------------------------------------------- /linux/gtile/gtile.conf: -------------------------------------------------------------------------------- 1 | [/] 2 | insets-primary-bottom=3 3 | insets-secondary-bottom=3 4 | preset-resize-1=['l'] 5 | preset-resize-2=['apostrophe'] 6 | preset-resize-3=['p'] 7 | preset-resize-4=['semicolon'] 8 | preset-resize-5=['bracketleft'] 9 | preset-resize-6=['p'] 10 | preset-resize-7=['semicolon'] 11 | preset-resize-8=['bracketleft'] 12 | preset-resize-9=['apostrophe'] 13 | resize1='8x8 1:1 5:8, 1:1 4:8, 1:1 3:8' 14 | resize2='8x8 4:1 8:8, 5:1 8:8, 6:1 8:8' 15 | resize3='8x8 1:1 8:5, 1:1 8:4, 1:1 8:3' 16 | resize4='8x8 1:4 8:8, 1:5 8:8, 1:6 8:8' 17 | resize5='16x16 1:1 16:16, 2:2 15:15, 3:3 14:14, 4:4 13:13' 18 | resize6='8x8 1:1 5:4, 1:1 5:5, 1:1 5:6, 1:1 5:7' 19 | resize7='8x8 1:5 5:8, 1:4 5:8, 1:3 5:8, 1:2 5:8' 20 | resize8='8x8 4:1 8:4, 4:1 8:5, 4:1 8:6, 4:1 8:7' 21 | resize9='8x8 4:5 8:8, 4:4 8:8, 4:3 8:8, 4:2 8:8' 22 | show-icon=true 23 | show-toggle-tiling=['space'] 24 | target-presets-to-monitor-of-mouse=false 25 | theme='Default' 26 | -------------------------------------------------------------------------------- /linux/proton/aoe2de_mpfix: -------------------------------------------------------------------------------- 1 | ../../external/ardba_proton_aoe2de_mpfix/ -------------------------------------------------------------------------------- /linux/vdirsyncer/config: -------------------------------------------------------------------------------- 1 | [general] 2 | status_path = "~/.vdirsyncer/status/" 3 | 4 | ; PAIR 5 | 6 | [pair co_fastmail_primary] 7 | a = "fastmail_primary" 8 | b = "co_google" 9 | conflict_resolution = "a wins" 10 | partial_sync = "ignore" 11 | collections = [["fastmail_primary", null, "bogdan@clevelandowns.coop"]] 12 | 13 | [pair co_fastmail_primary_private] 14 | a = "fastmail_primary_private" 15 | b = "co_google" 16 | conflict_resolution = "a wins" 17 | partial_sync = "ignore" 18 | collections = [["fastmail_primary_private", null, "bogdan@clevelandowns.coop"]] 19 | 20 | ; [pair co_events] 21 | ; a = "fastmail_events" 22 | ; b = "co_google" 23 | ; conflict_resolution = "a wins" 24 | ; partial_sync = "ignore" 25 | ; collections = [["fastmail_events", null, "bogdan@clevelandowns.coop"]] 26 | 27 | [pair co_plan] 28 | a = "fastmail_plan" 29 | b = "co_google" 30 | conflict_resolution = "a wins" 31 | partial_sync = "ignore" 32 | collections = [["fastmail_plan", null, "bogdan@clevelandowns.coop"]] 33 | 34 | [pair co_body] 35 | a = "fastmail_body" 36 | b = "co_google" 37 | conflict_resolution = "a wins" 38 | partial_sync = "ignore" 39 | collections = [["fastmail_body", null, "bogdan@clevelandowns.coop"]] 40 | 41 | ; STORAGE 42 | 43 | [storage fastmail_primary] 44 | type = "http" 45 | read_only = true 46 | 47 | 48 | [storage fastmail_primary_private] 49 | type = "http" 50 | read_only = true 51 | 52 | 53 | [storage fastmail_events] 54 | type = "http" 55 | read_only = true 56 | 57 | 58 | [storage fastmail_plan] 59 | type = "http" 60 | read_only = true 61 | 62 | 63 | [storage fastmail_body] 64 | type = "http" 65 | read_only = true 66 | 67 | [storage co_google] 68 | type = "google_calendar" 69 | token_file = "~/.vdirsyncer/google_auth" 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /linux/zsh/.zshenv_linux: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # Custom path 4 | export PATH=$(echo " 5 | $PATH 6 | :$HOME/.local/bin 7 | :/usr/local/go/bin 8 | " | tr -d '\n') # remove newlines 9 | -------------------------------------------------------------------------------- /linux/zsh/.zshrc_linux: -------------------------------------------------------------------------------- 1 | # shell envs 2 | EDITOR=vim 3 | -------------------------------------------------------------------------------- /macos/.macos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # credits to: https://mths.be/macos 4 | # <3 5 | 6 | # Close any open System Preferences panes, to prevent them from overriding 7 | # settings we’re about to change 8 | osascript -e 'tell application "System Preferences" to quit' 9 | 10 | # Ask for the administrator password upfront 11 | sudo -v 12 | 13 | # Keep-alive: update existing `sudo` time stamp until `.macos` has finished 14 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 15 | 16 | ############################################################################### 17 | # General UI/UX # 18 | ############################################################################### 19 | 20 | # Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window 21 | sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName 22 | 23 | # Automatically quit printer app once the print jobs complete 24 | defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true 25 | 26 | # Disable Resume system-wide 27 | defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false 28 | 29 | # Visualize CPU usage in the Activity Monitor Dock icon 30 | defaults write com.apple.ActivityMonitor IconType -int 5 31 | 32 | # Menu bar 33 | defaults write com.apple.systemuiserver menuExtras -array \ 34 | "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ 35 | "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ 36 | "/System/Library/CoreServices/Menu Extras/Clock.menu" \ 37 | "/System/Library/CoreServices/Menu Extras/Displays.menu" \ 38 | "/System/Library/CoreServices/Menu Extras/Volume.menu" 39 | defaults write com.apple.menuextra.battery ShowPercent YES # Show battery percentage 40 | defaults write com.apple.menuextra.clock IsAnalog 1 # Make clock analog 41 | 42 | # Set default file handlers 43 | defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add \ 44 | '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}' 45 | 46 | # Prevent Photos from opening automatically when devices are plugged in 47 | defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true 48 | 49 | # Disable Dashboard 50 | defaults write com.apple.dashboard mcx-disabled -bool true 51 | 52 | # Disabled desktop 53 | defaults write com.apple.finder CreateDesktop -bool false 54 | 55 | # Disable the “Are you sure you want to open this application?” dialog 56 | defaults write com.apple.LaunchServices LSQuarantine -bool false 57 | 58 | # Disabled Siri 59 | defaults write com.apple.Siri StatusMenuVisible -bool false 60 | defaults write com.apple.Siri UserHasDeclinedEnable -bool true 61 | defaults write com.apple.assistant.support 'Assistant Enabled' 0 62 | defaults write com.apple.SetupAssistant "DidSeeSiriSetup" -bool true 63 | 64 | # Set highlight color to green 65 | defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" 66 | 67 | # Save to disk (not to iCloud) by default 68 | defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false 69 | 70 | # Disable automatic termination of inactive apps 71 | defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true 72 | 73 | # Disable auto formatting that is annoying when typing code 74 | defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false 75 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 76 | defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false 77 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 78 | 79 | # Increase window resize speed for Cocoa applications 80 | defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 81 | 82 | ############################################################################### 83 | # Trackpad, keyboard, accessories # 84 | ############################################################################### 85 | 86 | # Trackpad: enable tap to click for this user and for the login screen 87 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true 88 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 89 | defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 90 | 91 | # Trackpad: three finger drag 92 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true 93 | defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true 94 | 95 | # Disable press-and-hold for keys in favor of key repeat 96 | defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false 97 | 98 | # Set a blazingly fast keyboard repeat rate 99 | defaults write NSGlobalDomain KeyRepeat -int 1 100 | defaults write NSGlobalDomain InitialKeyRepeat -int 15 101 | 102 | # Increase sound quality for Bluetooth devices 103 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 104 | 105 | # Enable full keyboard access for all controls 106 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 107 | 108 | # Show language menu in the top right corner of the boot screen 109 | sudo defaults write /Library/Preferences/com.apple.loginwindow showInputMenu -bool true 110 | 111 | ############################################################################### 112 | # Screen # 113 | ############################################################################### 114 | 115 | # Enable subpixel font rendering on non-Apple LCDs 116 | # Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 117 | defaults write NSGlobalDomain AppleFontSmoothing -int 1 118 | 119 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) 120 | defaults write com.apple.screencapture type -string "png" 121 | 122 | # Enable HiDPI display modes (requires restart) 123 | sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true 124 | 125 | ############################################################################### 126 | # Finder # 127 | ############################################################################### 128 | 129 | # Allow quitting via ⌘ + Q; doing so will also hide desktop icons 130 | defaults write com.apple.finder QuitMenuItem -bool true 131 | 132 | # Disable window animations and Get Info animations 133 | defaults write com.apple.finder DisableAllAnimations -bool true 134 | 135 | # Show hidden files 136 | defaults write com.apple.finder AppleShowAllFiles -bool true 137 | 138 | # Show all filename extensions 139 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 140 | 141 | # Show path bar 142 | defaults write com.apple.finder ShowPathbar -bool true 143 | 144 | # Show status bar 145 | defaults write com.apple.finder ShowStatusBar -bool true 146 | 147 | # Disable the warning when changing a file extension 148 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 149 | 150 | # Use list view in all Finder windows by default 151 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" 152 | 153 | # Avoid creating .DS_Store files on network or USB volumes 154 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 155 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 156 | 157 | # Enable AirDrop over Ethernet and on unsupported Macs running Lion 158 | defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true 159 | 160 | # Show ~/Library folder 161 | chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library 162 | 163 | # Show the /Volumes folder 164 | sudo chflags nohidden /Volumes 165 | 166 | # When performing a search, search the current folder by default 167 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 168 | 169 | 170 | ############################################################################### 171 | # Dock # 172 | ############################################################################### 173 | 174 | # Show only open applications in the Dock 175 | # disabled because it also hides the downloads folder 176 | # defaults write com.apple.dock static-only -bool true 177 | 178 | # Don’t show recent applications in Dock 179 | defaults write com.apple.dock show-recents -bool false 180 | 181 | # Don’t automatically rearrange Spaces based on most recent use 182 | defaults write com.apple.dock mru-spaces -bool false 183 | 184 | # Set the icon size of Dock items to 36 pixels 185 | defaults write com.apple.dock tilesize -int 50 186 | 187 | # Place the dock on the right edge 188 | defaults write com.apple.dock orientation -string "right" 189 | 190 | # Remove the auto-hiding Dock delay 191 | defaults write com.apple.Dock autohide-delay -float 0 192 | 193 | ############################################################################### 194 | # Safari & WebKit # 195 | ############################################################################### 196 | 197 | # Show the full URL in the address bar (note: this still hides the scheme) 198 | defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true 199 | 200 | # Set Safari’s home page to `about:blank` for faster loading 201 | defaults write com.apple.Safari HomePage -string "about:blank" 202 | 203 | # Prevent Safari from opening ‘safe’ files automatically after downloading 204 | defaults write com.apple.Safari AutoOpenSafeDownloads -bool false 205 | 206 | # Enable “Do Not Track” 207 | defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true 208 | 209 | # Update extensions automatically 210 | defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true 211 | 212 | # Enable Safari’s debug menu 213 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 214 | 215 | # Add a context menu item for showing the Web Inspector in web views 216 | defaults write NSGlobalDomain WebKitDeveloperExtras -bool true 217 | 218 | ############################################################################### 219 | # Mac App Store # 220 | ############################################################################### 221 | 222 | # Enable the WebKit Developer Tools in the Mac App Store 223 | #defaults write com.apple.appstore WebKitDeveloperExtras -bool true 224 | 225 | # Enable Debug Menu in the Mac App Store 226 | #defaults write com.apple.appstore ShowDebugMenu -bool true 227 | 228 | # Enable the automatic update check 229 | defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true 230 | 231 | # Check for software updates daily, not just once per week 232 | defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 233 | 234 | # Download newly available updates in background 235 | defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 236 | 237 | # Install System data files & security updates 238 | defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 239 | 240 | # Automatically download apps purchased on other Macs 241 | defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 242 | 243 | # Turn on app auto-update 244 | defaults write com.apple.commerce AutoUpdate -bool true 245 | 246 | # Allow the App Store to reboot machine on macOS updates 247 | #defaults write com.apple.commerce AutoUpdateRestartRequired -bool true 248 | 249 | ############################################################################### 250 | # Spotlight # 251 | ############################################################################### 252 | 253 | # Hide Spotlight tray-icon (and subsequent helper) 254 | sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search 255 | # Change indexing order and disable some search results 256 | defaults write com.apple.spotlight orderedItems -array \ 257 | '{"enabled" = 1;"name" = "APPLICATIONS";}' \ 258 | '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ 259 | '{"enabled" = 1;"name" = "DIRECTORIES";}' \ 260 | '{"enabled" = 1;"name" = "PDF";}' \ 261 | '{"enabled" = 1;"name" = "FONTS";}' \ 262 | '{"enabled" = 0;"name" = "DOCUMENTS";}' \ 263 | '{"enabled" = 0;"name" = "MESSAGES";}' \ 264 | '{"enabled" = 0;"name" = "CONTACT";}' \ 265 | '{"enabled" = 0;"name" = "EVENT_TODO";}' \ 266 | '{"enabled" = 0;"name" = "IMAGES";}' \ 267 | '{"enabled" = 0;"name" = "BOOKMARKS";}' \ 268 | '{"enabled" = 0;"name" = "MUSIC";}' \ 269 | '{"enabled" = 0;"name" = "MOVIES";}' \ 270 | '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ 271 | '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ 272 | '{"enabled" = 0;"name" = "SOURCE";}' \ 273 | '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ 274 | '{"enabled" = 0;"name" = "MENU_OTHER";}' \ 275 | '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ 276 | '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ 277 | '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ 278 | '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' 279 | # Load new settings before rebuilding the index 280 | killall mds > /dev/null 2>&1 281 | # Make sure indexing is enabled for the main volume 282 | sudo mdutil -i on / > /dev/null 283 | # Rebuild the index from scratch 284 | sudo mdutil -E / > /dev/null 285 | 286 | ############################################################################### 287 | # Kill affected applications # 288 | ############################################################################### 289 | 290 | for app in "Activity Monitor" \ 291 | "cfprefsd" \ 292 | "Dock" \ 293 | "Finder" \ 294 | "Safari" \ 295 | "SystemUIServer"; do 296 | killall "${app}" &> /dev/null 297 | done 298 | echo "Done. Note that some of these changes require a logout/restart to take effect." -------------------------------------------------------------------------------- /macos/aliases/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | alias emustart='$(which emulator) -avd $(emulator -avd -list-avds | head -n 1)' 3 | alias jn='jupyter notebook' 4 | alias vs='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code' 5 | alias cgrep='grep --color=always' # grep preserving color 6 | 7 | # Open editors with z autocomplete 8 | sz() { st $(_z -e "$1") } 9 | vz() { vs $(_z -e "$1") } 10 | -------------------------------------------------------------------------------- /macos/bin/itbadge: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # set iTerm2 badge 3 | 4 | printf "\e]1337;SetBadgeFormat=%s\a" \ 5 | $(echo -n "$1" | base64) -------------------------------------------------------------------------------- /macos/bin/pdf2jpg: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Convert PDF file (passed as arg) to jpg(s) 3 | 4 | convert -density 100 $1 ./page_%d.jpg -------------------------------------------------------------------------------- /macos/bin/pkg-diff: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Diff package-lock files between commits 3 | # Requires delta for diff: https://github.com/dandavison/delta 4 | 5 | diff -u \ 6 | <(git show $1:package-lock.json | jq '.dependencies | map_values(.version)') \ 7 | <(git show $2:package-lock.json | jq '.dependencies | map_values(.version)') \ 8 | | sed -E "3p; /^(@| )/d" \ 9 | | delta -s \ 10 | --hunk-header-style="omit" \ 11 | --line-numbers-left-format='' \ 12 | --line-numbers-right-format='' \ 13 | --word-diff-regex="\S+" \ 14 | --max-line-distance=1.0 15 | 16 | # alternative with colordiff: 17 | # colordiff --suppress-common-lines -y <(git show $1:package-lock.json | jq '.dependencies | map_values(.version)') <(git show $2:package-lock.json | jq '.dependencies | map_values(.version)') -------------------------------------------------------------------------------- /macos/bin/sssh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Sticky SSH: retry until nonzero exit code 3 | # from: http://backreference.org/2013/04/26/ssh-auto-reconnect/ 4 | 5 | # try to connect every 0.5 secs (modulo timeouts) 6 | while true; do command ssh "$@"; [ $? -eq 0 ] && break || sleep 0.5; done 7 | -------------------------------------------------------------------------------- /macos/bin/vag: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | # Vagrant command that allows easy manipulation of VMs regardless of current dir 3 | # (and allows for commands to be applied to all VMs) 4 | 5 | if [ -z "$1" ] ; then 6 | # show documentation 7 | cat <<'EOL' 8 | vag - shortcut for controlling Vagrant 9 | -------------------------------------- 10 | vag COMMAND [SEARCHSTR|all] 11 | 12 | COMMAND - vagrant command that accepts an id (e.g. halt, up, suspend) 13 | SEARCHSTR - used to grep result of `vagrant global-status` to find IDs 14 | all - apply to all VMs in `vagrant global-status` 15 | EOL 16 | else 17 | if [ -z "$2" ] ; then 18 | # run `vagrant $COMMAND` 19 | vagrant $1 20 | elif [ "$2" = "all" ] ; then 21 | # run `vagrant $COMMAND` with each ID in global-status 22 | ids=("${(@f)$(vagrant global-status | grep running | cut -c1-8)}") 23 | for id in $ids; do 24 | cmd="vagrant $1 $id" 25 | echo "running... $cmd" 26 | eval $cmd 27 | done 28 | else 29 | # run `vagrant $COMMAND` with ID from provided name 30 | vagrant $1 $(vagrant global-status | grep $2 | cut -c1-8) 31 | fi 32 | fi -------------------------------------------------------------------------------- /macos/bin/vsz: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/zsh 2 | # Open VS through Z 3 | 4 | setopt aliases 5 | 6 | 7 | . "$DOTFILES/external/z_jump-around/z.sh" 8 | vs $(_z -e "$1") 9 | -------------------------------------------------------------------------------- /macos/divvy/divvy-shortcuts.txt: -------------------------------------------------------------------------------- 1 | divvy://import/YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBgLDBszNDtERU1OVldhYmprdHV+f4eIkJFVJG51bGzSDQ4PGlpOUy5vYmplY3RzViRjbGFzc6oQERITFBUWFxgZgAKABYAHgAmAC4ANgA+AEYATgBWAF90cHR4fIA4hIiMkJSYnKCkqKywtLiwoMDEqMlhzaXplUm93c18QD3NlbGVjdGlvbkVuZFJvd18QEXNlbGVjdGlvblN0YXJ0Um93WnN1YmRpdmlkZWRWZ2xvYmFsXxASc2VsZWN0aW9uRW5kQ29sdW1uV2VuYWJsZWRbc2l6ZUNvbHVtbnNXbmFtZUtleVxrZXlDb21ib0NvZGVfEBRzZWxlY3Rpb25TdGFydENvbHVtbl1rZXlDb21ib0ZsYWdzEAYQBRAACAmABBACCYADECUSAAgAAFRsZWZ00jU2NzhaJGNsYXNzbmFtZVgkY2xhc3Nlc1hTaG9ydGN1dKI5OlhTaG9ydGN1dFhOU09iamVjdN0cHR4fIA4hIiMkJSYnKCkqKywtKSwoQEFCQwgJgAQJgAYQJxADEgAIAABVcmlnaHTdHB0eHyAOISIjJCUmJyguKissLSksKEpLKkwICYAECYAIECMSAAgAAFN0b3DdHB0eHyAOISIjJCUmJygpQissLSksKFNUKlUICYAECYAKECkSAAgAAFZib3R0b23dHB0eHyAOISIjJCUmJyhYLiwsLVwsKF5fLmAQCgkJgAQQCQmADBAhEgAIAABWY2VudGVy3RwdHh8gDiEiIyQlJicoKSorLC0pLChnaCppCAmABAmADhAeEgAIAABUZnVsbN0cHR4fIA4hIiMkJSYnKCkqKywtbywocXIqcwgJgAQQBAmAEBAjEgAKAABYdG9wLWxlZnTdHB0eHyAOISIjJCUmJygpKissLSksKHp7fH0ICYAECYASECEQARIACgAAWXRvcC1yaWdodN0cHR4fIA4hIiMkJSYnKCkqKywtfCwohIUqhggJgAQJgBQQKRIACgAAW2JvdHRvbS1sZWZ03RwdHh8gDiEiIyQlJicoKSorLC0pLCiNjm+PCAmABAmAFhAnEgAKAABcYm90dG9tLXJpZ2h00jU2kpNeTlNNdXRhYmxlQXJyYXmjkpSVV05TQXJyYXlYTlNPYmplY3QACAARABoAJAApADIANwBJAEwAUQBTAG4AdAB5AIQAiwCWAJgAmgCcAJ4AoACiAKQApgCoAKoArADHANAA4gD2AQEBCAEdASUBMQE5AUYBXQFrAW0BbwFxAXIBcwF1AXcBeAF6AXwBgQGGAYsBlgGfAagBqwG0Ab0B2AHZAdoB3AHdAd8B4QHjAegB7gIJAgoCCwINAg4CEAISAhcCGwI2AjcCOAI6AjsCPQI/AkQCSwJmAmgCaQJqAmwCbgJvAnECcwJ4An8CmgKbApwCngKfAqECowKoAq0CyALJAsoCzALOAs8C0QLTAtgC4QL8Av0C/gMAAwEDAwMFAwcDDAMWAzEDMgMzAzUDNgM4AzoDPwNLA2YDZwNoA2oDawNtA28DdAOBA4YDlQOZA6EAAAAAAAACAQAAAAAAAACWAAAAAAAAAAAAAAAAAAADqg== -------------------------------------------------------------------------------- /macos/homebrew/.Brewfile: -------------------------------------------------------------------------------- 1 | # tap (sources of formulae) 2 | tap "buo/cask-upgrade" # interactive brew cask upgrade 3 | tap "homebrew/bundle" 4 | tap "homebrew/cask" 5 | tap "homebrew/cask-versions" 6 | tap "homebrew/core" 7 | tap "homebrew/services" 8 | 9 | # brew (binaries) 10 | brew "awscli" 11 | brew "bat" # better cat 12 | brew "bash-completion" 13 | brew "brotli" 14 | brew "bundletool" 15 | brew "cloc" 16 | brew "cmake" 17 | brew "diff-so-fancy" 18 | brew "direnv" 19 | brew "expect" # unbuffer command, for preserving color when piping: https://superuser.com/a/751809 20 | brew "ffmpeg" 21 | brew "git" 22 | brew "git-delta" 23 | brew "hicolor-icon-theme" 24 | brew "git-annex" 25 | brew "git-extras" 26 | brew "git-flow" 27 | brew "git-lfs" 28 | brew "less" # more recent 29 | brew "libtool" 30 | brew "htop" 31 | brew "jq" 32 | brew "libdvdcss" 33 | brew "libxml2" 34 | brew "mas" 35 | brew "netcat" 36 | brew "nvm" 37 | brew "nginx" 38 | brew "p7zip" 39 | brew "pipenv" 40 | brew "pyenv" 41 | brew "ruby-build" 42 | brew "rbenv" 43 | brew "reattach-to-user-namespace" 44 | brew "the_silver_searcher" 45 | brew "tig" 46 | brew "tmux" 47 | brew "wget" 48 | brew "wireguard-tools" 49 | brew "youtube-dl" 50 | brew "zsh" 51 | brew "gh" 52 | 53 | # casks (programs/large binaries) 54 | cask "1password-cli" 55 | cask "alfred" 56 | cask "cryptomator" 57 | cask "dash" 58 | cask "divvy" 59 | cask "dropbox" 60 | cask "fantastical" 61 | cask "firefox" 62 | cask "gpg-suite-no-mail" 63 | cask "iterm2" 64 | cask "ngrok" 65 | cask "pdf-expert" 66 | cask "sip" 67 | cask "spark" 68 | cask "sublime-merge" 69 | cask "visual-studio-code" 70 | cask "hey" 71 | 72 | # mas (App Store) 73 | mas "Paste - Clipboard Manager", id: 967805235 74 | mas "Yoink - Improved Drag and Drop", id: 457622435 75 | mas "Spark – Email App by Readdle", id: 1176895641 76 | mas "Microsoft OneNote", id: 784801555 -------------------------------------------------------------------------------- /macos/iterm/iterm_color_profile.itermcolors: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ansi 0 Color 6 | 7 | Alpha Component 8 | 1 9 | Blue Component 10 | 0.63022083044052124 11 | Color Space 12 | sRGB 13 | Green Component 14 | 0.6127278208732605 15 | Red Component 16 | 0.56103318929672241 17 | 18 | Ansi 1 Color 19 | 20 | Alpha Component 21 | 1 22 | Blue Component 23 | 0.39356398582458496 24 | Color Space 25 | sRGB 26 | Green Component 27 | 0.31534990668296814 28 | Red Component 29 | 0.75956434011459351 30 | 31 | Ansi 10 Color 32 | 33 | Alpha Component 34 | 1 35 | Blue Component 36 | 0.51238477230072021 37 | Color Space 38 | sRGB 39 | Green Component 40 | 0.80102002620697021 41 | Red Component 42 | 0.56605535745620728 43 | 44 | Ansi 11 Color 45 | 46 | Alpha Component 47 | 1 48 | Blue Component 49 | 0.45704889297485352 50 | Color Space 51 | sRGB 52 | Green Component 53 | 0.92913287878036499 54 | Red Component 55 | 1 56 | 57 | Ansi 12 Color 58 | 59 | Alpha Component 60 | 1 61 | Blue Component 62 | 1 63 | Color Space 64 | sRGB 65 | Green Component 66 | 0.66305297613143921 67 | Red Component 68 | 0.30852413177490234 69 | 70 | Ansi 13 Color 71 | 72 | Alpha Component 73 | 1 74 | Blue Component 75 | 0.53385132551193237 76 | Color Space 77 | sRGB 78 | Green Component 79 | 0.42250329256057739 80 | Red Component 81 | 0.99923890829086304 82 | 83 | Ansi 14 Color 84 | 85 | Alpha Component 86 | 1 87 | Blue Component 88 | 0.788746178150177 89 | Color Space 90 | sRGB 91 | Green Component 92 | 0.8325156569480896 93 | Red Component 94 | 0.37786984443664551 95 | 96 | Ansi 15 Color 97 | 98 | Alpha Component 99 | 1 100 | Blue Component 101 | 0.87979280948638916 102 | Color Space 103 | sRGB 104 | Green Component 105 | 0.87626051902770996 106 | Red Component 107 | 0.85653704404830933 108 | 109 | Ansi 2 Color 110 | 111 | Alpha Component 112 | 1 113 | Blue Component 114 | 0.19432589411735535 115 | Color Space 116 | sRGB 117 | Green Component 118 | 0.6662139892578125 119 | Red Component 120 | 0.33217543363571167 121 | 122 | Ansi 3 Color 123 | 124 | Alpha Component 125 | 1 126 | Blue Component 127 | 0.3606492280960083 128 | Color Space 129 | sRGB 130 | Green Component 131 | 0.72239196300506592 132 | Red Component 133 | 0.77655255794525146 134 | 135 | Ansi 4 Color 136 | 137 | Alpha Component 138 | 1 139 | Blue Component 140 | 0.73135823011398315 141 | Color Space 142 | sRGB 143 | Green Component 144 | 0.5725020170211792 145 | Red Component 146 | 0.20003902912139893 147 | 148 | Ansi 5 Color 149 | 150 | Alpha Component 151 | 1 152 | Blue Component 153 | 0.42801254987716675 154 | Color Space 155 | sRGB 156 | Green Component 157 | 0.39827904105186462 158 | Red Component 159 | 0.79365956783294678 160 | 161 | Ansi 6 Color 162 | 163 | Alpha Component 164 | 1 165 | Blue Component 166 | 0.6647142767906189 167 | Color Space 168 | sRGB 169 | Green Component 170 | 0.70701676607131958 171 | Red Component 172 | 0.32102480530738831 173 | 174 | Ansi 7 Color 175 | 176 | Alpha Component 177 | 1 178 | Blue Component 179 | 0.87979280948638916 180 | Color Space 181 | sRGB 182 | Green Component 183 | 0.87626051902770996 184 | Red Component 185 | 0.85653704404830933 186 | 187 | Ansi 8 Color 188 | 189 | Alpha Component 190 | 1 191 | Blue Component 192 | 0.60342198610305786 193 | Color Space 194 | sRGB 195 | Green Component 196 | 0.60342985391616821 197 | Red Component 198 | 0.60341531038284302 199 | 200 | Ansi 9 Color 201 | 202 | Alpha Component 203 | 1 204 | Blue Component 205 | 0.31629380583763123 206 | Color Space 207 | sRGB 208 | Green Component 209 | 0.377592533826828 210 | Red Component 211 | 0.96879500150680542 212 | 213 | Background Color 214 | 215 | Alpha Component 216 | 1 217 | Blue Component 218 | 0.23882055282592773 219 | Color Space 220 | sRGB 221 | Green Component 222 | 0.23133578896522522 223 | Red Component 224 | 0.22388401627540588 225 | 226 | Badge Color 227 | 228 | Alpha Component 229 | 0.5 230 | Blue Component 231 | 0.0 232 | Color Space 233 | sRGB 234 | Green Component 235 | 0.1491314172744751 236 | Red Component 237 | 1 238 | 239 | Bold Color 240 | 241 | Alpha Component 242 | 1 243 | Blue Component 244 | 0.94106405973434448 245 | Color Space 246 | sRGB 247 | Green Component 248 | 0.94123548269271851 249 | Red Component 250 | 0.94107431173324585 251 | 252 | Cursor Color 253 | 254 | Alpha Component 255 | 1 256 | Blue Component 257 | 0.58823525905609131 258 | Color Space 259 | sRGB 260 | Green Component 261 | 0.58039218187332153 262 | Red Component 263 | 0.51372557878494263 264 | 265 | Cursor Guide Color 266 | 267 | Alpha Component 268 | 0.25 269 | Blue Component 270 | 1 271 | Color Space 272 | sRGB 273 | Green Component 274 | 0.9268307089805603 275 | Red Component 276 | 0.70213186740875244 277 | 278 | Cursor Text Color 279 | 280 | Alpha Component 281 | 1 282 | Blue Component 283 | 0.25332435965538025 284 | Color Space 285 | sRGB 286 | Green Component 287 | 0.20616915822029114 288 | Red Component 289 | 0.0 290 | 291 | Foreground Color 292 | 293 | Alpha Component 294 | 1 295 | Blue Component 296 | 0.87979280948638916 297 | Color Space 298 | sRGB 299 | Green Component 300 | 0.87626051902770996 301 | Red Component 302 | 0.85653704404830933 303 | 304 | Link Color 305 | 306 | Alpha Component 307 | 1 308 | Blue Component 309 | 0.73423302173614502 310 | Color Space 311 | sRGB 312 | Green Component 313 | 0.35916060209274292 314 | Red Component 315 | 0.0 316 | 317 | Selected Text Color 318 | 319 | Alpha Component 320 | 1 321 | Blue Component 322 | 0.32549014687538147 323 | Color Space 324 | sRGB 325 | Green Component 326 | 0.31764701008796692 327 | Red Component 328 | 0.31372553110122681 329 | 330 | Selection Color 331 | 332 | Alpha Component 333 | 1 334 | Blue Component 335 | 0.94509810209274292 336 | Color Space 337 | sRGB 338 | Green Component 339 | 0.92941182851791382 340 | Red Component 341 | 0.91372555494308472 342 | 343 | 344 | 345 | -------------------------------------------------------------------------------- /macos/zsh/.zshenv_macos: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | export SSH_KEY_PATH="$HOME/.ssh/id_rsa" 4 | export ANDROID_HOME="$HOME/Library/Android/sdk" 5 | export ANDROID_NDK_HOME="$HOME/Library/Android/android-ndk-r16b" 6 | export GRADLE_USER_HOME="$HOME/.gradle" 7 | export LDFLAGS="-L/usr/local/opt/openssl/lib -L/usr/local/opt/libxml2/lib" 8 | export CPPFLAGS="-I/usr/local/opt/openssl/include -I/usr/local/opt/libxml2/include" 9 | export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig" 10 | export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ 11 | export GOROOT="$HOME/.gvm/gos/go1.13.7" 12 | export GOPATH="$HOME/.gvm/pkgsets/go1.13.7/global" 13 | export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre" 14 | 15 | # I used to force path to exactly what I specified here via an env var called 'BOG_PATH' 16 | # that I would reset PATH to at the end of the shell init. This was in an effort to have 17 | # full control over my paths, instead of allowing applications to install into my path 18 | # through macOS's path_helper tool (https://scriptingosx.com/2017/05/where-paths-come-from/) 19 | # 20 | # 21 | # For now stopping this practice, to give some control back to the OS. May re-enable in the future. 22 | # 23 | export PATH=$(echo " 24 | $PATH 25 | :$HOME/.rbenv/shims 26 | :$HOME/.rbenv/bin 27 | :$HOME/.cargo/bin 28 | :/usr/local/opt/openssl/bin 29 | :/usr/local/bin 30 | :/usr/local/sbin 31 | :/usr/local/share/dotnet 32 | :/usr/bin 33 | :/bin 34 | :/usr/sbin 35 | :/sbin 36 | :/usr/local/opt/mysql@5.6/bin 37 | :$HOME/.local/bin 38 | :$HOME/.avn/bin 39 | :$HOME/.yarn/bin 40 | :$ANDROID_HOME/tools 41 | :$HOME/.cargo/bin 42 | :$ANDROID_HOME/platform-tools 43 | :/Applications/VMware OVF Tool 44 | :/opt/X11/bin 45 | :$ANDROID_HOME/emulator 46 | :$ANDROID_HOME/tools 47 | :$ANDROID_HOME/tools/bin 48 | :$ANDROID_HOME/platform-tools 49 | :$JAVA_HOME/bin 50 | " | tr -d '\n') # remove newlines 51 | -------------------------------------------------------------------------------- /macos/zsh/.zshrc_macos: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # System # 3 | ############################################################################### 4 | 5 | # shell envs 6 | EDITOR='vim' 7 | 8 | ############################################################################### 9 | # ZSH # 10 | ############################################################################### 11 | 12 | # plugins 13 | plugins+=(osx xcode) 14 | 15 | ############################################################################### 16 | # Other software # 17 | ############################################################################### 18 | 19 | # iTerm2 20 | export ITERM2_SQUELCH_MARK=1 21 | test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" 22 | BULLETTRAIN_PROMPT_CHAR="%{$(iterm2_prompt_mark)%} %B\$%b" 23 | 24 | # rbenv (Ruby) 25 | eval "$(rbenv init -)" 26 | 27 | # gvm (Go) 28 | test -e "${HOME}/.gvm/scripts/gvm" && source "${HOME}/.gvm/scripts/gvm" 29 | -------------------------------------------------------------------------------- /osid.sh: -------------------------------------------------------------------------------- 1 | # Finds the current OS for the purposes of these dotfiles 2 | case "$(uname -s)" in 3 | Linux*) BOGDAN_OSID=linux;; 4 | Darwin*) BOGDAN_OSID=macos;; 5 | CYGWIN*) echo "Your OS isn't supported by Bogdan's dotfiles."; exit 1 ;; 6 | MINGW*) echo "Your OS isn't supported by Bogdan's dotfiles."; exit 1 ;; 7 | *) echo "Your OS is not recognized by Bogdan's dotfiles."; exit 1 ;; 8 | esac 9 | 10 | export BOGDAN_OSID --------------------------------------------------------------------------------