Commit graph

77 commits

Author SHA1 Message Date
25ca57dfd7 Fixed path width adaptation 2022-10-31 09:15:03 +01:00
b69768f6e8 Initial implementation of the terminal resize support
* It may or may not be overkill, but it's a starting point.
2022-10-31 08:55:18 +01:00
98bf21fc88 Refactored readArguments 2022-10-30 10:13:59 +01:00
b17a9b8713 Fixed missing refactor in term_feed 2022-10-30 10:02:20 +01:00
1e141b3935 Fixed double escaping of sgr0 resets 2022-10-30 09:58:43 +01:00
9246b94acc Fixed direct use of escape sequences in PS1 2022-10-30 09:58:25 +01:00
ce4528b8fe Cleaner terminal command code 2022-10-30 09:58:00 +01:00
a4e6b8b4a0 Export / import previous state to / from env
* State will be exported to the GPROMPT_STATE environment variable
  * Using the prevstate argument will load the previous state
  * Ctrl+L now redraws based on the previous state
2022-10-29 15:03:52 +02:00
2a1cf31d4d Separated state from rendering code
* Each generator now consists in two functions, readstate_ and
    render_. The first computes a state, the second renders it.
2022-10-29 14:15:24 +02:00
799438be80 Ooops, removed debugging leftover 2022-10-29 10:05:25 +02:00
b9e5e65654 Restore pending input after reading the cursor position 2022-10-29 10:03:07 +02:00
a595d71cbd Improved support for leading newline
* New modes that either print it only when it isn't the first line, or
    only add it (as well as a warning) if the last command didn't return
    a newline.
  * Overengineered af.
2022-10-22 18:31:35 +02:00
eeed7e79a1 Added option that displays an empty line before the actual prompt 2022-10-22 16:53:53 +02:00
8e1480c41e Added jobs count section 2022-10-22 15:56:58 +02:00
89de3ee2e8 Data input changed for easier extension 2022-10-22 13:32:09 +02:00
73c324286e Removed theme dir override variable
It can be done through the usual env configuration stuff and I didn't
remember that.
2022-10-22 12:56:49 +02:00
5a3d9d9c91 Documentation updated 2022-10-22 12:20:06 +02:00
593bb82b7a Display Python version 2022-10-22 12:05:31 +02:00
fb2715a43b Apply defaults before loading the theme
* This prevents uninitialized values from being used if the user's
    theme doesn't contain every item we need.
2022-10-22 11:23:31 +02:00
1145bd37e9 Python environment prefix can be configured 2022-10-22 11:18:31 +02:00
28069bac2f Updated README to use the "init" command 2022-10-22 11:13:40 +02:00
f56bd85b9d Fixed typo in comment 2022-10-22 11:11:19 +02:00
972bb6f4b2 "init" argument causes the bash initialisation code to be generated 2022-10-22 11:10:54 +02:00
dad16e7fd0 Dim the hostname part of the user@host 2022-10-22 10:08:46 +02:00
c2df8fc769 Theme directory from environment 2022-10-22 10:01:34 +02:00
e32b7f57c2 Fixed reset escaping 2022-10-22 09:58:50 +02:00
2b1a4ad324 Host colors added to themes 2022-10-19 22:23:27 +02:00
8a1d92dae1 Separate color for the host name 2022-10-19 21:53:12 +02:00
522b19992a Make the use of sgr0 optional
* Don't use the results of `tput sgr0` as the reset character by
    default.
  * Instead use \33[0m unless instructed otherwise.
2022-10-19 21:53:02 +02:00
09a20826f9 Merge branch 'dev' 2020-10-23 21:16:50 +02:00
79be78aa20 Themes - Improved middle section separators 2020-10-23 21:16:22 +02:00
36e5e751fe Documentation - cwd_missing_fg_color/cwd_missing_bg_color 2020-10-23 21:08:39 +02:00
ab28d80e5b Handle being in a deleted directory
* Do not whine when executed from a missing directory
 * Display a section with '(no cwd)'
 * Display path with a different color
2020-10-23 21:06:35 +02:00
75084eacac Merge branch 'dev' 2020-10-23 13:20:51 +02:00
4b84f067e7 Reset style before generating transitions 2020-10-23 13:20:07 +02:00
d97292719f More bold (load average display) 2020-10-23 13:16:40 +02:00
168665b7e4 Use bold styles in a few sections 2020-10-23 13:12:05 +02:00
f4b65b9460 Merge branch 'dev' into master 2020-10-23 12:56:09 +02:00
3200aec75c Merge branch 'ft/clear-bg' into dev 2020-10-23 12:55:27 +02:00
77eb4a347c Themes - Fix Ascii/Blocks themes and use *_DEFAULT
* Ascii and Blocks themes need to use the terminal's defaults,
otherwise they will leave a black smear on a non-black terminal
background.
 * Replace -1 colors with SECTION_DEFAULT
2020-10-23 12:53:01 +02:00
2529e1b14a README - Mention thref and TERM/SECTION_DEFAULT 2020-10-23 12:52:19 +02:00
79cc3bd560 Support for styles and using default terminal colors 2020-10-23 12:50:03 +02:00
fcb8e33ed1 More Markdown fixes 2020-10-21 16:52:23 +02:00
89309169f3 Fixing README.md
My markdown skills are non-existant, at best.
2020-10-21 16:42:23 +02:00
cff7fa2fa4 Added screenshots 2020-10-21 16:30:58 +02:00
b59dd0ad51 Install doc - mention /etc/bash.bashrc 2020-10-21 15:24:34 +02:00
f9ce89d5f6 Fixed installation instructions 2020-10-21 15:23:26 +02:00
5b1894c000 Documentation - Fixed info about layout_middle 2020-10-21 15:14:19 +02:00
89f176d66f Generators documentation 2020-10-21 15:10:30 +02:00
746010bfea Changed default for minimal load 2020-10-21 14:52:07 +02:00