Closed greg-hydrogen closed 5 years ago
Completely agree. I have the exact same setup, and prefer black text on whit background.
Another vote for the ability to change colors. My eyes are not good enough for the current scheme sadly so I'm going to disable the built in terminal.
it is very useful, but this color is very ugly
It would be neat to add option to choose color. This is one feature I feel lack of, especially on Arc-Dark theme.
WHY this is closed?
@vassilisw It is now!
Nice way resolving issues dude!
Anyway, here you go people...
Edit the nemo_terminal.py
file in src
directory:
Add Pango
for the fonts:
from gi.repository import Pango
Customize cursor type, font, fg, bg color, etc in __init__
function:
def __init__(self, uri, window):
"""The constructor."""
self._window = window
self._path = self._uri_to_path(uri)
#Term
self.shell_pid = -1
self.term = Vte.Terminal()
mods start here:
...
# for top/bottom placement, search for 'Terminal pane position' in org.nemo.extensions.nemo-terminal.gschema file
self.term.set_cursor_shape(1) #VTE_CURSOR_SHAPE_IBEAM
font = 'Monospace 10'
self.term.set_font(Pango.FontDescription(font))
fg_color = '#000000'
bg_color = '#E7E7E7'
try:
self.term.set_colors(Gdk.color_parse(fg_color),
Gdk.color_parse(bg_color),
[])
except TypeError:
self.term.set_colors(Gdk.RGBA(*Gdk.color_parse(fg_color).to_floats()),
Gdk.RGBA(*Gdk.color_parse(bg_color).to_floats()),
[])
# I disabled the audible-bell
# settings.bind("audible-bell", self.term, "audible-bell", Gio.SettingsBindFlags.GET)
...
Hi @greg-hydrogen @vassilisw, everyone.
It's a good idea to fix this, although it isn't really a bug but a feature request. Leigh's way of closing this isn't very nice, though once read there's no reason to keep it open.
@vassilisw if you have the time, I would suggest a pull request to implement this. In your patch you hardcoded the color, that's not ideal. I also think it would be overkill to make this configurable, but what could be nice would be to assign the CSS style names used in gnome-terminal, that way all the themes which currently support gnome-terminal would make nemo-terminal render the same way.
this was not working for me, bad color type.
Here is my change :
self.term.set_cursor_shape(0) #VTE_CURSOR_SHAPE_: 0 1 or 2
self.term.set_colors(
Gdk.RGBA(0.0, 0.0, 0.0, 1.0), # fg_color
Gdk.RGBA(1.0, 1.0, 1.0, 0.9), # bg_color
[])
I tried this as a test.
in file /usr/share/nemo-python/extensions/nemo_terminal.py
added Pango in line 57
from gi.repository import GObject, Nemo, Gtk, Gdk, Vte, GLib, Gio, Pango
inserted after line 84 (self.term = Vte.Terminal())
###################start theming##############################
self.term.set_font(Pango.FontDescription.from_string("Noto Mono, 9"))
self.term.set_scroll_on_output(True)
self.term.set_scroll_on_keystroke(True)
palette = [Gdk.RGBA(0.4, 0.8, 0.8, 1.0)] * 16
self.term.set_colors(Gdk.RGBA(1.0, 1.0, 1.0, 1.0), Gdk.RGBA(0.2, 0.2, 0.2, 1.0), palette)
self.term.set_color_highlight(Gdk.RGBA(0.3, 0.3, 0.9, 1.0))
self.term.set_color_highlight_foreground(Gdk.RGBA(0.8, 0.8, 0.8, 1.0))
###################end theming##############################
Hello Everyone,
It would be nice if the color of the terminal could be changed. Currently my default terminal is black text on a white background and I would like the same for nemo-terminal, but I don't see any way to do this