~tomterl/zshorg

ce812c44d4a2967a4e29cceb343d6eaaef3934f9 — Tom Regner 7 months ago 232ca13
Prompt: ubuntu `reboot-required` marker
1 files changed, 17 insertions(+), 4 deletions(-)

M zshrc.org
M zshrc.org => zshrc.org +17 -4
@@ 774,8 774,6 @@ fi

**** ~php~ block

Do not show the ~nodejs~ block, show our new shiny php block instead.

#+BEGIN_SRC sh
  BLOX_BLOCK__PHP_SYMBOL="${BLOX_BLOCK__PHP_SYMBOL:-${file_php:-php} }"
  BLOX_BLOCK__PHP_COLOR="${BLOX_BLOCK__PHP_COLOR:-green}"


@@ 787,11 785,26 @@ Do not show the ~nodejs~ block, show our new shiny php block instead.
			  "${BLOX_BLOCK__PHP_SYMBOL}${PHPV}"
	  fi
  }
BLOX_BLOCK__TIME_COLOR="grey"
export BLOX_SEG__UPPER_RIGHT=( bgjobs php pyenv virtualenv time )
#+END_SRC

**** Reboot block

Show a marker if a reboot is necessary.
#+BEGIN_SRC sh
  BLOX_BLOCK__REBOOT_SYMBOL="${BLOX_BLOCK__REBOOT_SYMBOL:-${md_error:-REBOOT}}"
  BLOX_BLOCK__REBOOT_COLOR="${BLOX_BLOCK__REBOOT_COLOR:-magenta}"
  function blox_block__reboot() {
	  if [ -f /var/run/reboot-required ]; then
		  echo -n "%F{${BLOX_BLOCK__REBOOT_COLOR}}${BLOX_BLOCK__REBOOT_SYMBOL}%f"
	  fi
  }
#+END_SRC
**** Configure blocks and colors
Do not show the ~nodejs~ and pyenv blocks, show our new shiny php and reboot blocks instead.
#+begin_src sh
export BLOX_SEG__UPPER_RIGHT=( bgjobs php virtualenv reboot time )
BLOX_BLOCK__TIME_COLOR="grey"  
#+end_src
** GNU global
:PROPERTIES:
:noweb-ref: gnuglobal