Commit Graph
18 Commits
Author SHA1 Message Date
ceda_ei fe18fd52db Add WISH_PATH_POWERLINE_MAX_PERC to limit path length.
WISH_PATH_POWERLINE_MAX_PERC tries to ensure that the path stays below
the specified percentage of the remaining characters. The path is
shortened by replacing each dir with its initial until it becomes short
enough. The last part is never shortened.
2019-12-29 20:26:47 +05:30
ceda_ei 30ebb302b8 Revert "Update plugins to new specification for wish_append"
This reverts commit b389774a50.
Since PS1 escape codes are allowed once more, this commit is no longer
needed.
2019-12-25 20:25:20 +05:30
ceda_ei 919b102a43 Perform prompt expansion on strings before computing their length.
This reallows usage of PS1 escape sequences (\u, \w, \W, \h, etc) in plugins.
2019-12-25 20:22:49 +05:30
ceda_ei 136567e08e [Feature] Add wish_remaining_chars.
wish_remaining_chars is to be used only in main functions of bodies
2019-12-24 22:46:52 +05:30
ceda_ei 97fe2dbcc6 [Feature] Do not add text to PS1 if it is too wide. 2019-12-24 20:49:52 +05:30
ceda_ei 3f156fdd35 [Feature] Calculate left prompt lengths.
Added wish_append_left.
2019-12-24 20:21:42 +05:30
ceda_ei 5828900a92 [Feature] Add multiline support for right prompt
WISH_RPL (i.e. Right Prompt Lengths), WISH_RIGHT_PS1 are now arrays.
WISH_RPLINE tracks the current line. wish_append_right is called by
wish_append to add to WISH_RIGHT_PS1. If wish_append is called with \n
as text, WISH_RPLINE is incremented. (Current limitation: \n can't be
part of any other string passed to wish_append). Right prompt is now printed
using wish_print_right_prompt which iterates over WISH_RPL and
WISH_RIGHT_PS1. Right prompt size is also calculated in
wish_append_right now.
2019-12-24 19:52:15 +05:30
ceda_ei f8254ba89a Add checks for adding powerline to right prompt 2019-12-22 18:45:07 +05:30
ceda_ei b389774a50 Update plugins to new specification for wish_append 2019-12-15 22:01:29 +05:30
ceda_ei eb7f3a6aa3 Update rgb_gradient to support right prompt. 2019-12-15 22:00:37 +05:30
ceda_ei c3fbe4f699 [Feature] Add support for right prompt.
Set WISH_RIGHT_PLUGINS to be displayed on right.
wish_append is stateful now. Appends to WISH_RIGHT_PS1 or WISH_LEFT_PS1
based on WISH_STATE. wish_append also calculates the length of right
prompt. This has the downside that right prompt can't include any text
that expands on PS1. Therefore, a limitation needs to be applied on
plugins to only append text that won't be expanded in PS1. (i.e. no \u,
\h, \w, \W, etc).
2019-12-15 21:46:52 +05:30
ceda_ei 079533b686 Add path_powerline 2019-10-12 22:36:47 +05:30
ceda_ei 4bed328fa2 Replace tr with parameter expansion. 2019-09-06 22:24:35 +05:30
ceda_ei 886ec3bfaf Refactor wish_append.
Use parameter splitting instead of splitting into array via grep. Speeds
the prompt upto 2x in some cases.
2019-09-06 20:35:29 +05:30
ceda_ei ffe7975dfa Add error handling to battery. 2019-09-06 19:39:45 +05:30
ceda_ei ab5df51c2a Set plain as fallback theme if theme not found. Better variable names. 2019-09-06 19:39:37 +05:30
ceda_ei 2c6c83b826 Replace eval with variable indirection. 2019-09-06 18:05:12 +05:30
ceda_ei d9e86e4421 Add theme lowfi-neon 2019-07-18 17:16:19 +05:30