Commit Graph

748 Commits (75d22d865f6f8559f53acb56e95e00fb038ebb18)

Author SHA1 Message Date
Gabriel Smadi af16e9e68b Display only first line of Python 3.7 version 2018-07-14 20:39:19 -04:00
Piotr Rogoza f484fadbb1 The function _git-hide-status is invoked to late 2018-07-12 06:32:11 +00:00
Nils Winkler 762dce01dc
Merge pull request #400 from teknikprogramlama/master
Powerturk theme derived from powerline theme
2018-06-04 08:55:28 +02:00
Jonathan Barnes a25ac59b84 Add `codeword` theme
- Single line PS1
- Shares history in realtime among bash windows
2018-06-03 17:08:52 -07:00
Norbu Tsering 6a5915d0d6 Added norbu theme 2018-06-01 01:17:03 -04:00
Nils Winkler 1b887b2916
Merge pull request #1192 from madcarrot/master
Update powerline theme to avoid overlapping left and right prompt
2018-05-24 08:20:14 +02:00
Nils Winkler 6d967abbcc
Merge pull request #1194 from joshbmarshall/master
Fix bold text issue
2018-05-24 08:12:00 +02:00
penguin2048 badc3beddf Add bold text in elixr theme 2018-05-21 23:09:09 +05:30
penguin2048 9260e16278 Add elixr theme 2018-05-21 22:56:14 +05:30
Josh Marshall bca7051a62
Fix bold text issue
The default text style was not being set back to normal so terminal output was rendering bold, e.g. for an ls command
2018-05-18 11:52:35 +10:00
madcarrot ecdf6af08d
Update powerline-multiline.base.bash 2018-05-15 16:22:41 -04:00
madcarrot 094c846464
Update powerline-multiline.base.bash 2018-05-13 16:35:34 -04:00
Ethan Edwards 3bb21ba1e9 removed unneeded default value 2018-04-30 13:43:16 -05:00
Ethan Edwards 1a7ebf4da7 change to setting variables to empty value before use 2018-04-30 13:40:08 -05:00
Ethan Edwards 10d075c9c5 merge latest upstream 2018-04-30 13:36:39 -05:00
Arunvel Sriram a3f5d4de91 Move variable declaration to the right place 2018-04-27 11:58:30 +05:30
Arunvel Sriram b96596dadc Make powerline-naked left prompt char configurable 2018-04-27 11:46:59 +05:30
Piotr Rogoża 67629aba2d On some hosts scm* functions does not work properly if a vcs tool is missing 2018-04-24 21:50:34 +02:00
Nils Winkler 3f2c2ddddd
Revert "fix wd_prompt multiline croping" 2018-04-20 08:00:06 +02:00
Florian Molitorisz ea1f235856
fix wd_prompt multiline croping 2018-04-18 00:44:45 +02:00
Jason Al-Mansor e6a6bb5deb fix hostname in remaining powerline themes 2018-04-15 14:32:18 -04:00
Florian Molitorisz f8d5ffe84c
fix hostname prompt
https://github.com/Bash-it/bash-it/issues/1145
2018-04-11 17:37:29 +02:00
Will Price 8d18d1f69c Correct variables -> variable in powerline theme READMEs 2018-02-19 10:41:33 +00:00
Will Price 396bedf11e Improve documentation on prompt options for powerline themes 2018-02-16 19:51:22 +00:00
Shashank Bharadwaj 353cb210d4 Add priliminary support for perforce SCM
This patch adds very simple support for the Perforce SCM:
    https://www.perforce.com/

Although perforce is proprietary software, it's somewhat prevalent in enterprise
companies. This patch looks to provide some basic bash_it functionality that
I've come to love for git. I base everything off of two perforce commands:
    $ p4 set
This command does not require a connection the perforce server, it simply tells
us if a directory is managed by the Perforce SCM or not. In addition the
command:
    $ p4 opened

is used to provide the list of pending changes in the client and the number of
opened files in the client. The `p4 opened` command requires a connection to the
perforce server, hence it's run under a `timeout` command. The "p4 opened"
processing into it's own bash file that now has to be sourced at the top-level
bash-it.sh. Since the processing in simple the newly added: _p4-opened-counts
function returns a number of things that are not currently used, but since I had
awk open and doing the processing, I've chosen to include them in the output
anyway.

