contour-terminal / contour

Modern C++ Terminal Emulator
http://contour-terminal.org/
Apache License 2.0
2.32k stars 102 forks source link

Support for a margin around the terminal area #1384

Closed 0x5c closed 6 months ago

0x5c commented 6 months ago

Abstract

Currently, contour draws all cells directly at the window border. This makes the content of the terminal very cramped to the edges, especially in small font sizes.

Motivation

This feature would likely take form of a setting allowing the user to specify a minimum size in px of margin between the window border (or screen border for fullscreen) and the character cells. The margin's background would be the default background colour.

For reference, see Konsole's margin feature

Yaraslaut commented 6 months ago

1385 broke contour on my rhel system

christianparpart commented 6 months ago

1385 broke contour on my rhel system

ok this is bad, sorry, but define "broke my rhel system" please :)

Yaraslaut commented 6 months ago

Here is some info

/w/y/r/contour master | 134 ❱ ./build/src/contour/contour debug "gui.session,gui.input,gui.display"
QML debugging is enabled. Only use this in a safe environment.
[2023-12-27 17:16:43.141679509.141679] [gui.display] Attaching widget 0x1b70e40 to window 0x1a2d520.
[2023-12-27 17:16:43.148293848.148293] [gui.session] Configuring terminal.
[2023-12-27 17:16:43.148320377.148320] [gui.session] Setting terminal ID to VT525.
[2023-12-27 17:16:43.148425961.148425] [gui.session] maxImageSize=100000x10000, sixelScrolling=true
[2023-12-27 17:16:43.148559085.148558] [gui.display] Assigning session to terminal widget(0x1b70e40 <- 0x1d069b0): shell=program=/bin/fish, terminalSize=100x30, fontSize=13pt, contentScale=1
[2023-12-27 17:16:43.148576273.148576] [gui.session] Starting terminal session.
[2023-12-27 17:16:43.156894442.156894] [gui.session] Starting main loop with thread id 139677207439104
[2023-12-27 17:16:43.157056919.157056] [gui.session] ExitWatcherThread: Started.
[2023-12-27 17:16:43.184833640.184833] [gui.session] Attaching display.
[/worktmp/yaraslau/repository/contour/src/contour/helper.cpp:601] Precondition failed. renderer.hasRenderTarget()
Yaraslaut commented 6 months ago

and here is lldb

    frame #3: 0x000000000059327e contour`contour::applyResize(newPixelSize=vtbackend::ImageSize @ 0x00007fffffffc8b0, session=0x0000000001178180, renderer=0x00000000016aa4a0) at helper.cpp:601:5
    frame #4: 0x000000000059fcb6 contour`contour::detail::FunctionCallEvent<std::function<void ()>>::~FunctionCallEvent() [inlined] std::function<void ()>::operator()(this=0x0000000000f6e1d8) const at std_function.h:591:9
    frame #5: 0x000000000059fcb0 contour`contour::detail::FunctionCallEvent<std::function<void ()>>::~FunctionCallEvent() [inlined] contour::detail::FunctionCallEvent<std::function<void ()>>::~FunctionCallEvent(this=0x0000000000f6e1c0) at helper.h:51:41
    frame #6: 0x000000000059fc90 contour`contour::detail::FunctionCallEvent<std::function<void ()>>::~FunctionCallEvent(this=0x0000000000f6e1c0) at helper.h:51:39
    frame #7: 0x00007ffff3c2e59b libQt5Core.so.5`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 539
    frame #8: 0x00007ffff3c7fdb7 libQt5Core.so.5`postEventSourceDispatch(_GSource*, int (*)(void*), void*) + 23
    frame #9: 0x00007ffff22e6aed libglib-2.0.so.0`g_main_context_dispatch + 349
    frame #10: 0x00007ffff22e6ea8 libglib-2.0.so.0`g_main_context_iterate.isra.20 + 520
    frame #11: 0x00007ffff22e6f40 libglib-2.0.so.0`g_main_context_iteration + 48
    frame #12: 0x00007ffff3c7fb64 libQt5Core.so.5`QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 100
    frame #13: 0x00007ffff3c2a4ab libQt5Core.so.5`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 315
    frame #14: 0x00007ffff3c328f4 libQt5Core.so.5`QCoreApplication::exec() + 148
    frame #15: 0x000000000056a04c contour`contour::ContourGuiApp::terminalGuiAction(this=0x00007fffffffce60) at ContourGuiApp.cpp:419:15