Commit Graph

413 Commits (b106d275a784b51ffd2ff03c8ac36d75b74c880f)

Author SHA1 Message Date
Ari Mourao c7c488f0b0 enable powerscript to check if user can sudo his workstation 2017-02-09 14:45:25 -02:00
ari mourao 88802c141b new theme 90210 added 2017-02-03 15:12:49 -02:00
Ivan Font 31e3d78ae4 Fix exact match regular expression for macOS 2017-01-29 22:38:58 -08:00
Ivan Font 1f0108193d Fix for issue #883 2017-01-17 21:21:19 -08:00
Ivan Font 17999fcc13 Update bobby theme to use scm_prompt_char_info
The bobby theme now uses scm_prompt_char_info to print out the SCM char
and SCM prompt info. This also required fixing the
SCM_THEME_PROMPT_PREFIX to match GIT_THEME_PROMPT_PREFIX.
2017-01-16 23:23:13 -08:00
Ivan Font 48d4ad274a Add prefix and suffix capability to SCM char 2017-01-16 23:20:31 -08:00
Ivan Font 9e4f1d6d80 Refactor common code into scm_prompt_info_common 2017-01-16 22:14:15 -08:00
Ivan Font f9b1dcee26 Add AIO function to echo scm prompt char and info
Invoking the scm_char and scm_prompt_info functions separately for PS1
duplicates calls to the scm and scm_prompt_char functions to check what
${SCM}, if any, we currently reside in. This problem was exacerbated
when working outside of any repo as we had to go through all the
conditionals just to determine we're not in any scm repo. Unnecessary
conditionals slows down the prompt so this adds a new function that
streamlines printing out both the scm char and scm prompt info with one
invocation.
2017-01-16 22:14:15 -08:00
Ivan Font a70b769817 Remove references to GIT_THEME_* variables 2017-01-04 17:43:56 -08:00
Ivan Font 1d55249181 Refactor functions and update documentation
Add new variable to enable/disable git prompt minimal status information
and consolidate functions for code re-use. Also update README
documentation to capture the usage of new variable.
2017-01-04 15:48:32 -08:00
Ivan Font a068e3b66e Add option for basic git status prompt
Fixes #873
2016-12-31 12:43:23 -08:00
Avasz 966a2bb383 Added credits 2016-12-09 10:40:42 +05:45
Avasz d7d4cb9807 kitsune theme 2016-12-09 10:35:09 +05:45
Peter Benjamin 65e2514c63 Add theme: purity 2016-12-07 09:58:24 -08:00
Ivan Font 771082cdc2 Add prefix/suffix for clock prompt and clock char 2016-12-05 09:04:29 -08:00
MunifTanjim f132df6eff refactor brainy theme, add todo segment & ssh indicator and other minor updates 2016-11-24 21:09:15 +06:00
Eduardo Bellido Bellido 898bb10579 Fix powerline themes README.md 2016-11-09 21:04:18 +01:00
MunifTanjim 62554b84c8 add brainy theme 2016-10-31 05:57:39 +06:00
Nils Winkler 8a2b6bdc54 Merge pull request #815 from edubxb/powerline-themes-refactor
Refactor of all powerline themes
2016-10-30 16:22:15 +01:00
Eduardo Bellido Bellido 7427e7efc3 Powerline plain theme refactor
- Split functions and options in two files
- Import common functions from powerline theme
- Add README.md
2016-10-30 01:17:57 +02:00
Eduardo Bellido Bellido 47e6d57a82 Powerline naked theme refactor
- Split functions and options in two files
- Import common functions from powerline theme
- Add README.md
2016-10-30 01:16:47 +02:00
Eduardo Bellido Bellido 7229838c5b Powerline multiline theme refactor
- Split functions and options in two files
- Import common functions from powerline theme
- Updated README.md
2016-10-30 01:16:37 +02:00
Eduardo Bellido Bellido 34bd7e49c3 Powerline theme refactor
- Split functions and options in two files
- Add README.md
2016-10-30 01:16:05 +02:00
MunifTanjim 8c9777df43 revert pull 797 2016-10-21 21:03:51 +06:00
MunifTanjim a2a6fa2812 refactor themes to support standardized clock functions 2016-10-18 20:58:07 +06:00
MunifTanjim 8dde691671 standardize clock functions 2016-10-18 20:31:07 +06:00
MunifTanjim 08fba38c43 fix backward compatibility 2016-10-17 16:10:44 +06:00
MunifTanjim 7d901b11b6 seperate clock_char function 2016-10-17 04:11:09 +06:00
MunifTanjim 01dab32683 modify clock prompt for better customizability 2016-10-17 03:37:25 +06:00
MunifTanjim 4468c1b126 improve scm_prompt_info 2016-10-08 12:44:34 +06:00
Nils Winkler 66397ef577 Revert "Changes to sudo check for powerline themes" 2016-09-26 09:01:59 +02:00
Nils Winkler 5abbba98bd Merge pull request #792 from VP468/vp468
Changes to sudo check for powerline themes - fixes #744
2016-09-26 14:55:19 +08:00
Vedhapriya Raman 28e9e04d4f Changes for issue# 744 2016-09-23 20:50:55 -05:00
Damian Kaczmarek b992698380 Fix bold font to make simple theme really simple 2016-09-23 14:22:09 -05:00
Sam Gunaratne 1a4c03b08c Fixes issue with PROMPT_COMMAND ending in semi-colon 2016-08-03 10:04:24 +01:00
Nils Winkler 22d5dab238 Merge pull request #761 from wanelo/master
Wanelo Pairing workstations theme
2016-08-01 09:03:11 +02:00
Yuhao Wu af96da5d11 Fix bug: themes break global $PROMPT_COMMAND variable
Safely append functions to $PROMPT_COMMAND instead of setting it.
2016-07-07 17:13:00 +09:00
Beorn Facchini d1f5648b6b Bash-it theme inspired by oh-my-zsh tonotdo. 2016-07-03 11:55:43 +10:00
Cristian Lupascu 734c937232 added the nwinkler_random_colors theme 2016-06-08 14:23:47 +03:00
Robert Rauch 669d068b12 Support HG_ROOT containing whitespaces 2016-06-02 10:36:37 +02:00
Gabriel Ricci 6228fa5e72 Adding support for rvm-promt to powerline-plain theme 2016-06-01 05:49:38 +00:00
Nils Winkler ec30515a31 Merge pull request #719 from telyn/master
Rough port of oh-my-zsh's gallifrey theme
2016-05-19 18:01:11 +02:00
mairanteodoro bcc536f81a New color scheme for 'mairan' theme. 2016-05-18 16:50:31 -04:00
mairanteodoro 18f9a8ebc4 Add new theme 'mairan' (based on 'zork') 2016-05-18 12:57:05 -04:00
Telyn ZF Roat 47f9689868 Add rough port of oh-my-zsh's gallifrey theme 2016-05-12 11:55:23 +01:00
AlfredoBejarano cff6025338 Removes pipes around ruby version 2016-04-20 00:58:08 -05:00
AlfredoBejarano d2acf16646 Changes color for git status prompt 2016-04-20 00:32:28 -05:00
AlfredoBejarano 07236c0571 Adds spacing to git status icon
and changes the dirty and ahead icons
2016-04-20 00:29:02 -05:00
AlfredoBejarano d8a22e6a0e Adds cooperkid theme by AlfredoBejarano 2016-04-20 00:07:18 -05:00
Nils Winkler e5d50f0d97 Simplified logic for both Linux and OS X
Avoiding the if statements, using exit code of `grep -q` instead.