Testing:
  - Tested with the powerline-multiline theme in a few perforce based
    workspaces/clients
  - Ran:
      ❯ shellcheck themes/p4helpers.theme.bash
    and fixed all the errors
  - Ran the test suite:
      ❯ test/run
      [...]
      182 tests, 0 failures, 1 skipped
2018-02-14 17:53:09 -08:00
Ethan Edwards e5332cb253 GH-1142 add additional set -e coverage 2018-02-06 11:30:36 -06:00
Ethan Edwards f5c483cfaa GH-1140 add additional uninitialized variable coverage 2018-02-06 11:27:28 -06:00
Ethan Edwards db55c63c77 GH-1142 add behavior to address using set -e 2018-02-06 11:08:44 -06:00
Ethan Edwards 3eb5e037f9 GH-1140 add safe usage of SCM variable 2018-02-06 03:32:08 -06:00
Nils Winkler d0df07435e Added configurable padding value to Powerline-Multiline theme
Required on macOS High Sierra with the default Terminal app, otherwise,
the right segment would extend to the next line.
2018-01-08 08:56:49 +01:00
阿信sxq 517f6c94f9 revert the backslash in the base file, and remove it in theme 'axin', fix the git branch name show error 2018-01-02 18:10:38 +08:00
阿信sxq 40fd3813d3 remove the escape char to fix git repo branch prompt show error 2017-12-31 16:20:55 +08:00
Nikos Skalkotos f512f71100
clean theme: Fix scm coloring
Remove zsh stuff and fix coloring
2017-12-28 17:53:14 +02:00
Nikos Skalkotos 2ada230c4c
clean theme: Remove extra \ 2017-12-28 16:29:10 +02:00
Philipp Eschenbach 4387beda46 fix simple theme 2017-12-28 10:02:13 +01:00
Eduardo Bellido Bellido d779fd6fe4 New customization options
Added two new variables:

POWERLINE_LEFT_END
POWERLINE_RIGHT_END

used to change the end character of the the left and right parts.
2017-12-19 22:31:59 +01:00
Nils Winkler fe1ae061cc
Merge pull request #1018 from wendorf/git-helpers
Allow non-alphanumeric git branch names
2017-12-19 09:19:38 +01:00
Dan Wendorf c5f2c408e7 SCM_CURRENT_USER supports accented characters
`tr 'A-Z' 'a-z'` will only convert non-accented characters. Switching to
`[:upper:]` and `[:lower:]` adds support for accents.
See https://github.com/koalaman/shellcheck/wiki/SC2018

Additionally, printf's character splitting does not support accented
characters, so output isn't as expected. Using bash's variable expansion
syntax instead will correctly get the full accented character.
2017-12-18 09:05:33 -08:00
Dan Wendorf 150e82b221 Refactor git functionality into githelpers.theme.bash
- Add unit tests around git functionality
2017-12-18 09:05:33 -08:00
Eduardo Bellido Bellido dfc7b8ed80 Fix some regressions in Powerline theme 2017-12-18 01:37:05 +01:00
Tim Noise 54d6a10601 i am bad at git 2017-12-16 16:53:45 +11:00
Tim Noise 0eb02456e2 updated theme to latest
- fixed minor errors in powerline.base when pulling from origin master
2017-12-16 16:45:55 +11:00
Tim Noise 02d0997e0a Merge branch 'master' of https://github.com/Bash-it/bash-it 2017-12-16 16:37:27 +11:00
Nils Winkler d318c6536f
Merge pull request #1103 from dsem/fix-brainy-virtualenv-box
Reset VIRTUALENV vars in brainy theme
2017-12-15 08:21:21 +01:00
Nils Winkler 12f5b6e5a1
Merge pull request #1106 from danflies/new-powerline-theme
Added a New Theme
2017-12-12 07:15:26 +01:00
Dan Flies e3abf2d231 Revert "Changed the broken icons"
This reverts commit 4986468e89.
2017-12-11 13:07:45 -06:00
Nils Winkler 0267554c22 Fixed issue introduced in #1109
With the added $ in there, it would show an error in Git repos:

