Ludovic Courtès
d08e4d52a3
colors: Add 'colorize-full-matches'.
...
* guix/colors.scm (colorize-full-matches): New procedure.
2022-04-19 18:07:49 +02:00
Ludovic Courtès
d4e858763c
ui: Move hyperlink facilities to (guix colors).
...
* guix/ui.scm (supports-hyperlinks?, file-hyperlink, hyperlink): Move to...
* guix/colors.scm: ... here.
* guix/scripts/home.scm, guix/scripts/system.scm,
guix/scripts/system/search.scm: Adjust imports accordingly.
2022-04-08 23:59:48 +02:00
Ludovic Courtès
2a363bb5d3
weather: Colorize the output.
...
* guix/colors.scm (coloring-procedure): Export.
* guix/scripts/weather.scm (report-server-coverage): Highlight the
server name and colorize the availability ratio.
2022-04-01 18:01:06 +02:00
Ludovic Courtès
9e0f0123a0
ui: 'show-what-to-build' highlights "The following [...] will be built".
...
* guix/colors.scm (highlight/warn): New procedure.
* guix/ui.scm (show-what-to-build): Use 'highlight/warn' when displaying
what would/will be built.
2022-03-18 16:03:32 +01:00
Pierre Neidhardt
672d3d4a87
ui: Don't disable colors when INSIDE_EMACS is set.
...
* guix/colors.scm (color-output?): Remove INSIDE_EMACS condition.
2020-02-24 11:01:52 +01:00
Ludovic Courtès
0876e9c116
colors: Add 'dim'.
...
* guix/colors.scm (coloring-procedure): New procedure.
(%highlight-color): Remove.
(highlight): Define in terms of 'coloring-procedure'.
(dim): New procedure.
2019-09-25 15:46:47 +02:00
Ludovic Courtès
c1c5d68a94
colors: Add 'highlight'.
...
* guix/colors.scm (%highlight-color): New variable.
(highlight): New procedure.
* guix/ui.scm (%highlight-argument)[highlight]: Remove.
(%highlight-color): Remove.
2019-04-14 23:40:52 +02:00
Ludovic Courtès
544265acba
colors: Add 'colorize-matches'.
...
* guix/colors.scm (colorize-matches): New procedure.
(color-rules): Rewrite in terms of 'colorize-matches'.
2019-04-11 18:18:13 +02:00
Ludovic Courtès
2569ef9dab
colors: Introduce a disjoint type and pre-compute ANSI escapes.
...
* guix/colors.scm (color-table, color): Remove.
(<color>): New record type.
(print-color): New procedure.
(define-color-table, color): New macros.
(color-codes->ansi): New procedure.
(%reset): New variable.
(colorize-string): Rewrite accordingly.
(color-rules): Adjust accordingly.
* guix/status.scm (print-build-event): Adjust to new 'colorize-string'
interface.
* guix/ui.scm (%highlight-argument): Likewise.
(%warning-colors, %info-colors, %error-colors, %hint-colors)
(%highlight-colors): Remove.
(%warning-color, %info-color, %error-color, %hint-color)
(%highlight-color): New variables.
2019-04-11 18:18:13 +02:00
Ludovic Courtès
5d9f9ad631
Add (guix colors).
...
* guix/colors.scm: New file.
* Makefile.am (MODULES): Add it.
* guix/ui.scm (color-table, color, colorize-string): Remove.
* guix/status.scm (isatty?*, color-output? color-rules): Remove.
2019-04-10 12:40:58 +02:00