Commit Graph

190 Commits

Author SHA1 Message Date
Marco A. Gallegos
f53beb64b8
themes: Add a new theme developer focusing on devs (#526)
* feat(themes): added new theme
* fix(themes): screenshot updated
* fix(themes): image sizing
* chore(themes): updated theme description
* style(themes/developer): fix the indentation
* refactor(themes/developer): prefix "_omb_theme_developer_" to internal functions
* refactor(themes/developer): delimit returned values with newlines

"grep -P" is not POSIX.  Instead of using PCRE to extract the results
separated by "---", we can simply separate the results with newlines
and use standard utilities (which assumes line-oriented data) to
manipulate the data.

* refactor(themes/developer): use "_omb_util_command_exists"
* refactor(themes/developer): use awk to pick the activated conda env
* fix(themes/developer): remove meaningless forks
* fix(themes/developer): use "_omb_util_put" instead of "printf"
* style(themes/developer): fix coding styles
* chore(themes/developer): clean up codes for debugging
* fix(themes/developer): fix wronge uses of arithmetic commands
* fix(themes/developer): localize variables used in functions
* refactor(themes/developer): use "return_delimited" at the end of functions
* fix(themes/developer): fix a problem that it sometimes fails to extract CPU usage
* fix(themes/developer): avoid mixing stdout

This attempted to run the commands to extract information in parallel,
but this may result in interleaved information in some operating
system (depending on the way how the C library performs buffering and
how the syscall write(2) issued by multiple processes would interfere
with one another).

There are other parts we can optimize, so we would compensate the
overhead with the optimization of other parts.

* perf(themes/developer): load prompt information through REPLY
* perf(themes/developer): reduce the number of forks
* fix(themes/developer): suppress error message of non-existent commands
* fix(themes/developer): disable prompt element with unavailable information

---------

Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-09-11 17:14:18 +09:00
Koichi Murase
275b606aa9 style(themes/powerline-*): adjust styles 2024-09-10 11:22:46 +09:00
Koichi Murase
2428b27143 style(themes/powerline-icon): fix indentation 2024-09-10 11:04:02 +09:00
Koichi Murase
45673a8be5 docs(themes/powerline-*): remove duplicate desc of powerline themes 2024-09-10 11:02:12 +09:00
Koichi Murase
154157c3e9 docs(themes/powerline-icon): add README.md 2024-09-10 10:51:57 +09:00
Koichi Murase
9f05765935 fix(themes/powerline-wizard): fix the permission of README.md 2024-09-10 10:32:17 +09:00
Koichi Murase
f8895234f3 fix(themes/powerline-icon): use OMB_THEME_POWERLINE_ICON_CLOCK for time format 2024-09-10 10:31:10 +09:00
Erwan Le Gall
1d0ea0fa1e feat(themes/powerline-icon): support THEME_CLOCK_FORMAT in .bashrc 2024-09-10 10:29:13 +09:00
Koichi Murase
31f2700e07 fix(themes/doubletime): avoid using "eval echo \$\'echo ...\'" 2024-09-09 00:48:11 +09:00
Koichi Murase
838e639a15 style(themes/doubletime): adjust styles 2024-09-09 00:48:11 +09:00
Koichi Murase
4b95670330 feat(lib/omb-util): add "_omb_util_{print,put}" 2024-09-09 00:48:07 +09:00
Koichi Murase
a5e39282db fix(themes/{cupcake,lambda}): avoid arbitrary text in the printf format 2024-09-09 00:45:44 +09:00
Koichi Murase
e78373c9f7 style(themes/brunton): adjust indentation 2024-09-09 00:45:43 +09:00
Harrison Gagnon
6031d66ea7 fix(themes/ht): fix usage of "_omb_prompt_get_{rbenv,virtualenv}" 2024-09-01 09:24:02 +09:00
Koichi Murase
a0d6af5541 refactor(themes/powerline-icon): allow specifying icons through variables 2024-09-01 09:20:33 +09:00
tpcodex
c2f572f14c themes: Add new theme: powerline-wizard 2024-09-01 09:20:10 +09:00
Harrison Gagnon
f8eed0be00
themes/ht: Add ht theme (#584)
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-08-12 23:41:42 +09:00
Koichi Murase
f77615fe93 fix(themes/brainy): fix typos in completion settings 2024-07-25 15:27:35 +09:00
Koichi Murase
a5894e6f14 fix(themes/{brainy,powerbash10k}): match UID 0 exactly 2024-07-25 15:23:38 +09:00
Koichi Murase
e5582de6ec fix(themes/{brainy,powerbash10k}): handle unrecognized action for brainy/pb10k 2024-07-25 15:23:38 +09:00
Koichi Murase
cd1e5e1058 fix(themes/powerbash10k): fix pb10k completion 2024-07-25 15:23:38 +09:00
Koichi Murase
ef6281f01b style(themes/powerbash10k): adjust styles 2024-07-25 15:23:38 +09:00
Koichi Murase
8c4c40aec2 style(themes/brainy): adjust styles 2024-07-08 22:35:28 +09:00
Koichi Murase
1cb8a509af refactor(themes/brainy): localize variables 2024-07-08 22:20:52 +09:00
Koichi Murase
25bde7de53 refactor(themes/brainy): use "_omb_util_split" 2024-07-08 22:19:37 +09:00
Koichi Murase
06bce020df perf(themes/powerbash10k): reduce fork using "_omb_prompt_get_python_env" 2024-07-08 22:04:25 +09:00
Koichi Murase
ba587126ec fix(themes/brainy): include venv information in the "python" segment 2024-07-08 22:04:25 +09:00
Koichi Murase
22e29d8130 style(themes/{brainy,powerbash10k}): change indentation 2024-07-08 22:04:19 +09:00
slackr
27cf2a4158
themes/half-life: Add python venv support (#574)
Co-authored-by: ap <ap@parallax.red>
2024-06-10 20:44:11 +09:00
Koichi Murase
f296619ac7 refactor(themes/wanelo): split line to construct PS1 2024-05-02 09:40:55 +09:00
Koichi Murase
2b87e07c42 fix(themes/wanelo): localize variable "status" 2024-05-02 09:40:55 +09:00
Koichi Murase
3b120c1dc4 style(themes/wanelo): adjust styles
* style(themes/wanelo): fix indentation
* style(themes/wanelo): use arithmetic command
* style(themes/wanelo): use "function func { ... }"
2024-05-02 09:40:45 +09:00
Mohammad Javidi
5098a0d3b5
themes: Add lambda theme (#561) 2024-04-28 14:42:35 +09:00
José M. Taveras
0ec9c0ca4c
themes/90210..bobby: Add README.md (#559)
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
2024-04-28 13:11:57 +09:00
Koichi Murase
a99e6f3930 themes/modern: Factorize prompt composition 2024-04-28 04:43:11 +09:00
Koichi Murase
78888d8bf9 themes/modern: Use $'\n' to include a newline character 2024-04-28 04:43:11 +09:00
Koichi Murase
4cb952b648 themes/{mairan,zork}: Define variable in the place where it is used 2024-04-28 04:43:11 +09:00
Koichi Murase
50f629ccda themes/modern+: Localize variables 2024-04-28 04:43:11 +09:00
Koichi Murase
a78672d792 themes/modern+: Adjust coding style 2024-04-28 04:43:11 +09:00
Koichi Murase
617381a165 themes/modern+: Adjust indentation 2024-04-28 04:43:11 +09:00
Koichi Murase
92925a6b2a themes/mairan: Quote variable expansion $VIRTUAL_ENV 2024-04-01 22:07:14 +09:00
Noah McIvor
802db75233 themes/zork: Quote variable expansion $VIRTUAL_ENV
Without double-quotes, paths with spaces are not resolved correctly
and venv name is not displayed correctly.
2024-04-01 22:06:38 +09:00
PROGRAMMER
4c2afd012a
themes/robbyrussell: Add Python Virtual environment indicator (#536)
Co-authored-by: programmer <programmer@debian.debian>
2024-02-28 20:48:05 +09:00
Koichi Murase
f796ee65ae Merge branch 'roderik-venv' 2024-02-21 19:55:52 +09:00
Koichi Murase
d7a1cf5542 themes/purity: add "sync" to deprecated variables 2024-02-21 19:55:14 +09:00
Koichi Murase
51e8b97dca themes/roderik: Fix styles 2024-02-21 19:54:07 +09:00
Koichi Murase
0a7a083308 themes/roderik: Change indentation 2024-02-21 19:54:07 +09:00
Minsub Lee (Matt)
ed5fddd2bc
themes/bakke: Add python venv (#522) 2024-01-18 19:14:48 +09:00
TheWatcherMultiversal
4738fef72c
themes/powerline-icon: Fix icon for successful execution (#516)
* themes/powerline-icon: Correct error

An error in one of the powerline functions has been corrected, which
was preventing the display of the icon for a successfully executed
command.

* themes/THEMES: Add powerline-icon
2024-01-18 19:13:58 +09:00
William Sawyer
d025bddc67
themes/agnoster: Correct spelling error in ansi_r comment (#515) 2024-01-09 20:23:23 +09:00