-bash: ##: command not found
2017-12-11 11:35:52 +01:00
Robin Richtsfeld c86038d61d Fix some Bash issues 2017-12-09 15:06:22 +01:00
Dan Flies 1ff3cfbe4d Removed new theme in favor of adding to Powerline theme 2017-12-08 10:00:42 -06:00
Dan Flies 4986468e89 Changed the broken icons 2017-12-08 09:57:34 -06:00
Dan Flies 94ebdf7c5b Added a new function to display current directory only 2017-12-08 09:56:40 -06:00
Dan Flies 9b29297746 finalization of flies theme 2017-12-08 09:47:56 -06:00
Dan Flies 35c29349bd Added new wd function to powerline-flies theme. Changed the __powerline_prompt_command function to reflect the base function. 2017-12-08 09:22:35 -06:00
Dan Flies fae18112cb Added new theme to limit the directory only the current directory 2017-12-07 10:01:47 -06:00
Dylan Semler 01188bbd28 Reset VIRTUALENV vars in brainy theme 2017-12-06 08:50:09 -05:00
Nils Winkler 68409f3566
Revert "Update base.theme.bash with RUBY interpreter version check" 2017-11-28 08:25:25 +01:00
Luis Felipe Sánchez 31a0c6a9fd
Update base.theme.bash
Added feature to detect the ruby version interpreter
```bash
       rb_interp_prompt
```
and added to the existing function to be used in any theme.
2017-11-22 10:14:38 -05:00
KeLiu e325859afb
use $SHORT_HOSTNAME if set
change `${HOSTNAME}` to `${SHORT_HOSTNAME:=$HOSTNAME}`
2017-11-17 17:07:43 +08:00
Nils Winkler 4743fc5b4b
Merge pull request #1090 from maikelmeyers/master
bash-it themes must not set the TERM variable
2017-11-13 04:03:37 +01:00
Nils Winkler 856afc5d6a
Merge pull request #1089 from telmofcosta/allow-theming-git-stash-char
Allow theming git stash chars
2017-11-13 04:02:17 +01:00
Telmo Costa 1fd3fa2440 Allow theming git stash chars 2017-11-12 17:42:11 +00:00
Maik 3e2ecba318 bash-it themes must not set the TERM variable. The used terminal emulator is responsible to set this variable correctly. 2017-11-11 18:02:04 +01:00
Nils Winkler 80810a08f0
Merge pull request #1088 from lfelipe1501/patch-3
Update README.md
2017-11-11 13:15:57 +01:00
Luis Felipe Sánchez ad2112ca50
Update README.md 2017-11-10 14:38:33 -05:00
Nils Winkler e9f6ab5a0f
Merge pull request #1085 from Stimim/master
support bash-preexec
2017-11-10 08:19:59 +01:00
Luis Felipe Sánchez 0008bec5d7
Update README.md
Update Readme for fix image demo
2017-11-09 16:50:12 -05:00
Wei-Han Chen 5ff7df1607 support bash-preexec 2017-11-07 02:59:25 +08:00
brossaip 00732ad210
Add discharging character in brainy theme
I have followed the same technique as it is done in atomic theme
2017-11-06 18:01:30 +01:00
Luis Felipe Sánchez 7fbfc3f356
Update README.md 2017-10-30 16:26:43 -05:00
Travis Swicegood ce6a90c220 Add ability to specify the path color 2017-10-18 16:03:06 -05:00
Nils Winkler 145ec5dfaa Copied command_exists function to the helpers lib so that there is no hidden dependency on the base plugin
The original command_exists function will stay in the base plugin, but will no longer be used by other plugins or themes.
2017-09-17 21:05:59 +02:00
con-f-use 7e68558176 Add gitignore for liquidprompt 2017-07-16 18:28:47 +02:00
con-f-use 238375c4d8 Liquidprompt Theme
see: https://github.com/nojhan/liquidprompt

