From d27d1370846fad27cbc45f4907ed96bda5326fa7 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Tue, 7 Oct 2014 20:19:15 +0200 Subject: Added liquidprompt --- .bashrc | 1 + .config/herbstluftwm/autostart | 4 +- .liquidpromptrc | 143 +++++++++++++++++++++++++++++++++++++++++ .lp_ps1 | 30 +++++++++ Makefile | 16 ++++- 5 files changed, 189 insertions(+), 5 deletions(-) create mode 100755 .liquidpromptrc create mode 100755 .lp_ps1 diff --git a/.bashrc b/.bashrc index a369039..ee01ef2 100644 --- a/.bashrc +++ b/.bashrc @@ -9,4 +9,5 @@ alias ls='ls --color=auto' #PS1='[\u@\h \W]\$ ' PS1='[\d][\t]\u on \h\n\w => ' +source liquidprompt archey diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart index fb6d2e0..cd0907c 100755 --- a/.config/herbstluftwm/autostart +++ b/.config/herbstluftwm/autostart @@ -15,12 +15,12 @@ get_x_color() { hlwm_scripts="$HOME/.config/herbstluftwm" #wallpaper -wallpaper=/home/tom/Pictures/rocks.jpg +wallpaper=/home/tom/Pictures/fall1.jpg #Numix color palette export WM_LIGHT=$(get_x_color 15) export WM_LLIGHT=$(get_x_color 7) -export WM_ACCENT=$(get_x_color 12) +export WM_ACCENT=$(get_x_color 9) export WM_LDARK=$(get_x_color 8) export WM_DARK=$(get_x_color 0) diff --git a/.liquidpromptrc b/.liquidpromptrc new file mode 100755 index 0000000..1cb350c --- /dev/null +++ b/.liquidpromptrc @@ -0,0 +1,143 @@ + +#################################### +# LIQUID PROMPT CONFIGURATION FILE # +#################################### + +# If you want to use different themes and features, +# you can load the corresponding files here: +#source ~/code/liquidprompt/nojhan.theme + +LP_PS1_FILE="$HOME/.lp_ps1" + +############# +# BEHAVIOUR # +############# + +# Maximal value under which the battery level is displayed +# Recommended value is 75 +LP_BATTERY_THRESHOLD=75 + +# Minimal value after which the load average is displayed +# Recommended value is 60 +LP_LOAD_THRESHOLD=60 + +# Minimal value after which the temperature is displayed (in celsius degrees) +# Recommended value is 60 +LP_TEMP_THRESHOLD=60 + +# The maximum percentage of the screen width used to display the path +# Recommended value is 35 +LP_PATH_LENGTH=35 + +# How many directories to keep at the beginning of a shortened path +# Recommended value is 2 +LP_PATH_KEEP=2 + +# Do you want to display the hostname, even if not connected through network? +# Defaults to 0 (do not display hostname when localy connected) +# set to 1 if you want to always see the hostname +LP_HOSTNAME_ALWAYS=1 + +# Do you want to display the user, even if he is the same than the logged one? +# Defaults to 1 (always display the user) +# set to 0 if you want to hide the logged user (it will always display different users) +LP_USER_ALWAYS=1 + +# Do you want to display the percentages of load/batteries along with their +# corresponding marks? Set to 0 to only print the colored marks. +# Defaults to 1 (display percentages) +LP_PERCENTS_ALWAYS=1 + +# Do you want to use the permissions feature ? +# Recommended value is 1 +LP_ENABLE_PERM=1 + +# Do you want to use the shorten path feature ? +# Recommended value is 1 +LP_ENABLE_SHORTEN_PATH=1 + +# Do you want to use the proxy detection feature ? +# Recommended value is 1 +LP_ENABLE_PROXY=1 + +# Do you want to use the jobs feature ? +# Recommended value is 1 +LP_ENABLE_JOBS=1 + +# Do you want to use the load feature ? +# Recommended value is 1 +LP_ENABLE_LOAD=1 + +# Do you want to use the batt feature ? +# Recommended value is 1 +LP_ENABLE_BATT=1 + +# Do you want to use vcs features with root account +# Recommended value is 0 +LP_ENABLE_VCS_ROOT=0 + +# Do you want to use the git special features ? +# Recommended value is 1 +LP_ENABLE_GIT=1 + +# Do you want to use the svn special features ? +# Recommended value is 1 +LP_ENABLE_SVN=1 + +# Do you want to use the mercurial special features ? +# Recommended value is 1 +LP_ENABLE_HG=1 + +# Do you want to use the fossil special features ? +# Recommended value is 1 +LP_ENABLE_FOSSIL=1 + +# Do you want to use the bzr special features ? +# Recommanded value is 1 +LP_ENABLE_BZR=1 + +# Show time of the last prompt display +# Recommended value is 0 +LP_ENABLE_TIME=1 + +# Show runtime of the last command if over LP_RUNTIME_THRESHOLD +# Recommended value is 0 +LP_ENABLE_RUNTIME=0 + +# Minimal runtime to be displayed +# Recommended value is 2 +LP_RUNTIME_THRESHOLD=2 + +# Display the virtualenv that is currently activated, if any +# Recommended value is 1 +LP_ENABLE_VIRTUALENV=1 + +# Show average system temperature +LP_ENABLE_TEMP=1 + +# When showing time, use an analog clock instead of numeric values. +# The analog clock is "accurate" to the nearest half hour. +# You must have a unicode-capable terminal and a font with the "CLOCK" +# characters. +# Recommended value is 0 +LP_TIME_ANALOG=0 + +# Use the liquid prompt as the title of the terminal window +# The content is not customizable, the implementation is very basic, +# and this may not work properly on exotic terminals, thus the +# recommended value is +# See LP_TITLE_OPEN and LP_TITLE_CLOSE to change escape characters to adapt this +# feature to your specific terminal. +LP_ENABLE_TITLE=0 + +# Enable Title for screen and byobu +LP_ENABLE_SCREEN_TITLE=0 + +# Use differents colors for differents hosts you SSH in +LP_ENABLE_SSH_COLORS=0 + +# Specify a list of complete and colon (":") separated paths in which, all vcs +# will be disabled +LP_DISABLED_VCS_PATH="" + +# vim: set et sts=4 sw=4 tw=120 ft=sh: diff --git a/.lp_ps1 b/.lp_ps1 new file mode 100755 index 0000000..821dcf7 --- /dev/null +++ b/.lp_ps1 @@ -0,0 +1,30 @@ + +####################################### +# LIQUID PROMPT DEFAULT TEMPLATE FILE # +####################################### + +# Available features: +# LP_BATT battery +# LP_LOAD load +# LP_JOBS screen sessions/running jobs/suspended jobs +# LP_USER user +# LP_HOST hostname +# LP_PERM a colon ":" +# LP_PWD current working directory +# LP_PROXY HTTP proxy +# LP_VCS the content of the current repository +# LP_ERR last error code +# LP_MARK prompt mark +# LP_TIME current time +# LP_RUNTIME runtime of last command +# LP_PS1_PREFIX user-defined general-purpose prefix (default set a generic prompt as the window title) + +# Remember that most features come with their corresponding colors, +# see the README. + +LP_PS1="[\d][\t]\u on \h\n\w${LP_VCS}${LP_MARK}" + +LP_TITLE=$(_lp_title $PS1) +PS1="${LP_TITLE}${PS1}" + +# vim: set et sts=4 sw=4 tw=120 ft=sh: diff --git a/Makefile b/Makefile index 002c950..d9acb35 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,21 @@ PWD=$(shell pwd) THEMES_DIR = .local/share/themes CONFIG_DIR = .config + NUMIX = numix-no-title +HERBSTLUFT = herbstluftwm + BASHRC = .bashrc COMPTON = .compton +LIQUIDPROMPT = liquidpromptrc +LP_PS1 = .lp_ps1 VIMRC = .vimrc -HERBSTLUFT = herbstluftwm XRESOURCES = .Xresources install: all -all: bash compton vim xresources numix-no-title herbstluftwm +all: bash compton liquidprompt vim xresources numix-no-title herbstluftwm numix-no-title: mkdir -p ~/$(THEMES_DIR) @@ -28,6 +32,10 @@ bash: compton: ln -sf $(PWD)/$(COMPTON) ~ +liquidprompt: + ln -sf $(PWD)/$(LIQUIDPROMPT) ~ + ln -sf $(PWD)/$(LP_PS1) ~ + vim: ln -sf $(PWD)/$(VIMRC) ~ @@ -38,7 +46,9 @@ uninstall: #remove all -rm ~/$(THEMES_DIR)/$(NUMIX) -rm ~/$(CONFIG_DIR)/$(HERBSTLUFT) - -rm ~/$(COMPTON) -rm ~/$(BASHRC) + -rm ~/$(COMPTON) + -rm ~/$(LIQUIDPROMPT) + -rm ~/$(LP_PS1) -rm ~/$(VIMRC) -rm ~/$(XRESOURCES) -- cgit v1.2.3