summaryrefslogtreecommitdiff
path: root/user-profiles
diff options
context:
space:
mode:
Diffstat (limited to 'user-profiles')
-rw-r--r--user-profiles/core.nix6
-rw-r--r--user-profiles/feeds/alot.config50
-rw-r--r--user-profiles/feeds/default.nix11
-rw-r--r--user-profiles/feeds/imm-notmuch-insert.py52
-rw-r--r--user-profiles/feeds/module.nix236
-rw-r--r--user-profiles/mpv/default.nix9
-rw-r--r--user-profiles/tmux/default.nix10
-rw-r--r--user-profiles/tmux/tmux.conf9
-rw-r--r--user-profiles/utils.nix25
-rw-r--r--user-profiles/yt-dlp.nix22
-rw-r--r--user-profiles/zsh/default.nix98
-rw-r--r--user-profiles/zsh/p10k.zsh1578
-rw-r--r--user-profiles/zsh/zshrc20
13 files changed, 126 insertions, 2000 deletions
diff --git a/user-profiles/core.nix b/user-profiles/core.nix
index a8af48b3..57fb7628 100644
--- a/user-profiles/core.nix
+++ b/user-profiles/core.nix
@@ -5,7 +5,11 @@ with lib;
5{ 5{
6 config = { 6 config = {
7 users.users.${userName} = {}; # Just make sure the user is created 7 users.users.${userName} = {}; # Just make sure the user is created
8 home-manager.users.${userName} = {}; 8 home-manager.users.${userName} = let sysConfig = config; in { config, ... }: {
9 config.nix.settings = {
10 inherit (sysConfig.nix.settings) use-xdg-base-directories;
11 };
12 };
9 13
10 systemd.services."home-manager-${utils.escapeSystemdPath userName}" = lib.mkIf (!config.home-manager.enableSystemd) { 14 systemd.services."home-manager-${utils.escapeSystemdPath userName}" = lib.mkIf (!config.home-manager.enableSystemd) {
11 restartIfChanged = false; # only run once on startup, deploy to running system with deploy-rs 15 restartIfChanged = false; # only run once on startup, deploy to running system with deploy-rs
diff --git a/user-profiles/feeds/alot.config b/user-profiles/feeds/alot.config
deleted file mode 100644
index a14d4539..00000000
--- a/user-profiles/feeds/alot.config
+++ /dev/null
@@ -1,50 +0,0 @@
1attachment_prefix="~/Downloads"
2bug_on_exit=true
3editor_cmd="false"
4tabwidth=2
5timestamp_format="%a %d %b %H:%M:%S %Y UTC%z"
6auto_remove_unread=True
7#initial_command="search ( tag:inbox ) AND NOT ( tag:killed )"
8initial_command="search ( tag:inbox ) AND NOT ( is:link OR is:media OR is:killed )"
9
10[accounts]
11 [[private]]
12 realname = @realname@
13 address = @address@
14
15[bindings]
16j =
17k =
18'g g' =
19G =
20I = search ( tag:inbox ) AND NOT ( is:killed )
21U = search ( tag:inbox ) AND NOT ( is:link OR is:media OR is:killed )
22V = search ( tag:inbox AND is:media OR ( is:live AND date:12h.. AND NOT is:unread ) ) AND NOT ( is:killed )
23W = search ( is:media ) AND NOT ( tag:inbox OR is:killed OR is:highlight )
24L = search ( tag:inbox AND is:link ) AND NOT ( is:killed )
25
26h = move first
27t = move up
28n = move down
29s = move last
30 [[search]]
31 a =
32 s =
33
34 u = toggletags unread
35 i = toggletags inbox
36 j = untag unread,inbox
37 r = toggletags later
38 [[thread]]
39 s =
40 S =
41 n =
42 'g j' =
43 'g k' =
44 'g l' =
45 w = save
46 W = save --all
47 'g h' = move parent
48 'g t' = move next sibling
49 'g n' = move previous sibling
50 'g s' = move first reply \ No newline at end of file
diff --git a/user-profiles/feeds/default.nix b/user-profiles/feeds/default.nix
deleted file mode 100644
index 82be90c7..00000000
--- a/user-profiles/feeds/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
1{ config, flakeInputs, pkgs, lib, userName, customUtils, ... }:
2{
3 home-manager.users.${userName} = {...}: {
4 imports = [
5 (customUtils.overrideModuleArgs
6 (import ./module.nix)
7 (inputs: inputs // { inherit flakeInputs; inherit (config.nixpkgs) system; })
8 )
9 ];
10 };
11}
diff --git a/user-profiles/feeds/imm-notmuch-insert.py b/user-profiles/feeds/imm-notmuch-insert.py
deleted file mode 100644
index b7eed292..00000000
--- a/user-profiles/feeds/imm-notmuch-insert.py
+++ /dev/null
@@ -1,52 +0,0 @@
1#!@python@/bin/python
2
3import json
4import sys
5import subprocess
6from io import BytesIO
7from email.message import EmailMessage
8import configparser
9from os import environ
10from datetime import *
11from dateutil.tz import *
12from dateutil.parser import isoparse
13from html2text import html2text
14
15def main():
16 notmuchConfig = configparser.ConfigParser()
17 notmuchConfig.read(environ.get('NOTMUCH_CONFIG'))
18
19 callbackMessage = json.load(sys.stdin)
20
21 msg = EmailMessage()
22 authors = ', '.join(map(lambda author: author['name'], callbackMessage['feed_item']['authors']))
23 if authors:
24 msg['From'] = f"{callbackMessage['feed_definition']['title']} ({authors}) <imm@imm.invalid>"
25 else:
26 msg['From'] = f"{callbackMessage['feed_definition']['title']} <imm@imm.invalid>"
27 msg['To'] = f"{notmuchConfig['user']['name']} <{notmuchConfig['user']['primary_email']}>"
28 if 'title' in callbackMessage['feed_item'] and callbackMessage['feed_item']['title']:
29 msg['Subject'] = callbackMessage['feed_item']['title']
30 msg['Item-Identifier'] = f"{callbackMessage['feed_item']['identifier']}"
31 for link in callbackMessage['feed_item']['links']:
32 msg.add_header('Link', link['uri'])
33 date = None
34 if 'date' in callbackMessage['feed_item']:
35 date = isoparse(callbackMessage['feed_item']['date'])
36 else:
37 date = datetime.now(tzlocal())
38 msg['Date'] = date.strftime('%a, %e %b %Y %T %z')
39
40 if 'content' in callbackMessage['feed_item'] and callbackMessage['feed_item']['content']:
41 msg.set_content(html2text(callbackMessage['feed_item']['content']))
42 msg.add_alternative(callbackMessage['feed_item']['content'], subtype='html')
43
44
45 subprocess.run(
46 args=['notmuch', 'insert'],
47 check=True,
48 input=bytes(msg)
49 )
50
51if __name__ == '__main__':
52 sys.exit(main())
diff --git a/user-profiles/feeds/module.nix b/user-profiles/feeds/module.nix
deleted file mode 100644
index 63e827eb..00000000
--- a/user-profiles/feeds/module.nix
+++ /dev/null
@@ -1,236 +0,0 @@
1{ config, flakeInputs, pkgs, lib, system, ... }:
2
3with lib;
4
5let
6 inherit (flakeInputs.home-manager.lib) hm;
7
8 databasePath = "${config.xdg.dataHome}/feeds";
9
10 imm =
11 let
12 hlib = pkgs.haskell.lib;
13 haskellPackages = pkgs.haskellPackages.override {
14 overrides = finalHaskell: prevHaskell: {
15 uri-bytestring = finalHaskell.callCabal2nix "uri-bytestring" (pkgs.fetchFromGitHub {
16 owner = "gkleen";
17 repo = "uri-bytestring";
18 rev = "5f7f32c8274bc4d1b81d99582f5148fe3e8b637e";
19 sha256 = "XLanwyCDIlMuOkpE5LbTNOBfL+1kZX+URfj9Bhs1Nsc=";
20 fetchSubmodules = true;
21 }) {};
22 atom-conduit = finalHaskell.callCabal2nix "atom-conduit" (pkgs.fetchFromGitHub {
23 owner = "gkleen";
24 repo = "atom-conduit";
25 rev = "022f0182a02373f87c06a0a09817c8c41efe2425";
26 sha256 = "8yEyh3ymqkoM/YP+eBqPq1I5ofzj0Qn7ojL7IWx1DPo=";
27 fetchSubmodules = true;
28 }) {};
29 rss-conduit = finalHaskell.callCabal2nix "rss-condit" (pkgs.fetchFromGitHub {
30 owner = "gkleen";
31 repo = "rss-conduit";
32 rev = "dbb0960a8d3dc519f1607aa0223b3a25a49282ef";
33 sha256 = "Md1XApZWkdv4JvNoaVnjz0S85LbEC6w9U3PUcwXfu94=";
34 fetchSubmodules = true;
35 }) {};
36 beam-core = hlib.doJailbreak (finalHaskell.callCabal2nix "beam-core" "${beamSrc}/beam-core" {});
37 beam-migrate = hlib.doJailbreak (finalHaskell.callCabal2nix "beam-migrate" "${beamSrc}/beam-migrate" {});
38 beam-sqlite = hlib.doJailbreak (finalHaskell.callCabal2nix "beam-sqlite" "${beamSrc}/beam-sqlite" {});
39
40 imm = finalHaskell.callCabal2nix "imm" (pkgs.fetchFromGitHub {
41 owner = "k0ral";
42 repo = "imm";
43 rev = "5033879667264cb44cee65671a66f6aa43f249e7";
44 sha256 = "PG22caLQmAGhLZP49HsazuNd8IFKKaTuhXIQBD8v4Fs=";
45 fetchSubmodules = true;
46 }) {};
47 };
48 };
49 beamSrc = pkgs.fetchFromGitHub {
50 owner = "haskell-beam";
51 repo = "beam";
52 rev = "efd464b079755a781c2bb7a2fc030d6c141bbb8a";
53 sha256 = "8nTuBP/vD0L/qMo4h3XNrGZvpIwXuMVdj40j5gvHU6w=";
54 fetchSubmodules = true;
55 };
56 in haskellPackages.imm;
57 immWrapped = pkgs.runCommand "${imm.name}-wrapped-${config.home.username}"
58 { nativeBuildInputs = with pkgs; [ makeWrapper ];
59 } ''
60 mkdir -p $out/bin
61 makeWrapper ${imm}/bin/imm $out/bin/imm \
62 --add-flags --callbacks=${notmuchCallbacks}
63 '';
64
65 notmuchCallbacks = pkgs.writeText "imm-callbacks-${config.home.username}.dhall" ''
66 [ { _executable = "${immNotmuchInsert}/bin/imm-notmuch-insert"
67 , _arguments = [] : List Text
68 }
69 ]
70 '';
71
72 immNotmuchInsert = pkgs.stdenv.mkDerivation rec {
73 name = "imm-notmuch-insert-${config.home.username}";
74 src = ./imm-notmuch-insert.py;
75
76 phases = [ "buildPhase" "checkPhase" "installPhase" "fixupPhase" ];
77
78 python = pkgs.python39.withPackages (ps: with ps; [ configparser python-dateutil html2text ]);
79
80 nativeBuildInputs = with pkgs; [ makeWrapper ];
81
82 buildPhase = ''
83 substituteAll $src imm-notmuch-insert
84 '';
85
86 doCheck = true;
87 checkPhase = ''
88 ${python}/bin/python -m py_compile imm-notmuch-insert
89 '';
90
91 installPhase = ''
92 install -m 0755 -D -t $out/bin \
93 imm-notmuch-insert
94 '';
95
96 fixupPhase = ''
97 wrapProgram $out/bin/imm-notmuch-insert \
98 --prefix PATH : ${pkgs.notmuch}/bin \
99 --set NOTMUCH_CONFIG ${configPath}
100 '';
101 };
102
103 mkIniKeyValue = key: value:
104 let
105 tweakVal = v:
106 if isString v then
107 v
108 else if isList v then
109 concatMapStringsSep ";" tweakVal v
110 else if isBool v then
111 (if v then "true" else "false")
112 else
113 toString v;
114 in "${key}=${tweakVal value}";
115
116 notmuchIni = {
117 database = { path = databasePath; };
118
119 maildir = { synchronize_flags = false; };
120
121 new = {
122 ignore = [];
123 tags = ["new"];
124 };
125
126 user = {
127 name = config.home.username;
128 primary_email = "${config.home.username}@imm.invalid";
129 };
130
131 search = { exclude_tags = ["deleted"]; };
132 };
133 configPath = pkgs.writeText "notmuchrc" (generators.toINI { mkKeyValue = mkIniKeyValue; } notmuchIni);
134
135 afewConfigDir = pkgs.symlinkJoin {
136 name = "afew-config";
137 paths = [
138 (pkgs.writeTextDir "config" ''
139 [InboxFilter]
140 '')
141 ];
142 };
143
144 notmuchHooksDir =
145 let
146 afewHook = pkgs.writeShellScript "afew" ''
147 exec -- ${pkgs.afew}/bin/afew -c ${afewConfigDir} -C ${configPath} --tag --new -vv
148 '';
149 in pkgs.linkFarm "notmuch-hooks" [
150 { name = "post-new";
151 path = afewHook;
152 }
153 { name = "post-insert";
154 path = afewHook;
155 }
156 ];
157
158 notmuchWrapped = pkgs.runCommand "${pkgs.notmuch.name}-wrapped-${config.home.username}"
159 { nativeBuildInputs = with pkgs; [ makeWrapper ];
160 } ''
161 mkdir -p $out/bin
162 makeWrapper ${pkgs.notmuch}/bin/notmuch $out/bin/notmuch-feeds \
163 --set NOTMUCH_CONFIG ${configPath}
164 '';
165 alotWrapped = pkgs.runCommand "${pkgs.alot.name}-wrapped-${config.home.username}"
166 { nativeBuildInputs = with pkgs; [ makeWrapper gnused ];
167 } ''
168 mkdir -p $out/bin
169 makeWrapper ${pkgs.alot}/bin/alot $out/bin/alot-feeds \
170 --prefix MAILCAPS : ${alotMailcaps} \
171 --add-flags --config=${alotConfig} \
172 --add-flags --notmuch-config=${configPath}
173
174 mkdir $out/share
175 ln -s ${pkgs.alot}/share/alot $out/share
176 mkdir -p $out/share/applications
177 sed -r 's/alot/alot-feeds/g' ${pkgs.alot}/share/applications/alot.desktop > $out/share/applications/alot-feeds.desktop
178 mkdir -p $out/share/zsh/site-functions
179 sed -r 's/alot/alot-feeds/g' ${pkgs.alot}/share/zsh/site-functions/_alot > $out/share/zsh/site-functions/_alot-feeds
180 '';
181
182 alotConfig = pkgs.runCommand "alot" {
183 realname = notmuchIni.user.name;
184 address = notmuchIni.user.primary_email;
185 } "substituteAll ${./alot.config} $out";
186 alotMailcaps = pkgs.writeText "mailcaps" ''
187 text/html; ${pkgs.lynx}/bin/lynx -dump -dont_wrap_pre -assume_charset=utf-8 -display_charset=utf-8 "%s"; nametemplate=%s.html; copiousoutput
188 '';
189in {
190 config = {
191 home.packages = [ immWrapped notmuchWrapped pkgs.notmuch.man alotWrapped ];
192
193 home.activation.createImm = hm.dag.entryAfter ["writeBoundary"] ''
194 $DRY_RUN_CMD mkdir -p $VERBOSE_ARG ${config.xdg.configHome}/imm
195 '';
196
197 home.activation.createFeedsDatabase = hm.dag.entryAfter ["linkGeneration" "writeBoundary"] ''
198 $DRY_RUN_CMD mkdir -p -m 0750 $VERBOSE_ARG ${databasePath}
199 $DRY_RUN_CMD mkdir -p $VERBOSE_ARG ${databasePath}/new ${databasePath}/cur ${databasePath}/tmp
200 if ! [[ -d ${databasePath}/.notmuch ]]; then
201 NOTMUCH_VERBOSE_ARG="--quiet"
202 if [[ -v VERBOSE ]]; then
203 NOTMUCH_VERBOSE_ARG="--verbose"
204 fi
205 NOTMUCH_CONFIG=${configPath} $DRY_RUN_CMD ${pkgs.notmuch}/bin/notmuch new $NOTMUCH_VERBOSE_ARG
206 fi
207 $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG ${notmuchHooksDir} ${databasePath}/.notmuch/hooks
208 '';
209
210 systemd.user.services."logrotate-imm" = {
211 Unit = {
212 Description = "Rotate imm logfile";
213 };
214 Service = {
215 Type = "oneshot";
216 ExecStart = ''
217 ${pkgs.logrotate}/bin/logrotate --state ${config.xdg.configHome}/imm/imm.logrotate ${pkgs.writeText "logrotate.conf" ''
218 ${config.xdg.configHome}/imm/imm.log {
219 rotate 5
220 size 1024k
221 }
222 ''}
223 '';
224 };
225 };
226 systemd.user.timers."logrotate-imm" = {
227 Timer = {
228 OnActiveSec = "6h";
229 OnUnitActiveSec = "6h";
230 };
231 Install = {
232 WantedBy = ["default.target"];
233 };
234 };
235 };
236}
diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix
index 83eba2a9..7a261e76 100644
--- a/user-profiles/mpv/default.nix
+++ b/user-profiles/mpv/default.nix
@@ -10,7 +10,7 @@
10 (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec { 10 (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec {
11 installPhase = '' 11 installPhase = ''
12 install -d $out/share/mpv/scripts 12 install -d $out/share/mpv/scripts
13 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} 13 install -m 0644 main.lua $out/share/mpv/scripts/${passthru.scriptName}
14 ''; 14 '';
15 15
16 passthru.scriptName = "reload.lua"; 16 passthru.scriptName = "reload.lua";
@@ -105,14 +105,13 @@
105 }; 105 };
106 config = { 106 config = {
107 ytdl = true; 107 ytdl = true;
108 ytdl-raw-options = "sub-langs=\"${config.programs.yt-dlp.settings.sub-langs}\""; 108 ytdl-format = "ytdl";
109 # ytdl-raw-options = "sub-langs=\"${config.programs.yt-dlp.settings.sub-langs}\"";
109 subs-with-matching-audio = false; 110 subs-with-matching-audio = false;
110 audio-display = false; 111 audio-display = false;
111 osd-font = "Fira Sans"; 112 osd-font = "Fira Sans";
112 sub-font = "Fira Sans"; 113 sub-font = "Fira Sans";
113 # vo = "gpu"; 114 hwdec = "auto-safe";
114 vo = "gpu-next";
115 hwdec = "auto";
116 scale = "bilinear"; 115 scale = "bilinear";
117 force-window = "yes"; 116 force-window = "yes";
118 # af = "lavfi=[dynaudnorm=f=100:g=31:s=20.0]"; 117 # af = "lavfi=[dynaudnorm=f=100:g=31:s=20.0]";
diff --git a/user-profiles/tmux/default.nix b/user-profiles/tmux/default.nix
index 11c53788..7ea0c0d5 100644
--- a/user-profiles/tmux/default.nix
+++ b/user-profiles/tmux/default.nix
@@ -1,10 +1,11 @@
1{ userName, pkgs, lib, ... }: 1{ userName, pkgs, lib, ... }:
2{ 2{
3 home-manager.users.${userName} = { 3 home-manager.users.${userName} = { config, ... }: {
4 programs.tmux = { 4 programs.tmux = {
5 enable = true; 5 enable = true;
6 clock24 = true; 6 clock24 = true;
7 historyLimit = 50000; 7 historyLimit = 50000;
8 mouse = true;
8 extraConfig = lib.readFile (pkgs.stdenv.mkDerivation { 9 extraConfig = lib.readFile (pkgs.stdenv.mkDerivation {
9 name = "tmux.conf"; 10 name = "tmux.conf";
10 src = ./tmux.conf; 11 src = ./tmux.conf;
@@ -13,11 +14,10 @@
13 14
14 phases = [ "installPhase" ]; 15 phases = [ "installPhase" ];
15 16
16 inherit (pkgs) zsh;
17 mandb = pkgs.man-db;
18
19 installPhase = '' 17 installPhase = ''
20 substituteAll $src $out 18 substitute $src $out \
19 --subst-var-by zsh ${lib.getExe config.programs.zsh.package} \
20 --subst-var-by man ${lib.getExe config.programs.man.package}
21 ''; 21 '';
22 }); 22 });
23 }; 23 };
diff --git a/user-profiles/tmux/tmux.conf b/user-profiles/tmux/tmux.conf
index 415d13e7..9e658800 100644
--- a/user-profiles/tmux/tmux.conf
+++ b/user-profiles/tmux/tmux.conf
@@ -1,23 +1,20 @@
1set-option -g history-limit 50000
2set-option -g status-bg black 1set-option -g status-bg black
3set-option -g status-fg white 2set-option -g status-fg white
4set-option -g clock-mode-colour white 3set-option -g clock-mode-colour white
5set-option -g clock-mode-style 24
6set-option -g bell-action any 4set-option -g bell-action any
7set-option -g default-shell @zsh@/bin/zsh 5set-option -g default-shell @zsh@
8set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY PROMPT_INFO PATH PGHOST PGLOG' 6set-option -g update-environment 'DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY PROMPT_INFO PATH PGHOST PGLOG'
9set-option -g mouse on
10set-option -g set-clipboard on 7set-option -g set-clipboard on
11set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007' 8set-option -g terminal-overrides 'rxvt-uni*:XT:Ms=\E]52;%p1%s;%p2%s\007'
12 9
13set-environment -g LESS " -R " 10set-environment -g LESS " -R "
14 11
15## determine if we should enable 256-colour support 12## determine if we should enable 256-colour support
16if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty ]]" 'set -g default-terminal tmux-256color' 13if "[[ ''${TERM} =~ 256color || ''${TERM} == fbterm || ''${TERM} =~ alacritty || ''${TERM} =~ kitty ]]" 'set -g default-terminal tmux-256color'
17 14
18set-option -g status-right "" 15set-option -g status-right ""
19 16
20bind / command-prompt "split-window -h 'exec @mandb@/bin/man %%'" 17bind / command-prompt "split-window -h 'exec @man@ %%'"
21bind C clock-mode 18bind C clock-mode
22bind r switch-client -r 19bind r switch-client -r
23 20
diff --git a/user-profiles/utils.nix b/user-profiles/utils.nix
index 13eb6033..edf6da11 100644
--- a/user-profiles/utils.nix
+++ b/user-profiles/utils.nix
@@ -1,19 +1,6 @@
1{ userName, lib, pkgs, config, ... }: 1{ userName, lib, pkgs, config, ... }:
2let 2let
3 cfg = config.home-manager.users.${userName}; 3 cfg = config.home-manager.users.${userName};
4
5 wrappedLess = pkgs.less.overrideAttrs (oldAttrs: {
6 pname = "${oldAttrs.pname or "less"}-wrapper";
7
8 nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ (with pkgs; [makeWrapper]);
9
10 postInstall = ''
11 ${oldAttrs.postInstall or ""}
12
13 wrapProgram $out/bin/less \
14 --prefix PATH : ${lib.makeBinPath (with pkgs; [binutils])}
15 '';
16 });
17in { 4in {
18 home-manager.users.${userName} = { 5 home-manager.users.${userName} = {
19 programs = { 6 programs = {
@@ -55,19 +42,25 @@ in {
55 }; 42 };
56 43
57 jq.enable = true; 44 jq.enable = true;
45
46 lesspipe.enable = true;
47
48 man.enable = true;
49
50 vim.enable = true;
58 }; 51 };
59 52
60 home.sessionVariables = { 53 home.sessionVariables = {
61 LESSCOLORIZER = "pygmentize -O style=rrt"; 54 LESSCOLORIZER = "${lib.getExe' pkgs.python3Packages.pygments "pygmentize"} -O style=rrt";
62 }; 55 };
63 56
64 home.packages = with pkgs; [ 57 home.packages = with pkgs; [
65 autossh usbutils pciutils eza silver-searcher pwgen xkcdpass 58 autossh usbutils pciutils eza silver-searcher pwgen xkcdpass
66 unzip magic-wormhole qrencode tty-clock dnsutils openssl sshfs 59 unzip magic-wormhole dnsutils openssl sshfs
67 psmisc mosh tree vnstat file pv bc zip nmap aspell 60 psmisc mosh tree vnstat file pv bc zip nmap aspell
68 aspellDicts.de aspellDicts.en borgbackup man-pages rsync socat 61 aspellDicts.de aspellDicts.en borgbackup man-pages rsync socat
69 inetutils yq cached-nix-shell persistent-nix-shell rage 62 inetutils yq cached-nix-shell persistent-nix-shell rage
70 smartmontools hdparm nix-output-monitor wrappedLess dscp 63 smartmontools hdparm nix-output-monitor less dscp
71 iputils 64 iputils
72 ]; 65 ];
73 }; 66 };
diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix
index 9e77f734..d611e5a4 100644
--- a/user-profiles/yt-dlp.nix
+++ b/user-profiles/yt-dlp.nix
@@ -7,28 +7,38 @@
7 cookies-from-browser = "firefox::none"; 7 cookies-from-browser = "firefox::none";
8 mark-watched = true; 8 mark-watched = true;
9 format = lib.concatStringsSep "/" [ 9 format = lib.concatStringsSep "/" [
10 "bestvideo*[width<=2560][height<=1440][fps<=60][vcodec!*=av01][width>=1920]+bestaudio"
11 "best[width<=2560][height<=1440][fps<=60][vcodec!*=av01][width>=1920]"
12 "bestvideo*[vcodec!*=av01][width>=1920]+bestaudio"
13 "best[vcodec!*=av01][width>=1920]"
14 "bestvideo*[width<=2560][height<=1440][fps<=60][vcodec!*=av01][height>=1080]+bestaudio"
15 "best[width<=2560][height<=1440][fps<=60][vcodec!*=av01][height>=1080]"
16 "bestvideo*[vcodec!*=av01][height>=1080]+bestaudio"
17 "best[vcodec!*=av01][height>=1080]"
10 "bestvideo*[width<=2560][height<=1440][fps<=60]+bestaudio" 18 "bestvideo*[width<=2560][height<=1440][fps<=60]+bestaudio"
11 "best[width<=2560][height<=1440][fps<=60]" 19 "best[width<=2560][height<=1440][fps<=60]"
12 "bestvideo*+bestaudio" 20 "bestvideo*+bestaudio"
13 "best" 21 "best"
14 ]; 22 ];
15 embed-subs = true; 23 # embed-subs = true;
24 embed-thumbnail = true;
25 embed-metadata = true;
16 # write-subs = true; 26 # write-subs = true;
17 write-auto-subs = true; 27 # write-auto-subs = true;
18 sub-langs = "en(-(gb|us|orig))?,de(-(de|orig))?,-live_chat,-rechat"; 28 # sub-langs = "en(-(gb|us|orig))?,de(-(de|orig))?,-live_chat,-rechat";
19 prefer-free-formats = true; 29 prefer-free-formats = true;
20 embed-metadata = true;
21 # downloader = "${pkgs.axel}/bin/axel"; 30 # downloader = "${pkgs.axel}/bin/axel";
22 concurrent-fragments = 12; 31 concurrent-fragments = 12;
23 buffer-size = "16K"; 32 buffer-size = "16K";
24 sponsorblock-mark = "all"; 33 # sponsorblock-mark = "all";
25 # restrict-filenames = true; 34 # restrict-filenames = true;
26 # extractor-args = lib.concatStringsSep ";" [ 35 # extractor-args = lib.concatStringsSep ";" [
27 # "youtube:player-client=android,web" 36 # "youtube:player-client=android,web"
28 # "youtube:formats=dashy" 37 # "youtube:formats=dashy"
29 # ]; 38 # ];
30 remux-video = "mp4>mkv"; 39 remux-video = "mp4>mkv";
31 output = "\"%(title)s [%(uploader)s %(webpage_url)s].%(ext)s\""; 40 output = lib.mkDefault "\"%(modified_date>%Y%m%d,release_date>%Y%m%d,upload_date>%Y%m%d)s %(title)s [%(uploader)s %(webpage_url)s].%(ext)s\"";
41 audio-multistreams = true;
32 }; 42 };
33 }; 43 };
34 }; 44 };
diff --git a/user-profiles/zsh/default.nix b/user-profiles/zsh/default.nix
index daeb7e82..e4604c5e 100644
--- a/user-profiles/zsh/default.nix
+++ b/user-profiles/zsh/default.nix
@@ -1,38 +1,70 @@
1{ userName, pkgs, customUtils, lib, config, ... }: 1{ userName, pkgs, customUtils, lib, config, ... }:
2let 2{
3 dotDir = ".config/zsh"; 3 config = {
4 p10kZsh = "${dotDir}/.p10k.zsh"; 4 nixpkgs.externalConfig.allowUnfreePackages = [
5 cfg = config.home-manager.users.${userName}; 5 "zsh-abbr"
6in { 6 ];
7 home-manager.users.${userName} = { 7
8 programs.zsh = { 8 home-manager.users.${userName} = let sysConfig = config; in { config, ... }: {
9 inherit dotDir; 9 config = {
10 enable = true; 10 programs.zsh = {
11 autocd = true; 11 dotDir = "${config.xdg.configHome}/zsh";
12 enableCompletion = true; 12 enable = true;
13 13 autocd = true;
14 plugins = [ 14 enableCompletion = true;
15 { name = "powerlevel10k"; 15 enableVteIntegration = true;
16 file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; 16 history = {
17 src = pkgs.zsh-powerlevel10k; 17 append = true;
18 } 18 expireDuplicatesFirst = true;
19 ]; 19 extended = true;
20 initExtraFirst = '' 20 findNoDups = true;
21 if [[ $TERM == "dumb" ]]; then 21 };
22 unsetopt zle 22 syntaxHighlighting.enable = true;
23 PS1='$ ' 23 zsh-abbr = {
24 return 24 enable = true;
25 fi 25 abbreviations = {
26 ''; 26 re = "systemctl restart";
27 initExtraBeforeCompInit = '' 27 ure = "systemctl --user restart";
28 source "${cfg.home.homeDirectory}/${p10kZsh}" 28 st = "systemctl status";
29 ''; 29 ust = "systemctl --user status";
30 initExtra = lib.mkAfter '' 30 };
31 source ${./zshrc} 31 globalAbbreviations = {
32 source "${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" 32 "L" = "| less";
33 ''; 33 "S" = "&> /dev/null";
34 "G" = "| grep";
35 "B" = "&> /dev/null &";
36 "BB" = "&> /dev/null &!";
37 "J" = lib.mkIf config.programs.jq.enable "| jq '.'";
38 };
39 };
40
41 initContent = lib.mkMerge [
42 (lib.mkBefore ''
43 if [[ $TERM == "dumb" ]]; then
44 unsetopt zle
45 PS1='$ '
46 return
47 fi
48 '')
49 (lib.mkAfter ''
50 source ${./zshrc}
51 '')
52 ];
53 };
54 programs.starship = {
55 enable = true;
56 settings = {
57 direnv.disabled = false;
58 add_newline = false;
59 directory.truncate_to_repo = false;
60 git_status.disabled = true;
61 };
62 };
63 };
34 }; 64 };
35 65
36 home.file.${p10kZsh}.source = ./p10k.zsh; 66 programs.zsh.enable = true;
67 environment.pathsToLink = [ "/share/zsh" ];
68 environment.shellAliases = lib.mkOverride 90 {};
37 }; 69 };
38} 70}
diff --git a/user-profiles/zsh/p10k.zsh b/user-profiles/zsh/p10k.zsh
deleted file mode 100644
index e3b364c2..00000000
--- a/user-profiles/zsh/p10k.zsh
+++ /dev/null
@@ -1,1578 +0,0 @@
1# Generated by Powerlevel10k configuration wizard on 2021-01-03 at 15:43 CET.
2# Based on romkatv/powerlevel10k/config/p10k-lean.zsh.
3# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
4# 2 lines, solid, no frame, darkest-ornaments, sparse, many icons, concise,
5# transient_prompt, instant_prompt=quiet.
6# Type `p10k configure` to generate another config.
7#
8# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
9# 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 # The list of segments shown on the left. Fill it with the most important segments.
33 typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
34 # =========================[ Line #1 ]=========================
35 # os_icon # os identifier
36 context # user@hostname
37 dir # current directory
38 vcs # git status
39 # =========================[ Line #2 ]=========================
40 newline # \n
41 context # user@hostname
42 dir
43 prompt_char # prompt symbol
44 )
45
46 # The list of segments shown on the right. Fill it with less important segments.
47 # Right prompt on the last prompt line (where you are typing your commands) gets
48 # automatically hidden when the input line reaches it. Right prompt above the
49 # last prompt line gets hidden if it would overlap with left prompt.
50 typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
51 # =========================[ Line #1 ]=========================
52 status # exit code of the last command
53 command_execution_time # duration of the last command
54 time # current time
55 background_jobs # presence of background jobs
56 # =========================[ Line #2 ]=========================
57 newline
58 direnv # direnv status (https://direnv.net/)
59 asdf # asdf version manager (https://github.com/asdf-vm/asdf)
60 virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
61 anaconda # conda environment (https://conda.io/)
62 pyenv # python environment (https://github.com/pyenv/pyenv)
63 goenv # go environment (https://github.com/syndbg/goenv)
64 nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
65 nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
66 nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
67 # node_version # node.js version
68 # go_version # go version (https://golang.org)
69 # rust_version # rustc version (https://www.rust-lang.org)
70 # dotnet_version # .NET version (https://dotnet.microsoft.com)
71 # php_version # php version (https://www.php.net/)
72 # laravel_version # laravel php framework version (https://laravel.com/)
73 # java_version # java version (https://www.java.com/)
74 # package # name@version from package.json (https://docs.npmjs.com/files/package.json)
75 rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
76 rvm # ruby version from rvm (https://rvm.io)
77 fvm # flutter version management (https://github.com/leoafarias/fvm)
78 luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
79 jenv # java version from jenv (https://github.com/jenv/jenv)
80 plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
81 phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
82 scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
83 haskell_stack # haskell version from stack (https://haskellstack.org/)
84 kubecontext # current kubernetes context (https://kubernetes.io/)
85 terraform # terraform workspace (https://www.terraform.io)
86 aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
87 aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
88 azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
89 gcloud # google cloud cli account and project (https://cloud.google.com/)
90 google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
91 nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
92 ranger # ranger shell (https://github.com/ranger/ranger)
93 nnn # nnn shell (https://github.com/jarun/nnn)
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 # vpn_ip # virtual private network indicator
98 # load # CPU load
99 # disk_usage # disk usage
100 # ram # free RAM
101 # swap # used swap
102 todo # todo items (https://github.com/todotxt/todo.txt-cli)
103 timewarrior # timewarrior tracking status (https://timewarrior.net/)
104 taskwarrior # taskwarrior task count (https://taskwarrior.org/)
105 status # exit code of the last command
106 command_execution_time # duration of the last command
107 time # current time
108 background_jobs # presence of background jobs
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 # Basic style options that define the overall look of your prompt. You probably don't want to
124 # change them.
125 typeset -g POWERLEVEL9K_BACKGROUND= # transparent background
126 typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace
127 typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space
128 typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol
129
130 # When set to true, icons appear before content on both sides of the prompt. When set
131 # to false, icons go after content. If empty or not set, icons go before content in the left
132 # prompt and after content in the right prompt.
133 #
134 # You can also override it for a specific segment:
135 #
136 # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false
137 #
138 # Or for a specific segment in specific state:
139 #
140 # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false
141 typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true
142
143 # Add an empty line before each prompt.
144 typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
145
146 # Connect left prompt lines with these symbols.
147 typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX=
148 typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX=
149 typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX=
150 # Connect right prompt lines with these symbols.
151 typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX=
152 typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX=
153 typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX=
154
155 # The left end of left prompt.
156 typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
157 # The right end of right prompt.
158 typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL=
159
160 # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll
161 # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and
162 # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below.
163 typeset -g POWERLEVEL9K_SHOW_RULER=false
164 typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·'
165 typeset -g POWERLEVEL9K_RULER_FOREGROUND=238
166
167 # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─'
168 # to make it easier to see the alignment between left and right prompt and to separate prompt
169 # from command output. It serves the same purpose as ruler (see above) without increasing
170 # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false
171 # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact
172 # prompt.
173 typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR='─'
174 if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then
175 # The color of the filler.
176 typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=238
177 # Add a space between the end of left prompt and the filler.
178 typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' '
179 # Add a space between the filler and the start of right prompt.
180 typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' '
181 # Start filler from the edge of the screen if there are no left segments on the first line.
182 typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}'
183 # End filler on the edge of the screen if there are no right segments on the first line.
184 typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}'
185 fi
186
187 #################################[ os_icon: os identifier ]##################################
188 # OS identifier color.
189 typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=
190 # Custom icon.
191 # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐'
192
193 ################################[ prompt_char: prompt symbol ]################################
194 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=2
195 # Default prompt symbol.
196 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯'
197 # Prompt symbol in command vi mode.
198 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮'
199 # Prompt symbol in visual vi mode.
200 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V'
201 # Prompt symbol in overwrite vi mode.
202 typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶'
203 typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true
204 # No line terminator if prompt_char is the last segment.
205 typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=''
206 # No line introducer if prompt_char is the first segment.
207 typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=
208
209 ##################################[ dir: current directory ]##################################
210 # Default current directory color.
211 typeset -g POWERLEVEL9K_DIR_FOREGROUND=31
212 # If directory is too long, shorten some of its segments to the shortest possible unique
213 # prefix. The shortened directory can be tab-completed to the original.
214 typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique
215 # Replace removed segment suffixes with this symbol.
216 typeset -g POWERLEVEL9K_SHORTEN_DELIMITER=
217 # Color of the shortened directory segments.
218 typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103
219 # Color of the anchor directory segments. Anchor segments are never shortened. The first
220 # segment is always an anchor.
221 typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39
222 # Display anchor directory segments in bold.
223 typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true
224 # Don't shorten directories that contain any of these files. They are anchors.
225 local anchor_files=(
226 .bzr
227 .citc
228 .git
229 .hg
230 .node-version
231 .python-version
232 .go-version
233 .ruby-version
234 .lua-version
235 .java-version
236 .perl-version
237 .php-version
238 .tool-version
239 .shorten_folder_marker
240 .svn
241 .terraform
242 CVS
243 Cargo.toml
244 composer.json
245 go.mod
246 package.json
247 stack.yaml
248 )
249 typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})"
250 # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains
251 # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is
252 # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first)
253 # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers
254 # and other directories don't.
255 #
256 # Optionally, "first" and "last" can be followed by ":<offset>" where <offset> is an integer.
257 # This moves the truncation point to the right (positive offset) or to the left (negative offset)
258 # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0"
259 # respectively.
260 typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false
261 # Don't shorten this many last directory segments. They are anchors.
262 typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
263 # Shorten directory if it's longer than this even if there is space for it. The value can
264 # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,
265 # directory will be shortened only when prompt doesn't fit or when other parameters demand it
266 # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).
267 # If set to `0`, directory will always be shortened to its minimum length.
268 typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=30%
269 # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this
270 # many columns for typing commands.
271 typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40
272 # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least
273 # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.
274 typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50
275 # If set to true, embed a hyperlink into the directory. Useful for quickly
276 # opening a directory in the file manager simply by clicking the link.
277 # Can also be handy when the directory is shortened, as it allows you to see
278 # the full directory that was used in previous commands.
279 typeset -g POWERLEVEL9K_DIR_HYPERLINK=false
280
281 # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
282 # and POWERLEVEL9K_DIR_CLASSES below.
283 typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
284
285 # The default icon shown next to non-writable and non-existent directories when
286 # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3.
287 # typeset -g POWERLEVEL9K_LOCK_ICON='⭐'
288
289 # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different
290 # directories. It must be an array with 3 * N elements. Each triplet consists of:
291 #
292 # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with
293 # extended_glob option enabled.
294 # 2. Directory class for the purpose of styling.
295 # 3. An empty string.
296 #
297 # Triplets are tried in order. The first triplet whose pattern matches $PWD wins.
298 #
299 # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories
300 # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively.
301 #
302 # For example, given these settings:
303 #
304 # typeset -g POWERLEVEL9K_DIR_CLASSES=(
305 # '~/work(|/*)' WORK ''
306 # '~(|/*)' HOME ''
307 # '*' DEFAULT '')
308 #
309 # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one
310 # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or
311 # WORK_NON_EXISTENT.
312 #
313 # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an
314 # option to define custom colors and icons for different directory classes.
315 #
316 # # Styling for WORK.
317 # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐'
318 # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31
319 # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103
320 # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39
321 #
322 # # Styling for WORK_NOT_WRITABLE.
323 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
324 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31
325 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103
326 # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39
327 #
328 # # Styling for WORK_NON_EXISTENT.
329 # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐'
330 # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=31
331 # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=103
332 # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=39
333 #
334 # If a styling parameter isn't explicitly defined for some class, it falls back to the classless
335 # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls
336 # back to POWERLEVEL9K_DIR_FOREGROUND.
337 #
338 typeset -g POWERLEVEL9K_DIR_CLASSES=()
339
340 # Custom prefix.
341 # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
342
343 #####################################[ vcs: git status ]######################################
344 # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
345 typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=''
346
347 # Untracked files icon. It's really a question mark, your font isn't broken.
348 # Change the value of this parameter to show a different icon.
349 typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?'
350
351 # Formatter for Git status.
352 #
353 # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.
354 #
355 # You can edit the function to customize how Git status looks.
356 #
357 # VCS_STATUS_* parameters are set by gitstatus plugin. See reference:
358 # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.
359 function my_git_formatter() {
360 emulate -L zsh
361
362 if [[ -n $P9K_CONTENT ]]; then
363 # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from
364 # gitstatus plugin). VCS_STATUS_* parameters are not available in this case.
365 typeset -g my_git_format=$P9K_CONTENT
366 return
367 fi
368
369 if (( $1 )); then
370 # Styling for up-to-date Git status.
371 local meta='%f' # default foreground
372 local clean='%76F' # green foreground
373 local modified='%178F' # yellow foreground
374 local untracked='%39F' # blue foreground
375 local conflicted='%196F' # red foreground
376 else
377 # Styling for incomplete and stale Git status.
378 local meta='%244F' # grey foreground
379 local clean='%244F' # grey foreground
380 local modified='%244F' # grey foreground
381 local untracked='%244F' # grey foreground
382 local conflicted='%244F' # grey foreground
383 fi
384
385 local res
386 local where # branch or tag
387 if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
388 res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}"
389 where=${(V)VCS_STATUS_LOCAL_BRANCH}
390 elif [[ -n $VCS_STATUS_TAG ]]; then
391 res+="${meta}#"
392 where=${(V)VCS_STATUS_TAG}
393 fi
394
395 # If local branch name or tag is at most 32 characters long, show it in full.
396 # Otherwise show the first 12 … the last 12.
397 # Tip: To always show local branch name in full without truncation, delete the next line.
398 (( $#where > 32 )) && where[13,-13]="…"
399
400 res+="${clean}${where//\%/%%}" # escape %
401
402 # Display the current Git commit if there is no branch or tag.
403 # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line.
404 [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}"
405
406 # Show tracking branch name if it differs from local branch.
407 if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then
408 res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape %
409 fi
410
411 # ⇣42 if behind the remote.
412 (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
413 # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
414 (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
415 (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
416 # ⇠42 if behind the push remote.
417 (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
418 (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
419 # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.
420 (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}"
421 # *42 if have stashes.
422 (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}"
423 # 'merge' if the repo is in an unusual state.
424 [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}"
425 # ~42 if have merge conflicts.
426 (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
427 # +42 if have staged changes.
428 (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
429 # !42 if have unstaged changes.
430 (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
431 # ?42 if have untracked files. It's really a question mark, your font isn't broken.
432 # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.
433 # Remove the next line if you don't want to see untracked files at all.
434 (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}"
435 # "─" if the number of unstaged files is unknown. This can happen due to
436 # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower
437 # than the number of files in the Git index, or due to bash.showDirtyState being set to false
438 # in the repository config. The number of staged and untracked files may also be unknown
439 # in this case.
440 (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─"
441
442 typeset -g my_git_format=$res
443 }
444 functions -M my_git_formatter 2>/dev/null
445
446 # Don't count the number of unstaged, untracked and conflicted files in Git repositories with
447 # more than this many files in the index. Negative value means infinity.
448 #
449 # If you are working in Git repositories with tens of millions of files and seeing performance
450 # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output
451 # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's
452 # config: `git config bash.showDirtyState false`.
453 typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1
454
455 # Don't show Git status in prompt for repositories whose workdir matches this pattern.
456 # For example, if set to '~', the Git repository at $HOME/.git will be ignored.
457 # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
458 # typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
459
460 # Disable the default Git status formatting.
461 typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true
462 # Install our own Git status formatter.
463 typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}'
464 typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}'
465 # Enable counters for staged, unstaged, etc.
466 typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1
467
468 # Icon color.
469 typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76
470 typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244
471 # Custom icon.
472 # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'
473 # Custom prefix.
474 # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon '
475
476 # Show status of repositories of these types. You can add svn and/or hg if you are
477 # using them. If you do, your prompt may become slow even when your current directory
478 # isn't in an svn or hg reposotiry.
479 typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
480
481 # These settings are used for repositories other than Git or when gitstatusd fails and
482 # Powerlevel10k has to fall back to using vcs_info.
483 typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76
484 typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76
485 typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178
486
487 ##########################[ status: exit code of the last command ]###########################
488 # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and
489 # style them independently from the regular OK and ERROR state.
490 typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true
491
492 # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as
493 # it will signify success by turning green.
494 typeset -g POWERLEVEL9K_STATUS_OK=false
495 typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70
496 typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔'
497
498 # Status when some part of a pipe command fails but the overall exit status is zero. It may look
499 # like this: 1|0.
500 typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true
501 typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70
502 typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔'
503
504 # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as
505 # it will signify error by turning red.
506 typeset -g POWERLEVEL9K_STATUS_ERROR=true
507 typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160
508 typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘'
509
510 # Status when the last command was terminated by a signal.
511 typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true
512 typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160
513 # Use terse signal names: "INT" instead of "SIGINT(2)".
514 typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false
515 typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘'
516
517 # Status when some part of a pipe command fails and the overall exit status is also non-zero.
518 # It may look like this: 1|0.
519 typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true
520 typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160
521 typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘'
522
523 ###################[ command_execution_time: duration of the last command ]###################
524 # Show duration of the last command if takes at least this many seconds.
525 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3
526 # Show this many fractional digits. Zero means round to seconds.
527 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
528 # Execution time color.
529 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101
530 # Duration format: 1d 2h 3m 4s.
531 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s'
532 # Custom icon.
533 # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'
534 # Custom prefix.
535 # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook '
536
537 #######################[ background_jobs: presence of background jobs ]#######################
538 # Don't show the number of background jobs.
539 typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false
540 # Background jobs color.
541 typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70
542 # Custom icon.
543 # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'
544
545 #######################[ direnv: direnv status (https://direnv.net/) ]########################
546 # Direnv color.
547 typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178
548 # Custom icon.
549 # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
550
551 ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############
552 # Default asdf color. Only used to display tools for which there is no color override (see below).
553 # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND.
554 typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66
555
556 # There are four parameters that can be used to hide asdf tools. Each parameter describes
557 # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at
558 # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to
559 # hide a tool, it gets shown.
560 #
561 # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and
562 # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:
563 #
564 # asdf local python 3.8.1
565 # asdf global python 3.8.1
566 #
567 # After running both commands the current python version is 3.8.1 and its source is "local" as
568 # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,
569 # it'll hide python version in this case because 3.8.1 is the same as the global version.
570 # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't
571 # contain "local".
572
573 # Hide tool versions that don't come from one of these sources.
574 #
575 # Available sources:
576 #
577 # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"
578 # - local `asdf current` says "set by /some/not/home/directory/file"
579 # - global `asdf current` says "set by /home/username/file"
580 #
581 # Note: If this parameter is set to (shell local global), it won't hide tools.
582 # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.
583 typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global)
584
585 # If set to false, hide tool versions that are the same as global.
586 #
587 # Note: The name of this parameter doesn't reflect its meaning at all.
588 # Note: If this parameter is set to true, it won't hide tools.
589 # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.
590 typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false
591
592 # If set to false, hide tool versions that are equal to "system".
593 #
594 # Note: If this parameter is set to true, it won't hide tools.
595 # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.
596 typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true
597
598 # If set to non-empty value, hide tools unless there is a file matching the specified file pattern
599 # in the current directory, or its parent directory, or its grandparent directory, and so on.
600 #
601 # Note: If this parameter is set to empty value, it won't hide tools.
602 # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.
603 # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.
604 #
605 # Example: Hide nodejs version when there is no package.json and no *.js files in the current
606 # directory, in `..`, in `../..` and so on.
607 #
608 # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'
609 typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB=
610
611 # Ruby version from asdf.
612 typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168
613 # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'
614 # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'
615
616 # Python version from asdf.
617 typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37
618 # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'
619 # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'
620
621 # Go version from asdf.
622 typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37
623 # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
624 # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
625
626 # Node.js version from asdf.
627 typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70
628 # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'
629 # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'
630
631 # Rust version from asdf.
632 typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37
633 # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'
634 # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'
635
636 # .NET Core version from asdf.
637 typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134
638 # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'
639 # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar'
640
641 # Flutter version from asdf.
642 typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38
643 # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'
644 # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'
645
646 # Lua version from asdf.
647 typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32
648 # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'
649 # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'
650
651 # Java version from asdf.
652 typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32
653 # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'
654 # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'
655
656 # Perl version from asdf.
657 typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67
658 # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'
659 # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'
660
661 # Erlang version from asdf.
662 typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125
663 # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'
664 # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'
665
666 # Elixir version from asdf.
667 typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129
668 # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'
669 # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'
670
671 # Postgres version from asdf.
672 typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31
673 # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'
674 # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'
675
676 # PHP version from asdf.
677 typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99
678 # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'
679 # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'
680
681 # Haskell version from asdf.
682 typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172
683 # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
684 # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar'
685
686 # Julia version from asdf.
687 typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70
688 # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐'
689 # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar'
690
691 ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########
692 # NordVPN connection indicator color.
693 typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39
694 # Hide NordVPN connection indicator when not connected.
695 typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION=
696 typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION=
697 # Custom icon.
698 # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'
699
700 #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################
701 # Ranger shell color.
702 typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178
703 # Custom icon.
704 # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'
705
706 ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################
707 # Nnn shell color.
708 typeset -g POWERLEVEL9K_NNN_FOREGROUND=72
709 # Custom icon.
710 # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
711
712 ###########################[ vim_shell: vim shell indicator (:sh) ]###########################
713 # Vim shell indicator color.
714 typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34
715 # Custom icon.
716 # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
717
718 ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######
719 # Midnight Commander shell color.
720 typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178
721 # Custom icon.
722 # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'
723
724 #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##
725 # Nix shell color.
726 typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
727
728 # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
729 # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
730
731 # Custom icon.
732 # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
733
734 ##################################[ disk_usage: disk usage ]##################################
735 # Colors for different levels of disk usage.
736 typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
737 typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220
738 typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160
739 # Thresholds for different levels of disk usage (percentage points).
740 typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
741 typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
742 # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.
743 typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
744 # Custom icon.
745 # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
746
747 ######################################[ ram: free RAM ]#######################################
748 # RAM color.
749 typeset -g POWERLEVEL9K_RAM_FOREGROUND=66
750 # Custom icon.
751 # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'
752
753 #####################################[ swap: used swap ]######################################
754 # Swap color.
755 typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96
756 # Custom icon.
757 # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'
758
759 ######################################[ load: CPU load ]######################################
760 # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.
761 typeset -g POWERLEVEL9K_LOAD_WHICH=5
762 # Load color when load is under 50%.
763 typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66
764 # Load color when load is between 50% and 70%.
765 typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178
766 # Load color when load is over 70%.
767 typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166
768 # Custom icon.
769 # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'
770
771 ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################
772 # Todo color.
773 typeset -g POWERLEVEL9K_TODO_FOREGROUND=110
774 # Hide todo when the total number of tasks is zero.
775 typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true
776 # Hide todo when the number of tasks after filtering is zero.
777 typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false
778
779 # Todo format. The following parameters are available within the expansion.
780 #
781 # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks.
782 # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering.
783 #
784 # These variables correspond to the last line of the output of `todo.sh -p ls`:
785 #
786 # TODO: 24 of 42 tasks shown
787 #
788 # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.
789 #
790 # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'
791
792 # Custom icon.
793 # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'
794
795 ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############
796 # Timewarrior color.
797 typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110
798 # If the tracked task is longer than 24 characters, truncate and append "…".
799 # Tip: To always display tasks without truncation, delete the following parameter.
800 # Tip: To hide task names and display just the icon when time tracking is enabled, set the
801 # value of the following parameter to "".
802 typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'
803
804 # Custom icon.
805 # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
806
807 ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]##############
808 # Taskwarrior color.
809 typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74
810
811 # Taskwarrior segment format. The following parameters are available within the expansion.
812 #
813 # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`.
814 # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`.
815 #
816 # Zero values are represented as empty parameters.
817 #
818 # The default format:
819 #
820 # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT'
821 #
822 # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT'
823
824 # Custom icon.
825 # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
826
827 ##################################[ context: user@hostname ]##################################
828 # Context color when running with privileges.
829 typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
830 # Context color in SSH without privileges.
831 typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=31
832 # Default context color (no privileges, no SSH).
833 typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=31
834
835 # Context format when running with privileges: bold user@hostname.
836 typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m'
837 # Context format when in SSH without privileges: user@hostname.
838 typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m'
839 # Default context format (no privileges, no SSH): user@hostname.
840 typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m'
841
842 # Don't show context unless running with privileges or in SSH.
843 # Tip: Remove the next line to always show context.
844 typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=
845
846 # Custom icon.
847 # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'
848 # Custom prefix.
849 # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith '
850
851 ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###
852 # Python virtual environment color.
853 typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37
854 # Don't show Python version next to the virtual environment name.
855 typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false
856 # If set to "false", won't show virtualenv if pyenv is already shown.
857 # If set to "if-different", won't show virtualenv if it's the same as pyenv.
858 typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false
859 # Separate environment name from Python version only with a space.
860 typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER=
861 # Custom icon.
862 # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
863
864 #####################[ anaconda: conda environment (https://conda.io/) ]######################
865 # Anaconda environment color.
866 typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37
867
868 # Anaconda segment format. The following parameters are available within the expansion.
869 #
870 # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment.
871 # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment.
872 # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below).
873 # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version).
874 #
875 # CONDA_PROMPT_MODIFIER can be configured with the following command:
876 #
877 # conda config --set env_prompt '({default_env}) '
878 #
879 # The last argument is a Python format string that can use the following variables:
880 #
881 # - prefix The same as CONDA_PREFIX.
882 # - default_env The same as CONDA_DEFAULT_ENV.
883 # - name The last segment of CONDA_PREFIX.
884 # - stacked_env Comma-separated list of names in the environment stack. The first element is
885 # always the same as default_env.
886 #
887 # Note: '({default_env}) ' is the default value of env_prompt.
888 #
889 # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER
890 # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former
891 # is empty.
892 typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}'
893
894 # Custom icon.
895 # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'
896
897 ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################
898 # Pyenv color.
899 typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37
900 # Hide python version if it doesn't come from one of these sources.
901 typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global)
902 # If set to false, hide python version if it's the same as global:
903 # $(pyenv version-name) == $(pyenv global).
904 typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false
905 # If set to false, hide python version if it's equal to "system".
906 typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true
907
908 # Pyenv segment format. The following parameters are available within the expansion.
909 #
910 # - P9K_CONTENT Current pyenv environment (pyenv version-name).
911 # - P9K_PYENV_PYTHON_VERSION Current python version (python --version).
912 #
913 # The default format has the following logic:
914 #
915 # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not
916 # empty and unequal to $P9K_CONTENT.
917 # 2. Otherwise display just "$P9K_CONTENT".
918 typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}'
919
920 # Custom icon.
921 # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
922
923 ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################
924 # Goenv color.
925 typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37
926 # Hide go version if it doesn't come from one of these sources.
927 typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global)
928 # If set to false, hide go version if it's the same as global:
929 # $(goenv version-name) == $(goenv global).
930 typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false
931 # If set to false, hide go version if it's equal to "system".
932 typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true
933 # Custom icon.
934 # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
935
936 ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########
937 # Nodenv color.
938 typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70
939 # Hide node version if it doesn't come from one of these sources.
940 typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global)
941 # If set to false, hide node version if it's the same as global:
942 # $(nodenv version-name) == $(nodenv global).
943 typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false
944 # If set to false, hide node version if it's equal to "system".
945 typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true
946 # Custom icon.
947 # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
948
949 ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
950 # Nvm color.
951 typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
952 # Custom icon.
953 # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
954
955 ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############
956 # Nodeenv color.
957 typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70
958 # Don't show Node version next to the environment name.
959 typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false
960 # Separate environment name from Node version only with a space.
961 typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER=
962 # Custom icon.
963 # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
964
965 ##############################[ node_version: node.js version ]###############################
966 # Node version color.
967 typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70
968 # Show node version only when in a directory tree containing package.json.
969 typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true
970 # Custom icon.
971 # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
972
973 #######################[ go_version: go version (https://golang.org) ]########################
974 # Go version color.
975 typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37
976 # Show go version only when in a go project subdirectory.
977 typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true
978 # Custom icon.
979 # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
980
981 #################[ rust_version: rustc version (https://www.rust-lang.org) ]##################
982 # Rust version color.
983 typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37
984 # Show rust version only when in a rust project subdirectory.
985 typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true
986 # Custom icon.
987 # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
988
989 ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################
990 # .NET version color.
991 typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134
992 # Show .NET version only when in a .NET project subdirectory.
993 typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true
994 # Custom icon.
995 # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
996
997 #####################[ php_version: php version (https://www.php.net/) ]######################
998 # PHP version color.
999 typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99
1000 # Show PHP version only when in a PHP project subdirectory.
1001 typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true
1002 # Custom icon.
1003 # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
1004
1005 ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########
1006 # Laravel version color.
1007 typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161
1008 # Custom icon.
1009 # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
1010
1011 ####################[ java_version: java version (https://www.java.com/) ]####################
1012 # Java version color.
1013 typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32
1014 # Show java version only when in a java project subdirectory.
1015 typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true
1016 # Show brief version.
1017 typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false
1018 # Custom icon.
1019 # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
1020
1021 ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]####
1022 # Package color.
1023 typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117
1024 # Package format. The following parameters are available within the expansion.
1025 #
1026 # - P9K_PACKAGE_NAME The value of `name` field in package.json.
1027 # - P9K_PACKAGE_VERSION The value of `version` field in package.json.
1028 #
1029 # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}'
1030 # Custom icon.
1031 # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'
1032
1033 #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############
1034 # Rbenv color.
1035 typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168
1036 # Hide ruby version if it doesn't come from one of these sources.
1037 typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global)
1038 # If set to false, hide ruby version if it's the same as global:
1039 # $(rbenv version-name) == $(rbenv global).
1040 typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false
1041 # If set to false, hide ruby version if it's equal to "system".
1042 typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true
1043 # Custom icon.
1044 # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1045
1046 #######################[ rvm: ruby version from rvm (https://rvm.io) ]########################
1047 # Rvm color.
1048 typeset -g POWERLEVEL9K_RVM_FOREGROUND=168
1049 # Don't show @gemset at the end.
1050 typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false
1051 # Don't show ruby- at the front.
1052 typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false
1053 # Custom icon.
1054 # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
1055
1056 ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############
1057 # Fvm color.
1058 typeset -g POWERLEVEL9K_FVM_FOREGROUND=38
1059 # Custom icon.
1060 # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
1061
1062 ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########
1063 # Lua color.
1064 typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32
1065 # Hide lua version if it doesn't come from one of these sources.
1066 typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global)
1067 # If set to false, hide lua version if it's the same as global:
1068 # $(luaenv version-name) == $(luaenv global).
1069 typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false
1070 # If set to false, hide lua version if it's equal to "system".
1071 typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true
1072 # Custom icon.
1073 # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1074
1075 ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################
1076 # Java color.
1077 typeset -g POWERLEVEL9K_JENV_FOREGROUND=32
1078 # Hide java version if it doesn't come from one of these sources.
1079 typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global)
1080 # If set to false, hide java version if it's the same as global:
1081 # $(jenv version-name) == $(jenv global).
1082 typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false
1083 # If set to false, hide java version if it's equal to "system".
1084 typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true
1085 # Custom icon.
1086 # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1087
1088 ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############
1089 # Perl color.
1090 typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67
1091 # Hide perl version if it doesn't come from one of these sources.
1092 typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global)
1093 # If set to false, hide perl version if it's the same as global:
1094 # $(plenv version-name) == $(plenv global).
1095 typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false
1096 # If set to false, hide perl version if it's equal to "system".
1097 typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true
1098 # Custom icon.
1099 # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1100
1101 ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
1102 # PHP color.
1103 typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
1104 # Hide php version if it doesn't come from one of these sources.
1105 typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global)
1106 # If set to false, hide php version if it's the same as global:
1107 # $(phpenv version-name) == $(phpenv global).
1108 typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false
1109 # If set to false, hide php version if it's equal to "system".
1110 typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true
1111 # Custom icon.
1112 # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1113
1114 #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]#######
1115 # Scala color.
1116 typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160
1117 # Hide scala version if it doesn't come from one of these sources.
1118 typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global)
1119 # If set to false, hide scala version if it's the same as global:
1120 # $(scalaenv version-name) == $(scalaenv global).
1121 typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false
1122 # If set to false, hide scala version if it's equal to "system".
1123 typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true
1124 # Custom icon.
1125 # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1126
1127 ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]###########
1128 # Haskell color.
1129 typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172
1130 # Hide haskell version if it doesn't come from one of these sources.
1131 #
1132 # shell: version is set by STACK_YAML
1133 # local: version is set by stack.yaml up the directory tree
1134 # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml)
1135 typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local)
1136 # If set to false, hide haskell version if it's the same as in the implicit global project.
1137 typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true
1138 # Custom icon.
1139 # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
1140
1141 #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
1142 # Show kubecontext only when the the command you are typing invokes one of these tools.
1143 # Tip: Remove the next line to always show kubecontext.
1144 typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile'
1145
1146 # Kubernetes context classes for the purpose of using different colors, icons and expansions with
1147 # different contexts.
1148 #
1149 # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element
1150 # in each pair defines a pattern against which the current kubernetes context gets matched.
1151 # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
1152 # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,
1153 # you'll see this value in your prompt. The second element of each pair in
1154 # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The
1155 # first match wins.
1156 #
1157 # For example, given these settings:
1158 #
1159 # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
1160 # '*prod*' PROD
1161 # '*test*' TEST
1162 # '*' DEFAULT)
1163 #
1164 # If your current kubernetes context is "deathray-testing/default", its class is TEST
1165 # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.
1166 #
1167 # You can define different colors, icons and content expansions for different classes:
1168 #
1169 # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28
1170 # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
1171 # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
1172 typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
1173 # '*prod*' PROD # These values are examples that are unlikely
1174 # '*test*' TEST # to match your needs. Customize them as needed.
1175 '*' DEFAULT)
1176 typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
1177 # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
1178
1179 # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
1180 # segment. Parameter expansions are very flexible and fast, too. See reference:
1181 # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
1182 #
1183 # Within the expansion the following parameters are always available:
1184 #
1185 # - P9K_CONTENT The content that would've been displayed if there was no content
1186 # expansion defined.
1187 # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the
1188 # output of `kubectl config get-contexts`.
1189 # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the
1190 # output of `kubectl config get-contexts`.
1191 # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE
1192 # in the output of `kubectl config get-contexts`. If there is no
1193 # namespace, the parameter is set to "default".
1194 # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the
1195 # output of `kubectl config get-contexts`.
1196 #
1197 # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),
1198 # the following extra parameters are available:
1199 #
1200 # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks".
1201 # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID.
1202 # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone.
1203 # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster.
1204 #
1205 # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,
1206 # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":
1207 #
1208 # - P9K_KUBECONTEXT_CLOUD_NAME=gke
1209 # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account
1210 # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a
1211 # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
1212 #
1213 # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":
1214 #
1215 # - P9K_KUBECONTEXT_CLOUD_NAME=eks
1216 # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
1217 # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
1218 # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
1219 typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
1220 # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
1221 POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
1222 # Append the current context's namespace if it's not "default".
1223 POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
1224
1225 # Custom prefix.
1226 # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '
1227
1228 ################[ terraform: terraform workspace (https://www.terraform.io) ]#################
1229 # Don't show terraform workspace if it's literally "default".
1230 typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false
1231 # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element
1232 # in each pair defines a pattern against which the current terraform workspace gets matched.
1233 # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
1234 # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,
1235 # you'll see this value in your prompt. The second element of each pair in
1236 # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The
1237 # first match wins.
1238 #
1239 # For example, given these settings:
1240 #
1241 # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
1242 # '*prod*' PROD
1243 # '*test*' TEST
1244 # '*' OTHER)
1245 #
1246 # If your current terraform workspace is "project_test", its class is TEST because "project_test"
1247 # doesn't match the pattern '*prod*' but does match '*test*'.
1248 #
1249 # You can define different colors, icons and content expansions for different classes:
1250 #
1251 # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28
1252 # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
1253 # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
1254 typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(
1255 # '*prod*' PROD # These values are examples that are unlikely
1256 # '*test*' TEST # to match your needs. Customize them as needed.
1257 '*' OTHER)
1258 typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
1259 # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
1260
1261 #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
1262 # Show aws only when the the command you are typing invokes one of these tools.
1263 # Tip: Remove the next line to always show aws.
1264 typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt'
1265
1266 # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
1267 # in each pair defines a pattern against which the current AWS profile gets matched.
1268 # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
1269 # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,
1270 # you'll see this value in your prompt. The second element of each pair in
1271 # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The
1272 # first match wins.
1273 #
1274 # For example, given these settings:
1275 #
1276 # typeset -g POWERLEVEL9K_AWS_CLASSES=(
1277 # '*prod*' PROD
1278 # '*test*' TEST
1279 # '*' DEFAULT)
1280 #
1281 # If your current AWS profile is "company_test", its class is TEST
1282 # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.
1283 #
1284 # You can define different colors, icons and content expansions for different classes:
1285 #
1286 # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28
1287 # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
1288 # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
1289 typeset -g POWERLEVEL9K_AWS_CLASSES=(
1290 # '*prod*' PROD # These values are examples that are unlikely
1291 # '*test*' TEST # to match your needs. Customize them as needed.
1292 '*' DEFAULT)
1293 typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208
1294 # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
1295
1296 #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#
1297 # AWS Elastic Beanstalk environment color.
1298 typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70
1299 # Custom icon.
1300 # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
1301
1302 ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
1303 # Show azure only when the the command you are typing invokes one of these tools.
1304 # Tip: Remove the next line to always show azure.
1305 typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
1306 # Azure account name color.
1307 typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
1308 # Custom icon.
1309 # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
1310
1311 ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
1312 # Show gcloud only when the the command you are typing invokes one of these tools.
1313 # Tip: Remove the next line to always show gcloud.
1314 typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
1315 # Google cloud color.
1316 typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
1317
1318 # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or
1319 # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative
1320 # enough. You can use the following parameters in the expansions. Each of them corresponds to the
1321 # output of `gcloud` tool.
1322 #
1323 # Parameter | Source
1324 # -------------------------|--------------------------------------------------------------------
1325 # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)'
1326 # P9K_GCLOUD_ACCOUNT | gcloud config get-value account
1327 # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project
1328 # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)'
1329 #
1330 # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'.
1331 #
1332 # Obtaining project name requires sending a request to Google servers. This can take a long time
1333 # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud
1334 # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets
1335 # set and gcloud prompt segment transitions to state COMPLETE.
1336 #
1337 # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL
1338 # and COMPLETE. You can also hide gcloud in state PARTIAL by setting
1339 # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and
1340 # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty.
1341 typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}'
1342 typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}'
1343
1344 # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name
1345 # this often. Negative value disables periodic polling. In this mode project name is retrieved
1346 # only when the current configuration, account or project id changes.
1347 typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60
1348
1349 # Custom icon.
1350 # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
1351
1352 #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
1353 # Show google_app_cred only when the the command you are typing invokes one of these tools.
1354 # Tip: Remove the next line to always show google_app_cred.
1355 typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
1356
1357 # Google application credentials classes for the purpose of using different colors, icons and
1358 # expansions with different credentials.
1359 #
1360 # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first
1361 # element in each pair defines a pattern against which the current kubernetes context gets
1362 # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion
1363 # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION
1364 # parameters, you'll see this value in your prompt. The second element of each pair in
1365 # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.
1366 # The first match wins.
1367 #
1368 # For example, given these settings:
1369 #
1370 # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
1371 # '*:*prod*:*' PROD
1372 # '*:*test*:*' TEST
1373 # '*' DEFAULT)
1374 #
1375 # If your current Google application credentials is "service_account deathray-testing x@y.com",
1376 # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.
1377 #
1378 # You can define different colors, icons and content expansions for different classes:
1379 #
1380 # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28
1381 # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
1382 # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'
1383 typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(
1384 # '*:*prod*:*' PROD # These values are examples that are unlikely
1385 # '*:*test*:*' TEST # to match your needs. Customize them as needed.
1386 '*' DEFAULT)
1387 typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32
1388 # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
1389
1390 # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by
1391 # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:
1392 # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.
1393 #
1394 # You can use the following parameters in the expansion. Each of them corresponds to one of the
1395 # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.
1396 #
1397 # Parameter | JSON key file field
1398 # ---------------------------------+---------------
1399 # P9K_GOOGLE_APP_CRED_TYPE | type
1400 # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id
1401 # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email
1402 #
1403 # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
1404 typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
1405
1406 ###############################[ public_ip: public IP address ]###############################
1407 # Public IP color.
1408 typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
1409 # Custom icon.
1410 # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
1411
1412 ########################[ vpn_ip: virtual private network indicator ]#########################
1413 # VPN IP color.
1414 typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81
1415 # When on VPN, show just an icon without the IP address.
1416 # Tip: To display the private IP address when on VPN, remove the next line.
1417 typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
1418 # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
1419 # to see the name of the interface.
1420 typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*'
1421 # If set to true, show one segment per matching network interface. If set to false, show only
1422 # one segment corresponding to the first matching network interface.
1423 # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
1424 typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false
1425 # Custom icon.
1426 # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
1427
1428 ###########[ ip: ip address and bandwidth usage for a specified network interface ]###########
1429 # IP color.
1430 typeset -g POWERLEVEL9K_IP_FOREGROUND=38
1431 # The following parameters are accessible within the expansion:
1432 #
1433 # Parameter | Meaning
1434 # ----------------------+---------------
1435 # P9K_IP_IP | IP address
1436 # P9K_IP_INTERFACE | network interface
1437 # P9K_IP_RX_BYTES | total number of bytes received
1438 # P9K_IP_TX_BYTES | total number of bytes sent
1439 # P9K_IP_RX_RATE | receive rate (since last prompt)
1440 # P9K_IP_TX_RATE | send rate (since last prompt)
1441 typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}'
1442 # Show information for the first network interface whose name matches this regular expression.
1443 # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.
1444 typeset -g POWERLEVEL9K_IP_INTERFACE='e.*'
1445 # Custom icon.
1446 # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'
1447
1448 #########################[ proxy: system-wide http/https/ftp proxy ]##########################
1449 # Proxy color.
1450 typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68
1451 # Custom icon.
1452 # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'
1453
1454 ################################[ battery: internal battery ]#################################
1455 # Show battery in red when it's below this level and not connected to power supply.
1456 typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20
1457 typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160
1458 # Show battery in green when it's charging or fully charged.
1459 typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70
1460 # Show battery in yellow when it's discharging.
1461 typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
1462 # Battery pictograms going from low to high level of charge.
1463 typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'
1464 # Don't show the remaining time to charge/discharge.
1465 typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
1466
1467 #####################################[ wifi: wifi speed ]#####################################
1468 # WiFi color.
1469 typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68
1470 # Custom icon.
1471 # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
1472
1473 # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
1474 #
1475 # # Wifi colors and icons for different signal strength levels (low to high).
1476 # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values
1477 # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
1478 #
1479 # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
1480 # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
1481 #
1482 # The following parameters are accessible within the expansions:
1483 #
1484 # Parameter | Meaning
1485 # ----------------------+---------------
1486 # P9K_WIFI_SSID | service set identifier, a.k.a. network name
1487 # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown
1488 # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
1489 # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
1490 # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
1491 # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
1492
1493 ####################################[ time: current time ]####################################
1494 # Current time color.
1495 typeset -g POWERLEVEL9K_TIME_FOREGROUND=66
1496 # Format for the current time: 09:51:02. See `man 3 strftime`.
1497 typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M}'
1498 # If set to true, time will update when you hit enter. This way prompts for the past
1499 # commands will contain the start times of their commands as opposed to the default
1500 # behavior where they contain the end times of their preceding commands.
1501 typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false
1502 # Custom icon.
1503 typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION=''
1504 # Custom prefix.
1505 # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '
1506
1507 # Example of a user-defined prompt segment. Function prompt_example will be called on every
1508 # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
1509 # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
1510 #
1511 # Type `p10k help segment` for documentation and a more sophisticated example.
1512 function prompt_example() {
1513 p10k segment -f 208 -i '⭐' -t 'hello, %n'
1514 }
1515
1516 # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job
1517 # is to generate the prompt segment for display in instant prompt. See
1518 # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
1519 #
1520 # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function
1521 # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k
1522 # will replay these calls without actually calling instant_prompt_*. It is imperative that
1523 # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this
1524 # rule is not observed, the content of instant prompt will be incorrect.
1525 #
1526 # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If
1527 # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.
1528 function instant_prompt_example() {
1529 # Since prompt_example always makes the same `p10k segment` calls, we can call it from
1530 # instant_prompt_example. This will give us the same `example` prompt segment in the instant
1531 # and regular prompts.
1532 prompt_example
1533 }
1534
1535 # User-defined prompt segments can be customized the same way as built-in segments.
1536 # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208
1537 # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'
1538
1539 # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt
1540 # when accepting a command line. Supported values:
1541 #
1542 # - off: Don't change prompt when accepting a command line.
1543 # - always: Trim down prompt when accepting a command line.
1544 # - same-dir: Trim down prompt when accepting a command line unless this is the first command
1545 # typed after changing current working directory.
1546 typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
1547
1548 function p10k-on-pre-prompt() { p10k display '1'=show '2/left/(dir|context)'=hide '2/right/*'=show '2/right/(status|command_execution_time|time|background_jobs)'=hide }
1549 function p10k-on-post-prompt() { p10k display '2/left/(dir|context|prompt_char)'=show 'empty_line|1'=hide '2/right/*'=hide '2/right/(status|command_execution_time|time|background_jobs)'=show }
1550
1551 # Instant prompt mode.
1552 #
1553 # - off: Disable instant prompt. Choose this if you've tried instant prompt and found
1554 # it incompatible with your zsh configuration files.
1555 # - quiet: Enable instant prompt and don't print warnings when detecting console output
1556 # during zsh initialization. Choose this if you've read and understood
1557 # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
1558 # - verbose: Enable instant prompt and print a warning when detecting console output during
1559 # zsh initialization. Choose this if you've never tried instant prompt, haven't
1560 # seen the warning, or if you are unsure what this all means.
1561 typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
1562
1563 # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
1564 # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
1565 # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you
1566 # really need it.
1567 typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true
1568
1569 # If p10k is already loaded, reload configuration.
1570 # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.
1571 (( ! $+functions[p10k] )) || p10k reload
1572}
1573
1574# Tell `p10k configure` which file it should overwrite.
1575typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a}
1576
1577(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]}
1578'builtin' 'unset' 'p10k_config_opts'
diff --git a/user-profiles/zsh/zshrc b/user-profiles/zsh/zshrc
index a83a8069..a41c9d9c 100644
--- a/user-profiles/zsh/zshrc
+++ b/user-profiles/zsh/zshrc
@@ -24,7 +24,25 @@ setopt ignore_eof
24bindkey -e 24bindkey -e
25bindkey ';5C' emacs-forward-word 25bindkey ';5C' emacs-forward-word
26bindkey ';5D' emacs-backward-word 26bindkey ';5D' emacs-backward-word
27bindkey '^[[1;5C' emacs-forward-word
28bindkey '^[[1;5D' emacs-backward-word
29bindkey '^H' backward-kill-word
27 30
28autoload -Uz url-quote-magic bracketed-paste-magic 31autoload -Uz url-quote-magic bracketed-paste-magic
29zle -N self-insert url-quote-magic 32zle -N self-insert url-quote-magic
30zle -N bracketed-paste bracketed-paste-magic \ No newline at end of file 33zle -N bracketed-paste bracketed-paste-magic
34
35setopt extended_glob
36
37autoload -Uz add-zsh-hook
38
39_precmd_title() {
40 print -Pn "\e]0;%~\a"
41}
42
43_preexec_title() {
44 print -Pn "\e]0;%~ — $2\a"
45}
46
47add-zsh-hook precmd _precmd_title
48add-zsh-hook preexec _preexec_title