Might be a bit hacky, but people can improve on it.
2017-07-16 10:51:49 +02:00
Nils Winkler 4590042177 Merge pull request #997 from lfelipe1501/patch-1
Changes in the battery plugin and in the Atomic Theme
2017-07-13 08:42:46 +02:00
Tobi Schäfer 2c08308f0c fix: missing virtualenv prompt 2017-07-07 15:02:54 +02:00
Luis Felipe Sánchez d2fb415856 Update atomic.theme.bash
Improvements in the theme
2017-07-03 12:09:27 -05:00
Nils Winkler 11469fe235 Fix battery_percentage check in Atomic theme
Check for the return value "no", which is returned when no battery check funcationality is available in the OS. This is now consistent with how the Brainy theme does this.
2017-06-24 17:31:31 +02:00
Nils Winkler e13c75c433 Add safeguard for no battery percentage available 2017-06-24 17:31:31 +02:00
Nils Winkler c33861a9b0 Change dependency check for battery_char function 2017-06-24 17:31:31 +02:00
Nils Winkler 3fac1c7ea5 Fix checks for battery plugin
These now check for the presence of the required function instead of
checking for the battery file in the enabled directory.
2017-06-24 17:31:31 +02:00
Clay Reimann ff114660db Guard against unset COLUMNS
When logging in to a new CentOS 7 machine COLUMNS has not been set before the theme is evaluated, causing the following error:
```shell
irongiant-mbp → ssh clayreimann@toren.ddns
Last login: Fri Jun 23 10:05:11 2017 from cpe-24-209-155-17.wi.res.rr.com
-bash: /1: syntax error: operand expected (error token is "/1")
-bash-4.2$ 
```