Reverted the change that adds a space after the AC char. Opting for a
default value, allowing to override from one's profile.
2016-04-14 08:16:32 +02:00
Nils Winkler a9c5670c2c Added AC indicator support on OS X
Not sure about the logic for returning 1/0 from the function, though -
will have to clarify.
2016-04-12 09:56:03 +02:00
Nils Winkler fd8ff61baa Merge pull request #697 from clayreimann/patch-1
Display the prompt when changing directories
2016-04-10 12:55:35 +02:00
Brian Malehorn 2a3fde2b14 colors.theme.bash: pre-compute colors
bash-it takes rather a while to startup, around 0.5 seconds on my
laptop. After a bit of timing it appears the majority of the time is
spent in themes/colors.theme.bash. The reason for that is the fancy
abstraction layers that use $(). For example, consider this code:

    red="$(color reset red)"

It will go through 9 forkexecs to evaluate:

    red="$(color reset red)"
        "$(__color_parse make_ansi reset red)"
        "$(__make_ansi reset red)"
        "\[\e[$(__reset red)m\]"
        "\[\e[0;$(__red)m\]"
        "\[\e[0;$(__color red)m\]"
        "\[\e[0;$(__color_normal_fg $(__color_red))m\]"
        "\[\e[0;$(__color_normal_fg 1)m\]"
        "\[\e[0;31m\]"

