aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-08-20 23:18:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-08-20 23:18:08 -0300
commit72f818ce986b9881edb42f5613cb602964a5e5d2 (patch)
treed56c4b9822020d693dde9d55bcf7d5c2fda10f78
parent80145b4306fa56d21a8b1941a78954d4f543fec7 (diff)
downloadprofile-72f818ce986b9881edb42f5613cb602964a5e5d2.tar.gz
profile-72f818ce986b9881edb42f5613cb602964a5e5d2.tar.bz2
Full zsh support
-rw-r--r--profile.dot.link57
-rw-r--r--screen.dot/base.link8
-rw-r--r--zshrc.dot.link7
3 files changed, 40 insertions, 32 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 17312d6..957e37d 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -47,33 +47,35 @@ export CDPATH=".:~:$WORKPATH"
#done
# Based on http://superuser.com/questions/90535/how-do-i-turn-of-auto-echo-in-bash-when-i-cd
-cd() {
- if [ -z "$*" ]; then
- destination=~
- else
- destination=$*
- fi
+if [ "$0" = "bash" ]; then
+ cd() {
+ if [ -z "$*" ]; then
+ destination=~
+ else
+ destination=$*
+ fi
- # Check if its a project under CPATH
- cdpath=`command cd "${destination}" 2> /dev/null`
-
- # Got to folder
- command cd "${destination}" > /dev/null
-
- # Update screen title
- #
- # Doesn't deal about getting out of a project path
- # or if going into a project subfolder
- #
- #if [ ! -z "$cdpath" ] && [ ! -z "$STY" ]; then
- # folder="`basename $cdpath`"
- #
- # if echo "$PROJECTS" | grep -q "/$folder$"; then
- # # Got inside a project folder
- # stitle `basename $folder`
- # fi
- #fi
-}
+ # Check if its a project under CPATH
+ cdpath=`command cd "${destination}" 2> /dev/null`
+
+ # Got to folder
+ command cd "${destination}" > /dev/null
+
+ # Update screen title
+ #
+ # Doesn't deal about getting out of a project path
+ # or if going into a project subfolder
+ #
+ #if [ ! -z "$cdpath" ] && [ ! -z "$STY" ]; then
+ # folder="`basename $cdpath`"
+ #
+ # if echo "$PROJECTS" | grep -q "/$folder$"; then
+ # # Got inside a project folder
+ # stitle `basename $folder`
+ # fi
+ #fi
+ }
+fi
# Special cd: change folder and set title
scd() {
@@ -209,7 +211,8 @@ if [ -e "$HOME/apps/python" ]; then
fi
# Bash specifics
-if [ -n "$BASH_VERSION" ]; then
+#if [ -n "$BASH_VERSION" ]; then
+if [ "$0" = "bash" ]; then
# Command prompt if no system-wide custom prompt is available
if ! type command_prompt &> /dev/null && [ -e "$HOME/apps/shellprompt/prompt" ]; then
. $HOME/apps/shellprompt/prompt
diff --git a/screen.dot/base.link b/screen.dot/base.link
index fe12547..cdfbdc2 100644
--- a/screen.dot/base.link
+++ b/screen.dot/base.link
@@ -134,7 +134,7 @@ bind ^] paste [.]
# Yellow text, time, and date; windows in blue:
#hardstatus alwayslastline "%{=b}%{Y}%{c}%w %=%{kY}%C%A %D, %M/%d/%Y"
-hardstatus alwayslastline "%{=b}%{Y}%{c}%w %=%{kY}"
+#hardstatus alwayslastline "%{=b}%{Y}%{c}%w %=%{kY}"
# https://forums.gentoo.org/viewtopic-t-399120-start-0.html
# http://www.mail-archive.com/mutt-users@mutt.org/msg29525.html
@@ -181,5 +181,7 @@ shelltitle "terminal"
# https://github.com/bseibold/screen-powerline
#defutf8 on
#utf8 on on
-#caption always "%{kY} %n%f* %t %?%{YR}⮀%{kR} %u %{Rb}%:%{Yb}%?%?%F%{.b}⮀%:%{.w}⮀%?%="
-#hardstatus alwayslastline "%{bk} %S %{kb}⮀ $LOGNAME %{bk}⮀ %H %?%{kb}⮀%{kY} %-Lw%{Yk}⮀%:%{Yb}⮀%{Yk}%?%{Yk} %n%f* %t %{kY}⮀%+Lw %-="
+#startup_message off
+#term "screen-256color"
+#caption always "%{kY} %n%f* %t %?%{YR}%{kR} %u %{Rb}%:%{Yb}%?%?%F%{.b}%:%{.w}%?%="
+#hardstatus alwayslastline "%{bk} %S %{kb} $LOGNAME %{bk} %H %?%{kb}%{kY} %-Lw%{Yk}%:%{Yb}%{Yk}%?%{Yk} %n%f* %t %{kY}%+Lw %-="
diff --git a/zshrc.dot.link b/zshrc.dot.link
index 9397086..9441543 100644
--- a/zshrc.dot.link
+++ b/zshrc.dot.link
@@ -38,5 +38,8 @@ zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
-# Porweline
-#. /usr/share/powerline/bindings/zsh/powerline.zsh
+# Powerline
+. /usr/share/powerline/bindings/zsh/powerline.zsh
+
+# Source default profile
+source ~/.profile