This fix is based on advice from https://stackoverflow.com/a/3601734
2017-06-23 09:12:46 -05:00
Luis Felipe Sánchez d4bc67ffdd Update Theme
Minor Fixes
2017-06-15 15:37:01 -05:00
Luis Felipe Sánchez 794b1661f6 Create README.md 2017-06-15 15:32:53 -05:00
Tim Noise bb4ac06839 minor bugfix 2017-06-15 07:12:30 +00:00
Luis Felipe Sánchez 7d318def48 Update atomic.theme.bash
Theme improved to 100%
2017-05-28 13:39:48 -05:00
Luis Felipe Sánchez f936b1e485 Update atomic.theme.bash
Minor Updates u_u
2017-05-26 13:41:08 -05:00
Luis Felipe Sánchez 692c3516d5 Update atomic.theme.bash
Minor Updates
2017-05-26 13:38:22 -05:00
Luis Felipe Sánchez 8e98790c1d Update atomic.theme.bash
- Changed the dependence of the battery plug-in.
- Now checking if the function of the battery plugin exists, otherwise it will not load.
2017-05-26 13:35:11 -05:00
Luis Felipe Sánchez 6e1477a8aa Update atomic.theme.bash
- Reverted Battery Segment to the original.
- Now the segment is the same for all operating systems.
- Battery Plugin control segment battery in theme.
- I have cleaned and organized the code 😃
2017-05-25 23:43:18 -05:00
Luis Felipe Sánchez 7a51ea23ee Improvements in Atomic theme
Operating system detection was added to show the percentage of the battery in the promt
2017-05-25 00:21:30 -05:00
Luis Felipe Sánchez a064a01ce3 Update README.md
Updated Installation Instructions.
2017-05-22 14:53:56 -05:00
Luis Felipe Sánchez 23e1bb9a7b New theme Atomic added and reverted the theme Brainy by default
- Brainy theme reverted to original.
- add Atomic theme based on the original brainy.
- Special thanks to @MunifTanjim and @nwinkler for such excellent job.
2017-05-22 14:26:13 -05:00
Luis Felipe Sánchez c2eaa27af8 Update Readme
The installation method has been updated.
2017-05-16 07:59:08 -05:00
Luis Felipe Sánchez 757de0ebfd Corrections and Optimizations
Corrections and Optimizations
2017-05-15 09:50:24 -05:00
Luis Felipe Sánchez f511349152 Corrections and Optimizations
Readme update
2017-05-15 09:45:59 -05:00
Luis Felipe Sánchez 6a49cde998 Corrections and Optimizations
Corrections and Optimizations
2017-05-15 09:36:15 -05:00
Luis Felipe Sánchez 875fa9f2d8 readme update
readme update install commands
2017-05-12 12:04:13 -05:00
Luis Felipe Sánchez c92d12bed1 Fixed and improved the theme
Corrected problem with prompt where sometimes keeped part of previous commands when scrolling history
2017-05-12 11:57:21 -05:00
Nils Winkler 1022879553 Merge pull request #956 from Lin-Buo-Ren/fix-space-proof-issue-everywhere
Fix more space-in-path-proof issues
2017-05-08 09:13:04 +02:00
Luis Felipe Sánchez 3c60c2e678 Fix for all Operating Systems
All Operating Systems Supported
2017-05-04 08:50:53 -05:00
Luis Felipe Sánchez 4a1d1623af Fix Colors
Fix Colors to all Operatin Systems
2017-05-03 17:47:21 -05:00
Luis Felipe Sánchez 5e0e1bda81 img changed
New Changes in the new img
2017-05-02 17:11:21 -05:00
Luis Felipe Sánchez 3c26c6394f New Changes UI
New Changes in UI intefaz from pront and SUDO plugin with emoji icon
symbol
2017-05-02 16:59:03 -05:00
林博仁 e2d3419639 Fix more space-in-path-proof issues
Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2017-05-02 11:11:13 +08:00
Luis Felipe Sánchez 13f30838ba Improvements in the theme for a better appearance, I hope you like, added the option of downloading the battery for a better style.
Improvements in the theme for a better appearance, I hope you like,
added the option of downloading the battery for a better style.
2017-04-28 13:55:38 -05:00
Ivan Font 301060cce2 Update font theme
- Use new user_host_prompt to add more configurability to theme
- Disable default clock being shown
2017-04-24 10:19:14 -07:00
Ivan Font 0ce7b8f4e0 Add function for user@host in prompt 2017-04-23 18:02:27 -07:00
DenMat 01e5cee40c make this consistent like other declarations 2017-04-19 19:03:40 +10:00
DenMat a5c693b6bc Addresses vulnerability describe here https://github.com/Bash-it/bash-it/issues/920
* white lists acceptable characters and replaces dangerous characters with '-'
2017-04-19 18:45:50 +10:00
Nils Winkler 5fbef7c0cb Merge pull request #934 from pix0r/master-pure-virtualenv
Add virtualenv to pure theme
2017-04-11 08:08:35 +02:00
Mike Matz 18364434ca Use virtualenv_prompt from base.theme.bash 2017-04-10 07:08:23 -07:00
Daijiro Wachi a014282707 Fix white color in colors.theme 2017-04-10 12:01:59 +02:00
Mike Matz 5dd75d3fd9 Add virtualenv to pure theme 2017-04-09 21:52:35 -07:00
Jeremy Mathevet 588213980d Prevent unbound variable errors 2017-03-21 12:04:18 +00:00
Nils Winkler c58088b509 Merge pull request #905 from font/font_theme
Added new font theme
2017-02-14 08:53:34 +01:00
Nils Winkler db7ad196b7 Made the change from #902 available to Powerline themes 2017-02-14 08:49:45 +01:00
Nils Winkler 1dc3ee7efa Merge pull request #902 from arimourao/powerline-sudo-fix
enable powerline theme to check if user can sudo his workstation
2017-02-14 08:43:00 +01:00
Ivan Font ba25652662 Added new font theme 2017-02-12 16:58:48 -08:00
Ari Mourao 7d9628d4f5 refactoring to comply with standards 2017-02-12 14:03:45 -02:00
Nils Winkler 889ce4a9f3 Merge pull request #886 from font/scm_prompt_char_info
Add AIO function to echo scm prompt char and info
2017-02-12 10:15:58 +01:00
Ari Mourao 4eeb98772b added suggested improvements 2017-02-10 16:43:22 -02:00
Ari Mourao 7415c85ed8 corrected typo 2017-02-09 15:22:49 -02:00
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
Tim Noise 6e1f389952 bugfix: powerline - IFS doesnt split \x20 in prompt on some machines 2017-01-30 06:10:28 +11:00
Tim Noise b5e9e2386f . 2017-01-30 05:44:55 +11:00
Tim Noise 808b6bd253 fixed ssh detection on el for powerline 2017-01-30 05:43:11 +11:00
Tim Noise 3d4c46bd12 Added redline theme, based on powerline
redline:
- added redline features to powerline
- added screenshot
- updated redline readme
- bugfix: resetting foreground color when distro logo is enabled
- fixed redline default element ordering

