Advertisement
Native2904

POWERLEVEL9K_MODE.ZSHRC

Feb 13th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ###Powerline Prompt from Bjoern Dubberke####
  2. export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH
  3.  
  4.  
  5. ## Path to oh-my-zsh installation. ##
  6. export ZSH=$HOME/.oh-my-zsh
  7. export TERM=screen-256color
  8.  
  9.  
  10. ## Theme in use. ##
  11. ZSH_THEME="powerlevel9k/powerlevel9k"
  12.  
  13.  
  14. ## Wifi signal config. ##
  15. zsh_wifi_signal(){
  16.         local output=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I)
  17.         local airport=$(echo $output | grep 'AirPort' | awk -F': ' '{print $2}')
  18.  
  19.         if [ "$airport" = "Off" ]; then
  20.                 local color='%F{yellow}'
  21.                 echo -n "%{$color%}Wifi Off"
  22.         else
  23.                 local ssid=$(echo $output | grep ' SSID' | awk -F': ' '{print $2}')
  24.                 local speed=$(echo $output | grep 'lastTxRate' | awk -F': ' '{print $2}')
  25.                 local color='%F{yellow}'
  26.  
  27.                 [[ $speed -gt 100 ]] && color='%F{blue}'
  28.                 [[ $speed -lt 50 ]] && color='%F{red}'
  29.  
  30.                 echo -n "%{$color%}$ssid $speed Mb/s%{%f%}" # removed char not in my PowerLine font
  31.         fi
  32. }
  33.  
  34.  
  35. ## PowerlinePromtConfigArea. ##
  36. POWERLEVEL9K_MODE="awesome-fontconfig"
  37. POWERLEVEL9K_MODE="awesome-patched"
  38.  
  39. POWERLEVEL9K_PROMPT_ON_NEWLINE=true
  40. POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
  41. POWERLEVEL9K_DIR_HOME_ICON='\uE12C'
  42. POWERLEVEL9K_DIR_HOME_SUB_ICON='\uE1F4'
  43. POWERLEVEL9K_DIR_FOLDER_ICON='\uE819'
  44. POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
  45. POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
  46. POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1'
  47. POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3'
  48. POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=('os_icon' 'dir' 'dir_writable' 'root_indicator' 'custom_wifi_signal' 'command_execution_time')
  49. POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=('status' 'ram' 'disk_usage' 'battery' 'time')
  50. POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="zsh_wifi_signal"
  51. POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_BACKGROUND="white"
  52. POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_FOREGROUND="blue"
  53. POWERLEVEL9K_ROOT_INDICATOR_ICON='\u221A'
  54. POWERLEVEL9K_OS_ICON_BACKGROUND="238"
  55. POWERLEVEL9K_OS_ICON_FOREGROUND="white"
  56. POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
  57. POWERLEVEL9K_DISK_USAGE_ICON='\uE1AE'
  58. POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
  59. POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
  60. POWERLEVEL9K_DISK_USAGE_BACKGROUND="blue"
  61. POWERLEVEL9K_DISK_USAGE_FOREGROUND="withe"
  62. POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
  63. POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
  64. POWERLEVEL9K_SHORTEN_DELIMITE="➫ . ."
  65. POWERLEVEL9K_SHORTEN_ICON='\uE210'
  66. POWERLEVEL9K_DIR_SHOW_WRITABLE=true
  67. POWERLEVEL9K_DIR_WRITEABLE_BACKGROUND="102"
  68. POWERLEVEL9K_DIR_WRITEABLE_FOREGROUND="184"
  69. POWERLEVEL9K_DIR_WRITEABLE_VISUAL_IDENTIFIER_COLOR="197"
  70. POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="white"
  71. POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="green"
  72. POWERLEVEL9K_DIR_HOME_FOREGROUND="red"
  73. POWERLEVEL9K_DIR_HOME_BACKGROUND="151"
  74. POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="034"
  75. POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="white"
  76. POWERLEVEL9K_STATUS_VERBOSE=false
  77. POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868  %d.%m.%y}"
  78. POWERLEVEL9K_TIME_FOREGROUND="033"
  79. POWERLEVEL9K_TIME_BACKGROUND="148"
  80. POWERLEVEL9K_BATTERY_ICON='\uE1E5'
  81. POWERLEVEL9K_BATTERY_BACKGROUND="225"
  82. POWERLEVEL9K_BATTERY_FOREGROUND="249"
  83. POWERLEVEL9K_RAM_ICON='\uE87D'
  84. POWERLEVEL9K_RAM_ELEMENTS="Both"
  85. POWERLEVEL9K_RAM_BACKGROUND="241"
  86. POWERLEVEL9K_RAM_FOREGROUND="190"
  87. POWERLEVEL9K_EXECUTION_TIME_ICON="\uebb8"
  88. POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION="2"
  89. POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND="blue"
  90. POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND="white"
  91.  
  92.  
  93. ## use hyphen-insensitive completion. ##
  94. HYPHEN_INSENSITIVE="true"
  95.  
  96. ## Red Dots  while waiting for input. ##
  97. COMPLETION_WAITING_DOTS="true"
  98.  
  99. ## ZSH Update Cycle. ##
  100. export UPDATE_ZSH_DAYS=3
  101.  
  102. ## Enable Autoupdate oh-my-zsh.  ##
  103. DISABLE_UPDATE_PROMPT="true"
  104.  
  105. ## Disable Autosetting Terminal Title. ##
  106. DISABLE_AUTO_TITLE="true"
  107.  
  108.  
  109. ## Plugins Path $HOME/.oh-my-zsh/plugins/ ##Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  110. plugins=( python extract brew sublime cloudapp autojump thefuck colored-man-pages iterm2 colorize zsh-autosuggestions )
  111.  
  112.  
  113.  
  114. ## Source. ##
  115. source $ZPLUG_HOME/init.zsh
  116.  
  117. source $ZSH/oh-my-zsh.sh
  118.  
  119. source "$(pluc-cli --destinationPath)"   ##function pluc-cli aka Aliasforever
  120.  
  121.  
  122. ## Language environment ##
  123. export LANG=de_DE@euro.UTF-8
  124. export LANG=de_DE.UTF-8
  125.  
  126.  
  127.  
  128. ## function ##
  129.  
  130. # => tipe 'options' in Terminal to see all loaded plugins! #
  131. function options(){
  132.   PLUGIN_PATH="$HOME/.oh-my-zsh/plugins/"
  133.   for plugin in $plugins; do
  134.     echo "\n\nPlugin: $plugin"; grep -r "^function \w*" $PLUGIN_PATH$plugin | awk '{print $2}' | sed 's/()//'| tr '\n' ', '; grep -r "^alias" $PLUGIN_PATH$plugin | awk '{print $2}' | sed 's/=.*//' |  tr '\n' ', '
  135.     done
  136.    
  137. }
  138.  
  139. # function for pluc
  140.  
  141. function pluc(){
  142.   pluc-cli "$@"
  143.   source "$(pluc-cli --destinationPath)"
  144.  
  145. }  
  146.  
  147. # This will give you nicely formatted, line-numbered output.
  148.  
  149. lno() {
  150.     if [ $# == 0 ]; then
  151.         echo "No filename provided."
  152.     else
  153.         sed = "$1" | paste -s -d '\t\n' - -
  154.     fi
  155. }
  156.  
  157.  
  158. # output a quick markdown list from stdin to stdout
  159.  
  160. qlist() {
  161.     sed -E '/^[     ]*$/d'|sed -E 's/^([    ]*)/\1* /'
  162. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement