about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configs/zsh/init.zsh15
-rw-r--r--users/fcuny/zsh.nix2
2 files changed, 16 insertions, 1 deletions
diff --git a/configs/zsh/init.zsh b/configs/zsh/init.zsh
index 2f791d7..1dba48e 100644
--- a/configs/zsh/init.zsh
+++ b/configs/zsh/init.zsh
@@ -2,6 +2,21 @@
 # user + system time ('sleep 6' does not work because of 0% user/system time!).
 REPORTTIME=5
 
+autoload -U colors && colors
+
+autoload -Uz vcs_info add-zsh-hook
+setopt prompt_subst
+
+add-zsh-hook precmd vcs_info
+# Enable checking for (un)staged changes, enabling use of %u and %c
+zstyle ':vcs_info:*' check-for-changes true
+# Set custom strings for an unstaged vcs repo changes (*) and staged changes (+)
+zstyle ':vcs_info:*' unstagedstr "%F{yellow}●%f"
+zstyle ':vcs_info:*' stagedstr   "%F{green}●%f"
+# Set the format of the Git information for vcs_info
+zstyle ':vcs_info:git:*' formats       " (%b%c%u)"
+zstyle ':vcs_info:git:*' actionformats " (%b|%a%u%c)"
+
 PROMPT='%K{cyan}%F{black}%m%k%f %~%F{red}${vcs_info_msg_0_}%f %# '
 
 # For tramp (emacs).
diff --git a/users/fcuny/zsh.nix b/users/fcuny/zsh.nix
index be827b4..6b56d35 100644
--- a/users/fcuny/zsh.nix
+++ b/users/fcuny/zsh.nix
@@ -2,7 +2,7 @@
 
 {
 
-  xdg.configFile."zsh/personal".source = config.lib.file.mkOutOfStoreSymlink ../configs/zsh;
+  xdg.configFile."zsh/personal".source = config.lib.file.mkOutOfStoreSymlink ../../configs/zsh;
 
   programs.zsh = {
     enable = true;