Commit graph

35 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
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
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
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
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
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
79cc3bd560 Support for styles and using default terminal colors 2020-10-23 12:50:03 +02:00
746010bfea Changed default for minimal load 2020-10-21 14:52:07 +02:00
0ef72d0478 Some changes to prevcmd's defaults 2020-10-21 14:40:11 +02:00
fe7ab5772a Git status - Handle "renamed" files 2020-10-21 12:59:02 +02:00
8486a660e7 Renamed to gprompt
I still have no clue what to call this useless thing so meh.
2020-10-21 12:58:36 +02:00
Renamed from spp.pl (Browse further)