aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2021-11-11 23:43:21 -0700
committerJosh Rahm <joshuarahm@gmail.com>2021-11-11 23:43:21 -0700
commit595fbd07a28306268602af2ffdf9e4dac800dacd (patch)
tree4cb2d02cfe90b20995050411f839a6e307e59965
parent8f7be2e7d044229bf0d079f22db474742586ca3d (diff)
downloadzshrcd-595fbd07a28306268602af2ffdf9e4dac800dacd.tar.gz
zshrcd-595fbd07a28306268602af2ffdf9e4dac800dacd.tar.bz2
zshrcd-595fbd07a28306268602af2ffdf9e4dac800dacd.zip
Make changes to make this work with Photon.
-rw-r--r--00-prompt.zsh6
-rw-r--r--prompts/photon.zsh35
-rw-r--r--zshrc2
3 files changed, 39 insertions, 4 deletions
diff --git a/00-prompt.zsh b/00-prompt.zsh
index 439a25d..d32b576 100644
--- a/00-prompt.zsh
+++ b/00-prompt.zsh
@@ -1,2 +1,4 @@
-source "$HOME/.zshrc.d/prompts/$(hostname).zsh" 2>/dev/null || \
- source "$HOME/.zshrc.d/local/prompts/$(hostname).zsh" 2>/dev/null
+hostname=$( which hostname &>/dev/null && hostname || cat /etc/hostname )
+
+source "$HOME/.zshrc.d/prompts/${hostname}.zsh" 2>/dev/null || \
+ source "$HOME/.zshrc.d/local/prompts/${hostname}.zsh" 2>/dev/null
diff --git a/prompts/photon.zsh b/prompts/photon.zsh
new file mode 100644
index 0000000..026b530
--- /dev/null
+++ b/prompts/photon.zsh
@@ -0,0 +1,35 @@
+grey='\e[0;90m'
+
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}["
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="]%{$fg[red]%}▲%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="] "
+
+GREEN="%{\x1b[01;32m%}"
+PURPLE="%{\x1b[01;35m%}"
+GRAY="%{\x1b[01;38;5;238m%}"
+ORANGE="%{\x1b[01;38;5;166m%}"
+YELLOW="%{\x1b[01;33m%}"
+RED="%{\x1b[01;31m%}"
+RESET="%{\x1b[00m%}"
+
+terminal_color_1="${ORANGE}"
+terminal_color_2="${YELLOW}"
+terminal_color_3="${ORANGE}"
+terminal_color_4="${YELLOW}"
+terminal_color_5="${YELLOW}"
+terminal_color_6="${YELLOW}"
+terminal_color_7="${YELLOW}"
+
+function rahm_prompt {
+ power_prompt "$?"
+}
+
+function rahm_rprompt {
+ power_prompt "$?" r
+}
+
+setopt prompt_subst
+
+PROMPT='$(rahm_prompt)'
+RPROMPT='$(rahm_rprompt)'
diff --git a/zshrc b/zshrc
index f7a0522..fbb2428 100644
--- a/zshrc
+++ b/zshrc
@@ -1,5 +1,3 @@
-source /etc/profile
-
for f in $HOME/.zshrc.d/*.zsh ; do
source "$f"
done