diff options
author | 2016-04-12 10:23:33 +0200 | |
---|---|---|
committer | 2016-04-12 10:38:07 +0200 | |
commit | ecbb5b4bf08a074d8b123ffdbd09373f8924f79f (patch) | |
tree | 98e5a0f939b2658885f687b3b07979cd1720a52f | |
parent | add net-misc/httpie to plab-base set (diff) | |
download | plab-ecbb5b4bf08a074d8b123ffdbd09373f8924f79f.tar.gz plab-ecbb5b4bf08a074d8b123ffdbd09373f8924f79f.tar.bz2 plab-ecbb5b4bf08a074d8b123ffdbd09373f8924f79f.zip |
zsh-pol-config: add python virtualenv info in prompt
-rw-r--r-- | app-shells/zsh-pol-config/Manifest | 6 | ||||
-rw-r--r-- | app-shells/zsh-pol-config/files/zshprompt | 9 | ||||
-rw-r--r-- | app-shells/zsh-pol-config/files/zshrc | 5 | ||||
-rw-r--r-- | app-shells/zsh-pol-config/zsh-pol-config-1.5-r3.ebuild (renamed from app-shells/zsh-pol-config/zsh-pol-config-1.5-r2.ebuild) | 0 |
4 files changed, 15 insertions, 5 deletions
diff --git a/app-shells/zsh-pol-config/Manifest b/app-shells/zsh-pol-config/Manifest index df1a71a..c1410be 100644 --- a/app-shells/zsh-pol-config/Manifest +++ b/app-shells/zsh-pol-config/Manifest @@ -3,6 +3,6 @@ AUX zlogin 533 SHA256 97ff06829c77ec7f2976a320878af505a0e0c6e13364b425491dc327bc AUX zlogout 284 SHA256 2155f6a853c9966bfafff96ff29b6f625f5783af2379a640ec40bf7f5eddea0b SHA512 0558fc433d12ff470d029ad013afb02b15af84e073caffe1e2f514ae388a845536017fef6a814986f26daee3abdd9105b6096d495a0a8344615a0d4d71bfd298 WHIRLPOOL 07f481b81f3b3b6bf99d34467ee6384848e3f460f7af438acfc6cf2d8f577a122295ced02e126db55f5e667230ddadb8a9cd605cf2b0e394fd75fe09a809de94 AUX zprofile 1345 SHA256 45c22f5811a8dc4539d363898b53dbcbaef183bf6e8f6ead1a3a837cbedfc7c4 SHA512 ea7d75d4b5137ee592641c592ad0a85baf3aa2b14be6f0fb85cdb9c02d222f0cab08445c825ce7774bf7104ae712f5a7f42dbef27135469c0fa48d1b1c30906a WHIRLPOOL 360d5463a704b0cfe0216a04e94dc5b8924601dd2cd820299444975ec2fbf23f2ee33786d93aa498b015324ac3341bdf78f186fbfc1003b4ace9d80b9cbc86d3 AUX zshenv 1103 SHA256 4c5ec737aff9d54b0bd88b12392f0b3cb3f05dec0671b33938d1f49ce94285d1 SHA512 096fffff3eae492e9786a1f58be8e9b7615f219771ecedf3557f4e2f00f8376d84657f9bd101a6c143cc7db207053ef552d9a96d3a32a34a24a1b290dc07bc21 WHIRLPOOL c221e9a2407b31253aa7b2957426af289e21e5808fcf3dae0ae32739007186a894b2e9ae6dd96fac04e2099c62e7f3d304ea427db974ba13e56cadacb86f9ede -AUX zshprompt 1331 SHA256 2368153b0fa4c5cd50744fca2ec5d7cd6b935a10d2c62c7113bb49132ce332cb SHA512 41446bdf3701bb4aee4bec297a479b943879bb1b8619b9b57e6d597aad07a5bd5f73b2eff5308e29de3f07735463e86822260f72cccdeca5cb56fd85d2dc0440 WHIRLPOOL ea454b3378a41f98f1550e3edf851bc11a31bdc50f55a7d5d71edc1325c6845867f3ff8830b0e942d78550c919b0250260b4de61a63ffe774bd7e022b579ed7f -AUX zshrc 4058 SHA256 f9891673789c31323e2335e206c93698ab2106de1ad13fe4524efb26eecb9b99 SHA512 b11c76a194651fa65cc1d41bc7a02bea55a6e9f5619d4ffee373c47d1b120f7effedeeb65addb40122cf64d18283b9e7169204c0b52f423846714ca911435e5c WHIRLPOOL b93818ab7d22645ef8ce1d77759a181491bf045cafa91d1168ea6dc6cc28e9a022d412d1a61fd7e4aaf9d2b939a65fc175b7b2f7547689c704fb602a7fd554b9 -EBUILD zsh-pol-config-1.5-r2.ebuild 346 SHA256 05f5488f7f6a3225fe7b11bf3805e286e9a45543a359fbc7c98b7cc9bf92c745 SHA512 632ba787007d2c30390bb5642757018cf82a622c2c7465eaea6cf26350395ccf539ccb971535da580a75de7a37b56ef30f9210a8252c6e415d556fd7693a3482 WHIRLPOOL 1886e99fcf65ae21f3e48e45675f050d74aef7e96b47eb56d3a3bd168c9aeb33a120fd07fc1c1541a3347f3e3d95dc31d5c43f7b14b5b83d6a4cfc266807f632 +AUX zshprompt 1528 SHA256 209626f498465f75e403c527b000944f8f0c0582795a31fa04ec75e634703566 SHA512 82e9cb341d4b72e4fb372d0ecffac089920eeb0e3faa14cf2fef9855143b5560c83669c0ce44258d3ed72a8276e7ec1cdbe26daa86c2dc9fc4afc8bf181710fd WHIRLPOOL 2b64cc597f51302f639eed0efd887594f30e7f354b3f6ff74aa51526c386f60039a826255f6ff40d4cce3325b94dd65e20f9cee9dad57af40ff035d953aed6df +AUX zshrc 4190 SHA256 f40edaee137fd8422632c9431e852515b60f5ad711195ae61d1a22953b1c404c SHA512 0a1423436c647e247a7a4894f990b326c4a4532b9680dcc2127c06a380f2d78fe433ed50960b82fbb9c0b299434e7e6563e4fa8c0ae49a088044ee94d5a15caa WHIRLPOOL b33f8fca7a21fcaf9327f66755a1835cedcbb95b347e3dcc4c93a028b02f0e23ccbb661a197de3afe6f1c51994b9e9bde0c2b6af8f606a72e30e4d26244bf50d +EBUILD zsh-pol-config-1.5-r3.ebuild 346 SHA256 05f5488f7f6a3225fe7b11bf3805e286e9a45543a359fbc7c98b7cc9bf92c745 SHA512 632ba787007d2c30390bb5642757018cf82a622c2c7465eaea6cf26350395ccf539ccb971535da580a75de7a37b56ef30f9210a8252c6e415d556fd7693a3482 WHIRLPOOL 1886e99fcf65ae21f3e48e45675f050d74aef7e96b47eb56d3a3bd168c9aeb33a120fd07fc1c1541a3347f3e3d95dc31d5c43f7b14b5b83d6a4cfc266807f632 diff --git a/app-shells/zsh-pol-config/files/zshprompt b/app-shells/zsh-pol-config/files/zshprompt index e36d905..03545e7 100644 --- a/app-shells/zsh-pol-config/files/zshprompt +++ b/app-shells/zsh-pol-config/files/zshprompt @@ -31,6 +31,7 @@ function make_prompt { local c_host=$2 local c_path=$PR_GREEN local c_git=$PR_YELLOW + local c_virtualenv=$PR_BRIGHT_BLACK local c_sep=$PR_BRIGHT_YELLOW local c_r=$PR_RESET @@ -42,7 +43,13 @@ function make_prompt { local git="${c_git}$GIT_BRANCH${c_r}" local invite="${c_sep}%#${c_r}" - PROMPT="${time} ${user}${at}${host} ${cwd}${git}${invite} " + if [ -z ${VIRTUAL_ENV+x} ]; then + local virtualenv="" + else + local virtualenv=" ${c_virtualenv}[$(basename $VIRTUAL_ENV)]${c_r}" + fi + + PROMPT="${time} ${user}${at}${host} ${cwd}${virtualenv}${git}${invite} " } function update_prompt { diff --git a/app-shells/zsh-pol-config/files/zshrc b/app-shells/zsh-pol-config/files/zshrc index 1f1e1b8..65ed040 100644 --- a/app-shells/zsh-pol-config/files/zshrc +++ b/app-shells/zsh-pol-config/files/zshrc @@ -6,6 +6,7 @@ alias l1='/bin/ls -1hNT 0 --color=auto' alias ls='ls -hNFT 0 --color=auto' alias ll='ls -l' +alias lt='ls -ltr' alias la='ls -a' alias lla='ls -la' @@ -29,8 +30,10 @@ alias http-server='python -m SimpleHTTPServer' # C/C++ alias bcpp='bcpp -s -i 2' +alias make='make -j$(echo "scale=0;$(nproc)*1.5/1" | bc)' + # Gentoo -alias emerge='emerge --tree --jobs=8' +alias emerge='emerge --tree --jobs=$(A=$(nproc) B=$(( A / 2 )); echo $(( B < 1 ? 1 : B )))' alias unmerge='emerge --unmerge' alias upgrade='emerge --keep-going --ask --newuse --update --deep @world' alias build-kernel='genkernel --menuconfig all' diff --git a/app-shells/zsh-pol-config/zsh-pol-config-1.5-r2.ebuild b/app-shells/zsh-pol-config/zsh-pol-config-1.5-r3.ebuild index 9b08034..9b08034 100644 --- a/app-shells/zsh-pol-config/zsh-pol-config-1.5-r2.ebuild +++ b/app-shells/zsh-pol-config/zsh-pol-config-1.5-r3.ebuild |