powerline:
- neater check for cached sudo
- started adding support for custom cwd separator glyph and color

bash-it:
- added sublime text to .gitignore
2017-01-30 05:08:07 +11:00
Tim Noise e8b130a277 commented todo 2017-01-30 04:51:52 +11:00
Tim Noise 3ef6c0b66b - fixed bug : resetting foreground color when distro logo is enabled
- neater check for cached sudo
- started adding support for custom cwd separator glyph and color
2017-01-30 04:34:45 +11:00
Tim Noise a9a26a8112 element ordering 2017-01-28 15:15:22 +11:00
Tim Noise bf3600c7e1 - added redline features to powerline
- added screenshot
- updated readme
2017-01-28 04:56:33 +11:00
Tim Noise d03dfbd372 readme again -_- 2017-01-27 18:12:19 +11:00
Tim Noise b92cedda87 readme minor 2017-01-27 18:08:06 +11:00
Tim Noise 4ea5b21bb3 Added redline theme, based on powerline 2017-01-27 17:55:25 +11: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
Nils Winkler 2cac4380b9 Merge pull request #545 from goromlagche/add-time-to-bobby
adding datetime and battery percentage to theme 'bobby'
2015-08-27 15:56:14 +02:00
goromlagche f7877a1ef8 prefixing THEME to BATTERY_CHECK and CLOCK_CHECK 2015-08-27 19:00:18 +05:30
宋信强 5d6a68b201 Delete the execss function, modify the note and the shown style 2015-08-24 09:10:09 +08:00
宋信强 bdf1ede7ef a new theme:axin,based on 'sexy' 2015-08-21 17:23:12 +08:00
goromlagche e525ea1fbe clock_check added, datetime added instaed of clock, also battery_percentage added 2015-08-12 22:59:18 +05:30
Hector Rivas Gandara 2360790ee3 Fix infinite loop when $PS4 calls external command
When using `set -x` with a `$PS4` variable which calls a external
command (e.g. `PS4='+ $(true)'`) the color functions end in a infite
loop.

The solution is `shift` the arguments unconditionally in the color
funtions.

This fixes #546
2015-08-12 12:00:14 +01:00
goromlagche 39b5d0b042 adding time to bobby 2015-08-12 00:20:50 +05:30
Nils Winkler 658cfb7d6e Fixed battery conversion
For battery percentages of 08 and 09 percent, the `-le` would fail with
an error ("value too great for base"), since the numbers with leading
zeros are treated as octal numbers when using double brackets.

