Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added personal taste (theme) #913

Closed
wants to merge 3 commits into from

2 participants

Marcus Müller Robby Russell
Marcus Müller

for enhanced user experience.
Does all kind of funky stuff, including:

  • colored command line
  • shows command runtime, exit status,
  • highlights if
    • status != 0
    • user == root
    • terminal == ssh and a little command prompt magic is used.
marcusmueller added some commits
Marcus Müller marcusmueller added rehash after apt-get install
for enhanced user experience when
installing new executables.
a88d84d
Marcus Müller marcusmueller added personal theme, with remote highlighting
etc.
Based on robbyrussel's theme, this one
shows the time a command took to execute,
shows the hostname whenever you're working
over ssh, and you get a RED username if
working as superuser. Nice stuff.
180072e
Marcus Müller marcusmueller Revert unintended "added rehash after apt-get install",
made a mistake, old, not working version, was not meant to be
committed, not to speak of being pulled

This reverts commit a88d84daec44071696ac73406e8f850f7f2f3258.
82c89bd
Robby Russell
Owner

Thanks for sending this across. However, per the README file ( https://github.com/robbyrussell/oh-my-zsh ) at this point in time... I am not going to be accepting any new themes for a while. My aim is to work out a new solution for how to manage user theme contributions better in the future, but am thinking that 100+ is already too many for folks to browse/select from. :-)

Be sure to follow @ohmyzsh on twitter ( http://twitter.com/ohmyzsh ) to stay tuned for when we might have a good location for such themes.

ProTip: If you have a custom theme and want to use it... you might check out this (poorly documented) feature from pull-request #1111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 5, 2012
  1. Marcus Müller

    added rehash after apt-get install

    marcusmueller authored
    for enhanced user experience when
    installing new executables.
  2. Marcus Müller

    added personal theme, with remote highlighting

    marcusmueller authored
    etc.
    Based on robbyrussel's theme, this one
    shows the time a command took to execute,
    shows the hostname whenever you're working
    over ssh, and you get a RED username if
    working as superuser. Nice stuff.
  3. Marcus Müller

    Revert unintended "added rehash after apt-get install",

    marcusmueller authored
    made a mistake, old, not working version, was not meant to be
    committed, not to speak of being pulled
    
    This reverts commit a88d84daec44071696ac73406e8f850f7f2f3258.
This page is out of date. Refresh to see the latest.
Showing with 45 additions and 0 deletions.
  1. +45 −0 themes/marcusmueller.zsh-theme
45 themes/marcusmueller.zsh-theme
View
@@ -0,0 +1,45 @@
+typeset -F -Z1 SECONDS
+
+cdpath=( . /home/mueller/bachelor/ /home/mueller/bachelor/code/blocks/ofdm_radar / /home/mueller )
+alias debug="gdb --args"
+alias grc="gnuradio-companion"
+
+note_remind=0
+note_ignore="yes"
+note_command="?"
+[ -n "$SSH_CLIENT" ] && PROMPT="#%!|%(!.%B%{$fg[red]%}%n@%U%m%u>%{$reset_color%}%b.%{$fg[green]%}%n@%U%m%u>%{$reset_color%})"|| PROMPT="#%!|%(!.%B%{$fg[red]%}%n@%U%m%u>%{$reset_color%}%b.%{$fg[green]%}%n>%{$reset_color%})"
+RPROMPT="[%{$fg[green]%}%/%{$reset_color%}]"
+function title {
+ if [[ $TERM == "screen" ]]; then
+ # Use these two for GNU Screen:
+ print -nR $'\033k'$1$'\033'\\
+
+ print -nR $'\033]0;'$2$'\a'
+ elif [[ $TERM == "xterm" || $TERM == "rxvt" ]]; then
+ # Use this one instead for XTerms:
+ print -nR $'\033]0;'$*$'\a'
+ fi
+}
+
+function precmd {
+ title zsh "$PWD"
+ local -i xx
+ if [ "x$TTY" != "x" ]; then
+ if [ "x$note_ignore" = "x" ]; then
+ note_ignore="yes"
+ xx=$((($SECONDS-$note_remind)*1000))
+ RPROMPT="[%!:%(?.%?.%{$fg[red]%}%B%?%b%{$reset_color%}):${xx}ms:%/]"
+ fi
+ fi
+}
+
+function preexec {
+ emulate -L zsh
+ local -a cmd; cmd=(${(z)1})
+ title $cmd[1]:t "$cmd[2,-1]"
+ if [ "x$TTY" != "x" ]; then
+ note_remind="$SECONDS"
+ note_ignore=""
+ note_command="$2"
+ fi
+}
Something went wrong with that request. Please try again.