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.
-
Write a wrapper or alias that changes colors using ANSI codes, then calls the application?– dirktMar 14, 2017 at 15:15
-
@dirkt Thanks. Do you have a reference on how to chance the colors using ANSI codes?– danijarMar 14, 2017 at 16:18
1 Answer
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
-
Thanks. Keeping this open to see if someone knows a solution for urxvt, or even a terminal agnostic one.– danijarMar 14, 2017 at 16:20