aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/terminal.vala (follow)
Commit message (Collapse)AuthorAgeLines
* Always draw the scrollbar if overlay scrolling is offWolfgang Müller2021-06-19-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | weltschmerz uses GtkScrolledWindow to provide a vertical scrollbar to the user. By default, this widget enables overlay scrolling. This means that the scrollbar is painted "inside" the terminal, as if overlaid. There's no configuration switch to turn this behaviour off, since we are convinced that overlay scrolling is the right thing to do for terminals. However, GTK allows users to turn off overlay scrolling in a global setting [1] or by using the 'GTK_OVERLAY_SCROLLING' environment variable. Some distributions turn overlay scrolling off by default. When overlay scrolling is disabled, GtkScrolledWindow falls back to rendering the scrollbar normally. Since our scrollbar policy is set to AUTOMATIC, it is only drawn on demand. This means that it is initially not be visible but can suddenly take up effective window space once it appears. When this happens, depending on what is going on in the terminal, one can be left with a terminal that is scrolling down infinitely as the reported column width flaps between two values: one accounting for the size of the scrollbar and the other one ignoring it. Each time the column width flaps, VTE sends SIGWINCH, possibly getting caught in an infinite loop of internal resizes. Since upstream declares GtkScrolledWindow incompatible with VTE [2] [3], we have not attempted further investigation on this issue, but may report an issue in the future. We definitely want to keep using GtkScrolledWindow even with this incompatibility - it is the most elegant and visually pleasing solution. The alternative would be to use a GtkBox and supply our own scrollbar. This scrollbar would either always be visible (even if there is nothing to scroll) or entirely hidden. An implementation of this may be found in the box-scroll branch. Note, however, that we do not guarantee that branch to be up to date with the latest developments. To work around this problem, detect when overlay scrolling is turned off and fall back to PolicyType.ALWAYS. This ensures that the scrollbar is always visible, mitigating the infinite resize loop. Crucially, compared to the alternative solution, this will still enable users to enjoy overlay scrolling if they (or their distribution) do not turn it off. [1] https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-overlay-scrolling [2] https://gitlab.gnome.org/GNOME/vte/-/issues/11#note_264921 [3] https://bugzilla.gnome.org/show_bug.cgi?id=733210#c2
* Always hide the horizontal scrollbarWolfgang Müller2021-06-19-1/+1
| | | | | Even though PolicyType.AUTOMATIC should always keep it hidden, be explicit about our wish to show it under no circumstances.
* Remove trailing comma from geometry initializerWolfgang Müller2021-06-19-1/+1
| | | | | | | | | | | | Commit c49fbfb (Set minimum width and height in window geometry, 2021-06-17) introduced a trailing comma to make subsequent changes to the initializer less of a hassle. However, Vala only accepts trailing commas starting with 0.52.3 [1]. It would be petty to require this version, especially since older versions of Vala can still compile weltschmerz without problems. [1] https://gitlab.gnome.org/GNOME/vala/-/commit/20fcf9ce42dca52c707b96ddf7457931d6ee96f5
* Set minimum width and height in window geometryWolfgang Müller2021-06-18-3/+8
| | | | | | | | | weltschmerz currently does not indicate any minimum size for its window geometry. If the minimum size is not set, GtkWindow uses its requisition as the minimum size [1]. Make sure, instead, that we control this value and set it to one cell. [1] https://valadoc.org/gdk-3.0/Gdk.Geometry.html
* Add setting for controlling cursor blinkingJuhani Krekelä2021-06-17-0/+1
| | | | | | | | | | Currently weltschmerz always uses the global GTK setting for cursor blink, which means that the cursor blink setting is stored separately from the rest of the configuration. Add a setting for overriding it in the config file, so that all the relevant settings can be adjusted in one standardized place. Reviewed-by: Wolfgang Müller <wolf@oriole.systems>
* Declare all GtkChild widgets as unownedWolfgang Müller2021-04-29-14/+14
| | | | | | See [1] for background. This was motivated by a warning from valac-0.50. [1] https://gitlab.gnome.org/GNOME/vala/-/issues/1121
* Move get_shell to utils.valaWynn Wolf Arbor2020-04-13-15/+1
| | | | | There was no VTE-related functionality in this method, so we can find a better place for it now that a dedicated utility class exists.
* Add Open directory featureWynn Wolf Arbor2020-04-13-1/+16
| | | | | | | VTE can leverage the child program's support of OSC 7 to keep track of the current directory. This commit adds support for opening said directory in the default file manager, either by using a shortcut or by activating a new entry in the context menu.
* Add Copy to HTML featureWynn Wolf Arbor2020-04-13-6/+10
| | | | | | | | | | | | | This commit adds a "Copy to HTML" entry to the context menu. It is active when VTE registers an active selection. Lines copied like this will be put into the clipboard as formatted HTML, retaining nearly all styling information. For this, vte_copy now takes a boolean argument - whether or not to format the lines copied as HTML. As two menu items now access vte_copy directly, and there is no clean way of passing arguments to signal handlers through terminal.ui, signals for both menu items are now connected in the Vala code instead.
* Add OSC 8 hyperlink supportWynn Wolf Arbor2020-04-13-9/+28
| | | | | | | | | | | | | This commit adds support for the OSC 8 hyperlink escape sequence [1]. As this is not a mature feature and there seem to be outstanding security concerns [2], the setting that controls whether or not OSC 8 is interpreted is disabled by default. Just like gnome-terminal, weltschmerz will display a tooltip with the canonicalized URI when hovering over a hyperlink. [1] https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda [2] https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#security
* Improve configuration handlingWynn Wolf Arbor2020-02-04-60/+13
| | | | | | | | | | | | | | | This commit improves and simplifies weltschmerz's configuration handling. Obtaining and parsing the KeyFile is split out into ConfigReader, which is fully agnostic of the specific configuration values. Config now contains all configuration values in the form of primitive types or class instances, and no longer delegates access to the KeyFile structure directly. This means that the configuration file is read once, and then kept in the Config instance. Indirectly this commit also fixes a bug where weltschmerz would segfault if one of the palette entries contained an invalid value.
* Introduce fallbacks when getting the user's shellWolfgang Müller2019-10-07-1/+15
|
* Add support for adjusting the font scale at runtimeWolfgang Müller2019-08-31-2/+63
|
* Initial public release1.0.0Wolfgang Müller2019-07-20-0/+387