With all the variables in colors.theme.bash, this adds up to hundreds of
forks:

    $ strace -f bash ./colors.theme.bash 2>&1 | grep clone | wc -l
    649

The solution is to replace the function with its result:

    -red="$(color reset red)"
    +red='\[\e[0;31m\]'

This is safe, since colors.theme.bash never calls external functions or
takes any input. So, its result can be safely hard-coded.

This improves startup time dramatically. Try adding "time" to your .bashrc:

    # Load Bash It
    time source $BASH_IT/bash_it.sh

before:

    real    0m0.462s
    user    0m0.100s
    sys     0m0.399s

after:

    real    0m0.150s
    user    0m0.091s
    sys     0m0.064s
2016-04-09 20:52:47 -07:00
Clay Reimann 93d70a6150 Display the prompt when changing directories
This change allows for the capture of the expanded prompt (rather than the raw `PS1`) so that
it is easier to maintain context when changing directories.

Fix is based on the comments from [this stackoverflow](http://stackoverflow.com/a/24006864)
2016-04-08 12:27:25 -05:00
Nils Winkler 5ec816342f Merge pull request #680 from kigster/scm_user
Adding support for git user & git pair in git prompt (off by default)
2016-03-18 08:12:17 +01:00
Konstantin Gredeskoul 36d994dec5 Explained `git pair` and a more reliable fallback
- Added more information to the README about the practice of using `git
  pair`, and provided instructions on installing the support.

- Write a more reliable fallback that uses `user.name` to extract user
  initials, when `user.initials` aren't set.
2016-03-16 20:15:20 -07:00
Konstantin Gredeskoul b70018e531 Adding support for git user & git pair 2016-03-14 03:42:38 -07:00
Konstantin Gredeskoul 6de871294e Adding support for rbenv in addition to rvm
- following existing patterns, clearing out RBENV prefix and suffix
- using existing function to read the prompt
2016-03-14 03:25:32 -07:00
Robert Rauch ba5e7c9268 Speed up $PROMPT_COMMAND by using rvm-prompt
Running `rvm tools identifier` seems to be really slow. Using [`rvm-prompt`](https://rvm.io/workflow/prompt) greatly speeds up the evaluation of `$PROMPT_COMMAND`.
2016-02-06 21:19:30 +01:00
Eduardo Bellido Bellido dfe811719f Merge pull request #656 from edubxb/default-values
Set fallback values to POWERLINE_LEFT_PROMPT and POWERLINE_RIGHT_PROMPT variables
2016-02-03 23:05:22 +01:00
Eduardo Bellido Bellido f05c56a440 Set fallback values to POWERLINE_LEFT_PROMPT and POWERLINE_RIGHT_PROMPT variables 2016-02-03 23:03:07 +01:00
Eduardo Bellido Bellido c290aa9638 Fix an error when showing the status of a git repo 2016-02-03 22:58:19 +01:00
Nils Winkler 5617cc2e31 Fixed spelling and wording
Some minor changes in spelling, wording and formatting.
2016-02-01 08:32:19 +01:00
Nils Winkler 9a72ab8de1 Merge pull request #605 from edubxb/powerline-multiline-segmentorder
Add support to change the order of the prompt info in the Powerline Multiline theme
2016-01-31 20:14:26 +01:00
Eduardo Bellido Bellido 30c6fd1f59 Refactor __powerline_last_status_prompt function 2016-01-30 12:19:34 +01:00
Eduardo Bellido Bellido f6436a878e Fix some regressions and variables names 2016-01-30 12:18:07 +01:00
Eduardo Bellido Bellido ead5047fb9 Reduce unset calls 2016-01-30 11:33:00 +01:00
Eduardo Bellido Bellido 8bee21e428 Update powerline-multiline README.md 2016-01-27 01:27:11 +01:00
Eduardo Bellido Bellido 6d4923aca8 Now, segments can be placed at left or at right
- Code refactor
- Print code converted into functions
- Remove unused variables
- Improved conistence in naming, variable and functions
2016-01-27 01:07:14 +01:00
Christophe Aguettaz a2ac5b0096 Fixed compatibility with older bash versions.
Older versions (like 3.2, current default on MacOS X) don't implement
readarray.
2016-01-26 20:05:47 +01:00
Eduardo Bellido Bellido dfbd065bc1 Fix indentation 2016-01-25 21:49:50 +01:00
Eduardo Bellido Bellido 64e6f354dc Add Powerline Multiline theme README.md 2016-01-25 20:02:55 +01:00
Eduardo Bellido Bellido 1009b23724 Minor fixes 2016-01-25 20:02:55 +01:00
Eduardo Bellido Bellido 51f5614de5 Add support to change the segment order of the left and right prompt 2016-01-25 20:02:55 +01:00
Eduardo Bellido Bellido eb92e2f845 Add support to change the order of the prompt info in the Powerline Multiline theme 2016-01-25 20:02:55 +01:00
Christophe Aguettaz 3fa0881281 [bugfix] Fixed performance issue with git prompt
The git prompt would could bash to use 100% CPU
for large amounts of time when dealing with long
`git status` outputs.
2016-01-25 20:02:50 +01:00
Tyler Freeman 17d69dbc1a Added Primer (minimal time) theme, based off of the candy theme. 2016-01-13 18:31:10 -08:00
wxf 9cb4ae0650 add host info in titlebar 2016-01-01 16:29:26 +08:00
wxf 468475dc49 add personal theme 2016-01-01 15:36:50 +08:00
James Whisnant fbd0a33cd1 fix normal user username 2015-12-19 23:37:12 -05:00
James Whisnant ddba9555c7 use words instead of escape codes, some code cleanup 2015-12-19 23:28:23 -05:00
James Whisnant 337caf1a50 Add support to zork them for crouton debian chroot and virtualenv
Adds support for a crouton debian chroot and python virtualenvwrapper
to the zork theme.
2015-12-18 18:12:07 -05:00
Bill Moritz b967674e6c Add support for AWS Tools Profile.
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
2015-12-05 11:52:58 -05:00
Dongri Jin 9c9c20da2a Fix 2015-11-27 01:41:19 +09:00
Dongri Jin 1eb7b4b4c2 Fix 2015-11-27 01:37:53 +09:00
Dongri Jin 53d2452276 Fix 2015-11-27 01:19:14 +09:00
Dongri Jin 5f246cfcac Fix 2015-11-27 01:16:20 +09:00
Dongri Jin 5396bf69a0 Initial commit 2015-11-27 01:15:30 +09:00
Eduardo Bellido Bellido 56c6e3ecd3 Now, right prompt can be totally disabled in powerline multiline theme
- New env var (THEME_PROMPT_USERINFO_MODE) to choose "user info" mode:

    Possible values:

        default: same behaviour as before
        sudo: only show a "hint" when sudo credentials are cached

    any other values disables this segment.
2015-10-28 00:43:33 +00:00
Eduardo Bellido Bellido 86b9af62c3 Fix grep pattern 2015-09-10 20:07:04 +02:00
Matias Ibañez 1449036285 Update simple theme
PS1 definition via PROMPT variable produces an invalid prompt
2015-09-07 01:43:40 -03:00
Eduardo Bellido Bellido d0565e8954 Add a flag (SCM_GIT_IGNORE_UNTRACKED) to ignore untracked files in git prompt 2015-09-06 20:02:20 +02:00
Reto Haeberli ff87ad7482 New binaryanomaly theme 2015-09-06 12:22:48 +02:00
Eduardo Bellido Bellido 0943aec34b Improvements in git prompt
- Git prompt now indicates when remote tracked branch is "gone"
- New env var (SCM_GIT_DETACHED) that indicates when HEAD is detached
- New env vars available for themes (SCM_THEME_BRANCH_TRACK_PREFIX,
  SCM_THEME_BRANCH_GONE_PREFIX, SCM_GIT_DETACHED_CHAR)
- Refactor of git_prompt_vars function from base theme
2015-09-06 00:59:27 +02:00
Eduardo Bellido Bellido 78cb41a1cf Add the option to show git branch remote tracking info in git prompt 2015-09-05 15:04:25 +02:00
Eduardo Bellido Bellido 86fd5cd5c4 Improve ref detection in git prompt 2015-09-05 02:12:38 +02:00
Nils Winkler ad1b059d0d Merge pull request #557 from bezhermoso/vim-indicator
Indicator if running bash in vim
2015-09-01 08:48:07 +02:00
Bez Hermoso 77a891d8c6 Check VIMRUNTIME instead 2015-08-31 16:36:07 -07:00
Bez Hermoso 29861812dd Vim indicator for powerline-multiline theme 2015-08-31 12:07:39 -07:00
Bez Hermoso e6dc31b35d Indicator if running bash in vim 2015-08-31 10:22:28 -07:00