nautilus-terminal
nautilus-terminal copied to clipboard
Customizable ansi colors?
I am using dark gtk theme, and the default ansi color are not really eyes-friendly, would be nice to have configurable ansi color
example
Hello,
Yes default VTE colors are ugly. It would be cool to add settings to customize them but I have no time / motivation to do it currently. I would accept a PR if someone is motivated enough to implement this. :)
NOTE: duplicate of #76
Managed to hardcode them as a temporary solution. Just replace lines 327-343 from /usr/lib/python3.X/site-packages/nautilus_terminal/nautilus_terminal.py
with:
foreground = Gdk.RGBA(
fg_color[0] / 255.0,
fg_color[1] / 255.0,
fg_color[2] / 255.0,
1,
)
background = Gdk.RGBA(
bg_color[0] / 255.0,
bg_color[1] / 255.0,
bg_color[2] / 255.0,
1,
)
palette_color_codes = ["#171421", "#C01C28", "#26A269", "#A2734C", "#12488B", "#A347BA", "#2AA1B3", "#D0CFCC", # Palette colors
"#5E5C64", "#F66151", "#33D17A", "#E9AD0C", "#2A7BDE", "#C061CB", "#33C7DE", "#FFFFFF"] # Bright counterparts
palette_colors = []
for color_code in palette_color_codes:
if not color_helpers.is_color(color_code):
color_code = 'White' # Invalid colors default to white
color = color_helpers.parse_color_string(color_code)
color = Gdk.RGBA(
color[0] / 255.0,
color[1] / 255.0,
color[2] / 255.0,
1
)
palette_colors.append(color)
self._ui_terminal.set_colors(foreground, background, palette_colors)
And restart it with nautilus -q
.
Here I used the default GNOME colors from my terminal profile. Of course, change the palette_color_codes with the ones you want. The palette sizes must be 0, 8, 16, 232 or 256.
Additionally, and as a personal preference I set the bold colors to bright with self._ui_terminal.set_bold_is_bright(True)
at the end.
EDIT: Opened a pull request implementing this with an array of hexadecimals/color names here.
The @Acervans PR will be released in the next Nautilus Temrinal version very soon :)