The solution is to force base 10 for the numbers. More details here:
http://stackoverflow.com/a/24777667/1228454
2015-08-04 11:31:01 +02:00
Mina Markham bc7bcf0883 adding cupcake theme 2015-08-03 02:53:35 -04:00
Nils Winkler 1aadb24f38 Merge pull request #529 from ranaamritparth/theme/rana
New Theme
2015-08-02 18:36:41 +02:00
Heikki Ritola 436a25ed84 Dulcie theme upgrades
- Colorize prompt
- Support for multiline prompt
- Set tab title (OSC 0) and keep the current directory (OSC 7)
2015-08-02 12:18:35 +03:00
Aakash Shah 0e456639d7 Update base.theme.bash
Fix support for recognizing git when in submodules and the regression when in subdirectories of a git repository.
2015-07-23 13:58:55 -07:00
Rana Amrit Parth 8b2b2cae60 New Theme 2015-07-21 23:29:22 +05:30
Rana Amrit Parth 38f9cb6bc5 New theme rana 2015-07-21 18:58:17 +05:30
Dan Wendorf c711b1b575 Show git prompt when in a detached HEAD state
The current check of `git symbolic-ref HEAD` does not detect git
repositories in the 'detached HEAD' state. This is the state a
repository is in if HEAD is not pointing to a valid branch or tag (e.g.
you are in a recently-initiated submodule).
2015-07-16 18:06:48 -07:00
Ian Huston 1b9dab7bc6 Modified version of the bobby theme which shows Python version, Virtualenv directory and Conda environment name. 2015-06-06 10:51:35 +01:00
Ian Huston 80c7874ebc Add Python version and Conda environment prompt functions. 2015-06-06 10:44:56 +01:00
jitakirin 595ae1ab07 Make powerline-multiline use the same check for sudo
Reduces number of subprocesses to check for passwordless sudo by 1.
2015-05-22 08:51:32 +01:00
jitakirin b8649312e4 Style fix 2015-05-22 08:51:13 +01:00
jitakirin 473b3f2075 Abuse uptime to check if sudo requires password
The ``sudo -n true`` trick doesn't work on OS X.
2015-05-22 08:43:34 +01:00
jitakirin 9693b39da6 Port sudo indicator to powerline theme
This ports sudo indicator feature to powerline theme, originally added
to powerline-multiline theme in PR #452.
2015-05-21 21:12:18 +01:00
Nils Winkler 2160c70c15 Added sudo indicator
If the user is currently in a valid sudo session (sudo currently does
not require a password), then the username part of the right  prompt will use
a different color (orange). This gives an indication to the user that
sudo commands will not require a password at the moment. One example for
this might be that the user is reminded to run a `sudo -k` to terminate
the current sudo session before stepping away from the screen.
2015-04-20 08:30:16 +02:00
Miguel Morales a915926851 Emperor theme; features time on the prompt with different colors for each quater of the hour 2015-04-07 15:52:30 -05:00
Ignasi Fosch f3b8b8928d RVM prompt for powerline-multiline 2015-03-05 19:55:43 +01:00
Eduardo Bellido Bellido 87ba4761b5 Merge pull request #417 from edubxb/powerline-multiline
Powerline-multiline improvements
2015-03-05 19:52:41 +01:00
Eduardo Bellido Bellido eba628065b Powerline-multiline improvements
- Changed some default CHARS for better font compatibility
- Make some CHARS user customizable
- Minor fixes
2015-03-05 19:51:16 +01:00
Heikki Ritola 2740706c6f Change order to emphasize current directory 2015-02-27 14:06:15 +02:00
Heikki Ritola c4293d9c4e Add dulcie theme as a basic PS1 prompt with git info 2015-02-27 13:41:47 +02:00
Eduardo Bellido Bellido 71c5209ac6 Updated Powerline-multiline theme
- Prompt drawing fixes and improvements
- Support to show ac adapter status
2015-02-04 23:10:20 +01:00
Eduardo Bellido Bellido 7060850441 Improved Powerline-multiline theme
- Added a clock
- Added the battery status
- Visual improvements
2015-02-01 19:09:13 +01:00
guneysus 9b07aa85d6 small mods 2015-01-25 12:17:03 +02:00
Travis Swicegood 8a12d12725 Fix prompt character and remove clock (h/t @edubxb) 2015-01-18 15:09:02 -08:00
guneysus 7f0395a1d0 Powerturk theme derived from powerline theme 2015-01-17 23:41:01 +02:00
Eduardo Bellido Bellido a17af1ce9a Merge pull request #393 from edubxb/theme-powerline-naked
Added Powerline-naked theme
2015-01-13 00:41:44 +01:00
Travis Swicegood 6e310a24fd Switch this up a little bit 2015-01-09 18:15:41 -08:00
Travis Swicegood f23cc41f00 Add in a multi-line powerline theme 2015-01-09 11:40:05 -08:00
Eduardo Bellido Bellido 3c627f436c Added Powerline-naked theme 2015-01-06 23:57:11 +01:00
Eduardo Bellido Bellido 418e6fae14 Changed default value to true for SCM_GIT_SHOW_DETAILS 2015-01-06 12:57:57 +01:00
Eduardo Bellido Bellido 48f5763fc6 Adapted Powerline-plain theme to new base theme 2014-12-31 19:57:41 +01:00
Eduardo Bellido Bellido 01aaf69a96 Adapted Powerline theme to new base theme 2014-12-31 19:45:10 +01:00
Eduardo Bellido Bellido 4b97037af4 Moved some features from Powerline theme to base theme 2014-12-31 19:44:10 +01:00
Eduardo Bellido Bellido 2830020c5d Added an option to show (defaults true) the details in git repos 2014-12-29 21:54:46 +01:00
Eduardo Bellido Bellido 41b0677726 Show ref type in git prompt in Powerline-plain theme 2014-12-29 02:38:09 +01:00
Eduardo Bellido Bellido b0ce36b8ed Show ref type in git prompt in Powerline theme 2014-12-29 02:38:00 +01:00
Eduardo Bellido Bellido 54921d9294 Now git_prompt_vars indicates when HEAD not points to a branch 2014-12-29 02:26:09 +01:00
Eduardo Bellido Bellido 2e7a14ee3b Include latest changes from powerline into powerline-plain 2014-12-24 01:35:54 +01:00
Eduardo Bellido Bellido 78e0dedb0b Added more Git repository info to Powerline Plain theme 2014-12-24 00:37:31 +01:00
Eduardo Bellido Bellido 3e17b17846 Added more Git repository info to Powerline theme 2014-12-24 00:37:31 +01:00
Eduardo Bellido Bellido 0227691ca9 More info about Git repository added
Now, staged, unstaged and untracked files count can be shown in themes
2014-12-24 00:36:01 +01:00
Kovica 35adbaf7b3 On new repositories ./hg/branch and .hg/dirstate do not exist. In this case use "hg summary" 2014-12-12 20:32:04 +01:00
Kovica 324e1edfce Don't need that echo 2014-12-12 15:51:12 +01:00
Kovica 6f126b80e4 Added comments 2014-12-12 15:19:28 +01:00
Kovica 8914d452d8 We don't need return values 2014-12-12 15:08:07 +01:00
kovica 9a134acd06 Update base.theme.bash
Faster Mercurial status
2014-12-12 11:54:00 +01:00
Hannes 3acc5acc4f Update pure.theme.bash
Fixed an issue, where ps_root_mark was not defined
2014-12-08 13:39:38 +01:00
Ben Brunton 1c83611faa updated brunton theme to use battery_charge 2014-11-13 09:17:04 +00:00
Ben Brunton d7912f8f1b prevent battery_charge call from erroring in themes when battery plugin not enabled 2014-11-12 17:27:38 +00:00
Ben Brunton e7f1bf8645 deleted ~ file 2014-11-12 10:03:06 +00:00
Ben Brunton 18b77e2fec included safe battery charge to prevent error when battery plugin not enabled 2014-11-12 10:00:45 +00:00
Ben Brunton ba891f9d12 Delete brunton.theme.bash~ 2014-11-11 21:13:14 +00:00
Ben Brunton 60163a5350 inclued brunton theme 2014-11-11 21:11:23 +00:00
Travis Swicegood 43eb4950b1 Merge pull request #345 from carlos-reynosa/scm-status-check-flag
Version Control Environment & Status Check Flag
2014-11-03 16:00:48 -08:00
Eric Baer b517629303 Don't return rbenv or rvm if the don't exist 2014-10-28 18:08:01 -07:00
Conrado Buhrer 6b6644b94a added: slick theme 2014-10-28 11:39:39 -02:00
Omer Katz 3d36ad7522 Merge pull request #227 from ebautistabar/demula.lastcmdfail
Fixes in demula theme
2014-10-28 12:34:45 +02:00
Omer Katz 93f48596ad Merge pull request #269 from f/master
new duru theme with clean and simple interface
2014-10-28 12:30:54 +02:00
Omer Katz 9c6bffa21c Merge pull request #178 from luan/luan-theme
Added my custom theme
2014-10-28 12:21:47 +02:00