-
-
Notifications
You must be signed in to change notification settings - Fork 673
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #600 from elg/master
feat(themes/powerline-icon): support `OMB_THEME_POWERLINE_ICON_CLOCK` for the date string in segment `user_info`
- Loading branch information
Showing
9 changed files
with
116 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Powerline Icon Theme | ||
|
||
A theme derived from Powerline with emoji icons. | ||
|
||
This is based on the Powerline theme. Please see also [the documentation of the | ||
powerline theme](../powerline/README.md). | ||
|
||
![Screenshot](./powerline-icon-dark.png?raw=true) | ||
|
||
## Segments | ||
|
||
The `powerline-icon` theme modifies the segments `user_info` and `cwd` of the | ||
original Powerline theme so that they include icons. This theme also inserts a | ||
date string in `user_info`. | ||
|
||
## Configuration | ||
|
||
Icons can be configured by setting values to the following shell variables. | ||
|
||
``` | ||
OMB_THEME_POWERLINE_ICON_USER | ||
OMB_THEME_POWERLINE_ICON_HOME | ||
OMB_THEME_POWERLINE_ICON_EXIT_FAILURE | ||
OMB_THEME_POWERLINE_ICON_EXIT_SUCCESS | ||
``` | ||
|
||
The time format shown in the `user_info` segment can be configured by the | ||
following shell variable: | ||
|
||
``` | ||
OMB_THEME_POWERLINE_ICON_CLOCK | ||
``` | ||
|
||
The default value is `%X %D`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,8 @@ | ||
# Powerline Theme | ||
# Powerline Naked Theme | ||
|
||
A colorful theme, where shows a lot information about your shell session. | ||
A simple theme derived from the Powerline theme. | ||
|
||
**IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator. | ||
This is based on the Powerline theme. Please see also [the documentation of the | ||
powerline theme](../powerline/README.md). | ||
|
||
## Provided Information | ||
|
||
* Current path | ||
* Current username and hostname | ||
* Current time | ||
* An indicator when connected by SSH | ||
* An indicator when `sudo` has the credentials cached (see the `sudo` manpage for more info about this) | ||
* An indicator when the current shell is inside the Vim editor | ||
* Battery charging status (depends on the [../../plugins/battery/battery.plugin.sh](battery plugin)) | ||
* SCM Repository status (e.g. Git, SVN) | ||
* The current Python environment (Virtualenv, venv, and Conda are supported) in use | ||
* The current Ruby environment (rvm and rbenv are supported) in use | ||
* Last command exit code (only shown when the exit code is greater than 0) | ||
|
||
## Configuration | ||
|
||
This theme is pretty configurable, all the configuration is done by setting environment variables. | ||
|
||
### User Information | ||
|
||
By default, the username and hostname are shown, but you can change this behavior by setting the value of the following variable: | ||
|
||
POWERLINE_PROMPT_USER_INFO_MODE="sudo" | ||
|
||
For now, the only supported value is `sudo`, which hides the username and hostname, and shows an indicator when `sudo` has the credentials cached. Other values have no effect at this time. | ||
|
||
### Clock Format | ||
|
||
You can change the format using the following variable: | ||
|
||
THEME_CLOCK_FORMAT="%H:%M:%S" | ||
|
||
The time/date is printed by the `date` command, so refer to its man page to change the format. | ||
|
||
### Segment Order | ||
|
||
The contents of the prompt can be "reordered", all the "segments" (every piece of information) can take any place. The currently available segments are: | ||
|
||
* battery | ||
* clock | ||
* cwd | ||
* in_vim | ||
* python_venv | ||
* ruby | ||
* scm | ||
* user_info | ||
|
||
A variables can be defined to set the order of the prompt segments: | ||
|
||
POWERLINE_PROMPT="user_info scm python_venv ruby cwd" | ||
|
||
The example values above are the current default values, but if you want to remove anything from the prompt, simply remove the "string" that represents the segment from the variable. | ||
![Screenshot](./powerline-naked-dark.png?raw=true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.