Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###Powerline Prompt from Bjoern Dubberke####
- export PATH=/usr/local/bin:/usr/local/sbin:~/bin:$PATH
- ## Path to oh-my-zsh installation. ##
- export ZSH=$HOME/.oh-my-zsh
- export TERM=screen-256color
- ## Theme in use. ##
- ZSH_THEME="powerlevel9k/powerlevel9k"
- ## Wifi signal config. ##
- zsh_wifi_signal(){
- local output=$(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I)
- local airport=$(echo $output | grep 'AirPort' | awk -F': ' '{print $2}')
- if [ "$airport" = "Off" ]; then
- local color='%F{yellow}'
- echo -n "%{$color%}Wifi Off"
- else
- local ssid=$(echo $output | grep ' SSID' | awk -F': ' '{print $2}')
- local speed=$(echo $output | grep 'lastTxRate' | awk -F': ' '{print $2}')
- local color='%F{yellow}'
- [[ $speed -gt 100 ]] && color='%F{blue}'
- [[ $speed -lt 50 ]] && color='%F{red}'
- echo -n "%{$color%}$ssid $speed Mb/s%{%f%}" # removed char not in my PowerLine font
- fi
- }
- ## PowerlinePromtConfigArea. ##
- POWERLEVEL9K_MODE="awesome-fontconfig"
- POWERLEVEL9K_MODE="awesome-patched"
- POWERLEVEL9K_PROMPT_ON_NEWLINE=true
- POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
- POWERLEVEL9K_DIR_HOME_ICON='\uE12C'
- POWERLEVEL9K_DIR_HOME_SUB_ICON='\uE1F4'
- POWERLEVEL9K_DIR_FOLDER_ICON='\uE819'
- POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0'
- POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2'
- POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1'
- POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3'
- POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=('os_icon' 'dir' 'dir_writable' 'root_indicator' 'custom_wifi_signal' 'command_execution_time')
- POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=('status' 'ram' 'disk_usage' 'battery' 'time')
- POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="zsh_wifi_signal"
- POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_BACKGROUND="white"
- POWERLEVEL9K_CUSTOM_WIFI_SIGNAL_FOREGROUND="blue"
- POWERLEVEL9K_ROOT_INDICATOR_ICON='\u221A'
- POWERLEVEL9K_OS_ICON_BACKGROUND="238"
- POWERLEVEL9K_OS_ICON_FOREGROUND="white"
- POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false
- POWERLEVEL9K_DISK_USAGE_ICON='\uE1AE'
- POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90
- POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95
- POWERLEVEL9K_DISK_USAGE_BACKGROUND="blue"
- POWERLEVEL9K_DISK_USAGE_FOREGROUND="withe"
- POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
- POWERLEVEL9K_SHORTEN_DIR_LENGTH=3
- POWERLEVEL9K_SHORTEN_DELIMITE="➫ . ."
- POWERLEVEL9K_SHORTEN_ICON='\uE210'
- POWERLEVEL9K_DIR_SHOW_WRITABLE=true
- POWERLEVEL9K_DIR_WRITEABLE_BACKGROUND="102"
- POWERLEVEL9K_DIR_WRITEABLE_FOREGROUND="184"
- POWERLEVEL9K_DIR_WRITEABLE_VISUAL_IDENTIFIER_COLOR="197"
- POWERLEVEL9K_DIR_DEFAULT_FOREGROUND="white"
- POWERLEVEL9K_DIR_DEFAULT_BACKGROUND="green"
- POWERLEVEL9K_DIR_HOME_FOREGROUND="red"
- POWERLEVEL9K_DIR_HOME_BACKGROUND="151"
- POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND="034"
- POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND="white"
- POWERLEVEL9K_STATUS_VERBOSE=false
- POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}"
- POWERLEVEL9K_TIME_FOREGROUND="033"
- POWERLEVEL9K_TIME_BACKGROUND="148"
- POWERLEVEL9K_BATTERY_ICON='\uE1E5'
- POWERLEVEL9K_BATTERY_BACKGROUND="225"
- POWERLEVEL9K_BATTERY_FOREGROUND="249"
- POWERLEVEL9K_RAM_ICON='\uE87D'
- POWERLEVEL9K_RAM_ELEMENTS="Both"
- POWERLEVEL9K_RAM_BACKGROUND="241"
- POWERLEVEL9K_RAM_FOREGROUND="190"
- POWERLEVEL9K_EXECUTION_TIME_ICON="\uebb8"
- POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION="2"
- POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND="blue"
- POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND="white"
- ## use hyphen-insensitive completion. ##
- HYPHEN_INSENSITIVE="true"
- ## Red Dots while waiting for input. ##
- COMPLETION_WAITING_DOTS="true"
- ## ZSH Update Cycle. ##
- export UPDATE_ZSH_DAYS=3
- ## Enable Autoupdate oh-my-zsh. ##
- DISABLE_UPDATE_PROMPT="true"
- ## Disable Autosetting Terminal Title. ##
- DISABLE_AUTO_TITLE="true"
- ## Plugins Path $HOME/.oh-my-zsh/plugins/ ##Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
- plugins=( python extract brew sublime cloudapp autojump thefuck colored-man-pages iterm2 colorize zsh-autosuggestions )
- ## Source. ##
- source $ZPLUG_HOME/init.zsh
- source $ZSH/oh-my-zsh.sh
- source "$(pluc-cli --destinationPath)" ##function pluc-cli aka Aliasforever
- ## Language environment ##
- export LANG=de_DE@euro.UTF-8
- export LANG=de_DE.UTF-8
- ## function ##
- # => tipe 'options' in Terminal to see all loaded plugins! #
- function options(){
- PLUGIN_PATH="$HOME/.oh-my-zsh/plugins/"
- for plugin in $plugins; do
- 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' ', '
- done
- }
- # function for pluc
- function pluc(){
- pluc-cli "$@"
- source "$(pluc-cli --destinationPath)"
- }
- # This will give you nicely formatted, line-numbered output.
- lno() {
- if [ $# == 0 ]; then
- echo "No filename provided."
- else
- sed = "$1" | paste -s -d '\t\n' - -
- fi
- }
- # output a quick markdown list from stdin to stdout
- qlist() {
- sed -E '/^[ ]*$/d'|sed -E 's/^([ ]*)/\1* /'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement