4

When using a terminal that supports more than 16 colors (such as urxvt), it it possible to provide different colors to different applications running in the same terminal after another? For example, my vim theme looks best when background and color0 are set to the same value, while htop looks best when they are different.

2
  • Write a wrapper or alias that changes colors using ANSI codes, then calls the application?
    – dirkt
    Mar 14, 2017 at 15:15
  • @dirkt Thanks. Do you have a reference on how to chance the colors using ANSI codes?
    – danijar
    Mar 14, 2017 at 16:18

1 Answer 1

1

xterm has this feature:

   +dc     This option enables the escape sequence to change dynamic
           colors.  The option sets the dynamicColors option to “true”.

Check for more info: https://github.com/sos4nt/dynamic-colors

1
  • Thanks. Keeping this open to see if someone knows a solution for urxvt, or even a terminal agnostic one.
    – danijar
    Mar 14, 2017 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .