Contour - A modern C++ Terminal Emulator

Overview

Contour - A modern C++ Terminal Emulator

CI Build codecov C++17 Discord Twitch Live Stream

alt text

IMPORTANT: THIS PROJECT IS IN BETA STAGE & ACTIVE DEVELOPMENT

contour is a modern terminal emulator, for everyday use. It is aiming for power users with a modern feature mindset.

Features

  • Available on all 3 major platforms, Linux, OS/X, Windows (Windows is alpha stage).
  • GPU-accelerated rendering.
  • Font ligatures support (such as in Fira Code).
  • Unicode: Emoji support (-: 🌈 💝 😛 👪 - including ZWJ, VS15, VS16 emojis :-)
  • Unicode: Grapheme cluster support
  • Bold and italic fonts
  • High-DPI support.
  • Vertical Line Markers (quickly jump to markers in your history!)
  • Blurred behind transparent background when using Windows 10 or KDE window manager on Linux.
  • Runtime configuration reload
  • 256-color and Truecolor support
  • Key binding customization
  • Color Schemes
  • Profiles (grouped customization of: color scheme, login shell, and related behaviours)
  • Synchronized rendering (via DECSM 2026 / DECRM 2026)
  • Text reflow (configurable via DECSM 2027 / DECRM 2027)
  • Clickable hyperlinks via OSC 8
  • Clipboard setting via OSC 52
  • Sixel inline images
  • Terminal page buffer capture VT extension to quickly extract contents.

CLI - Command Line Interface

  Usage:

    contour [terminal] [config STRING] [profile STRING] [debug STRING] [live-config]
                       [working-directory STRING] [PROGRAM ARGS...]
    contour help
    contour version
    contour parser-table
    contour list-debug-tags
    contour capture [logical] [timeout FLOAT] [lines INT] output STRING

  Detailed description:

    contour [terminal]
        Spawns a new terminal application.

        Options:

            [config STRING]             Path to configuration file to load at startup.
                                        [default: /home/trapni/.config/contour/contour.yml]
            [profile STRING]            Terminal Profile to load.
            [debug STRING]              Enables debug logging, using a comma seperated list of tags.
            [live-config]               Enables live config reloading. [default: false]
            [working-directory STRING]  Sets initial working directory. [default: .]
            [PROGRAM ARGS...]           Executes given program instead of the configuration provided one.

Example Configuration File

~!@#$%^&*+=[]{}~?|│" default_profile: ubuntu_vm profiles: ubuntu_vm: shell: "ssh ubuntu-vm" terminal_size: columns: 130 lines: 30 environment: TERM: xterm-256color COLORTERM: truecolor font: size: 12 render_mode: lcd regular: "Fira Code" bold: "Fira Code:style=bold" italic: "Hack:style=italic" bold_italic: "Hack:style=bold italic" emoji: "emoji" tab_width: 8 history: limit: 8000 scroll_multiplier: 3 auto_scroll_on_update: true cursor: shape: block blinking: true background: opacity: 0.9 blur: false colors: google_dark color_schemes: google_dark: cursor: '#b0b030' selection: '#30c0c0' default: background: '#1d1f21' foreground: '#c5c8c6' normal: black: '#1d1f21' red: '#cc342b' green: '#198844' yellow: '#fba922' blue: '#3971ed' magenta: '#a36ac7' cyan: '#3971ed' white: '#c5c8c6' bright: black: '#969896' red: '#cc342b' green: '#198844' yellow: '#fba922' blue: '#3971ed' magenta: '#a36ac7' cyan: '#3971ed' white: '#ffffff' input_mapping: - { mods: [Alt], key: Enter, action: ToggleFullscreen } - { mods: [Control, Alt], key: S, action: ScreenshotVT } - { mods: [Control, Shift], key: Equal, action: IncreaseFontSize } - { mods: [Control, Shift], key: Minus, action: DecreaseFontSize } - { mods: [Control, Shift], key: N, action: NewTerminal } - { mods: [Control], mouse: WheelUp, action: IncreaseFontSize } - { mods: [Control], mouse: WheelDown, action: DecreaseFontSize } - { mods: [Alt], mouse: WheelUp, action: IncreaseOpacity } - { mods: [Alt], mouse: WheelDown, action: DecreaseOpacity } - { mods: [Control], key: '0', action: ResetFontSize } - { mods: [Shift], mouse: WheelUp, action: ScrollPageUp } - { mods: [Shift], mouse: WheelDown, action: ScrollPageDown } - { mods: [], mouse: WheelUp, action: ScrollUp } - { mods: [], mouse: WheelDown, action: ScrollDown } - { mods: [Shift], key: UpArrow, action: ScrollOneUp } - { mods: [Shift], key: DownArrow, action: ScrollOneDown } - { mods: [Shift], key: PageUp, action: ScrollPageUp } - { mods: [Shift], key: PageDown, action: ScrollPageDown } - { mods: [Shift], key: Home, action: ScrollToTop } - { mods: [Shift], key: End, action: ScrollToBottom } - { mods: [Alt, Shift], key: 'k', action: ScrollMarkUp } - { mods: [Alt, Shift], key: 'j', action: ScrollMarkDown } logging: file: "/path/to/contour.log" parse_errors: true invalid_output: true unsupported_output: true raw_input: false raw_output: false trace_input: false trace_output: false ">
word_delimiters: " /\\()\"'-.,:;<>~!@#$%^&*+=[]{}~?|│"
default_profile: ubuntu_vm
profiles:
    ubuntu_vm:
        shell: "ssh ubuntu-vm"
        terminal_size:
            columns: 130
            lines: 30
        environment:
            TERM: xterm-256color
            COLORTERM: truecolor
        font:
            size: 12
            render_mode: lcd
            regular: "Fira Code"
            bold: "Fira Code:style=bold"
            italic: "Hack:style=italic"
            bold_italic: "Hack:style=bold italic"
            emoji: "emoji"
        tab_width: 8
        history:
            limit: 8000
            scroll_multiplier: 3
            auto_scroll_on_update: true
        cursor:
            shape: block
            blinking: true
        background:
            opacity: 0.9
            blur: false
        colors: google_dark

color_schemes:
    google_dark:
        cursor: '#b0b030'
        selection: '#30c0c0'
        default:
            background: '#1d1f21'
            foreground: '#c5c8c6'
        normal:
            black:   '#1d1f21'
            red:     '#cc342b'
            green:   '#198844'
            yellow:  '#fba922'
            blue:    '#3971ed'
            magenta: '#a36ac7'
            cyan:    '#3971ed'
            white:   '#c5c8c6'
        bright:
            black:   '#969896'
            red:     '#cc342b'
            green:   '#198844'
            yellow:  '#fba922'
            blue:    '#3971ed'
            magenta: '#a36ac7'
            cyan:    '#3971ed'
            white:   '#ffffff'

input_mapping:
    - { mods: [Alt],            key: Enter,         action: ToggleFullscreen }
    - { mods: [Control, Alt],   key: S,             action: ScreenshotVT }
    - { mods: [Control, Shift], key: Equal,         action: IncreaseFontSize }
    - { mods: [Control, Shift], key: Minus,         action: DecreaseFontSize }
    - { mods: [Control, Shift], key: N,             action: NewTerminal }
    - { mods: [Control],        mouse: WheelUp,     action: IncreaseFontSize }
    - { mods: [Control],        mouse: WheelDown,   action: DecreaseFontSize }
    - { mods: [Alt],            mouse: WheelUp,     action: IncreaseOpacity }
    - { mods: [Alt],            mouse: WheelDown,   action: DecreaseOpacity }
    - { mods: [Control],        key: '0',           action: ResetFontSize }
    - { mods: [Shift],          mouse: WheelUp,     action: ScrollPageUp }
    - { mods: [Shift],          mouse: WheelDown,   action: ScrollPageDown }
    - { mods: [],               mouse: WheelUp,     action: ScrollUp }
    - { mods: [],               mouse: WheelDown,   action: ScrollDown }
    - { mods: [Shift],          key: UpArrow,       action: ScrollOneUp }
    - { mods: [Shift],          key: DownArrow,     action: ScrollOneDown }
    - { mods: [Shift],          key: PageUp,        action: ScrollPageUp }
    - { mods: [Shift],          key: PageDown,      action: ScrollPageDown }
    - { mods: [Shift],          key: Home,          action: ScrollToTop }
    - { mods: [Shift],          key: End,           action: ScrollToBottom }
    - { mods: [Alt, Shift],     key: 'k',           action: ScrollMarkUp }
    - { mods: [Alt, Shift],     key: 'j',           action: ScrollMarkDown }

logging:
    file: "/path/to/contour.log"
    parse_errors: true
    invalid_output: true
    unsupported_output: true
    raw_input: false
    raw_output: false
    trace_input: false
    trace_output: false

Installing from source

Prerequisites Linux

This is tested on Ubuntu 19.04, but any recent Linux with latest C++17 compiler should do:

sudo apt install \
    "g++-9" cmake pkg-config make libfreetype6-dev qtbase5-dev libqt5gui5 extra-cmake-modules \
    libfontconfig1-dev libharfbuzz-dev libfontconfig-dev

To enable blur-behind feature on transparent background, you'll need the following packages:

sudo apt install libkf5windowsystem-dev

And set pass -DCONTOUR_BLUR_PLATFORM_KWIN=ON to cmake when configuring the project.

In case you want to improve performance slightly and run at at least Linux, you can add -DLIBTERMINAL_EXECUTION_PAR=ON to the cmake configuration and make sure to have libtbb-dev installed beforehand.

Prerequisites Windows 10

For Windows, you must have Windows 10, 2018 Fall Creators Update, and Visual Studio 2019, installed. It will neither build nor run on any prior Windows OS, due to libterminal making use of ConPTY API.

vcpkg install freetype fontconfig harfbuzz qt5-base

Prerequisites Mac OS/X

brew install freetype fontconfig harfbuzz boost qt5

References

License

Contour - A modern C++ Terminal Emulator
-------------------------------------------

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Coredumps when drawing Unicode block characters

    Coredumps when drawing Unicode block characters

    Description

    When attempting to draw box drawing characters, contour attempts to free() an invalid pointer and dumps core.

    Environment

    • Contour Version or Git commit hash: 2814f42f705756cd2dbaeb8579618801c714c7fd
    • Operating System (name / distribution / version): Debian GNU/Linux 11
    • Contour configuration: None
    • TERM environment variable: xterm-256color
    • Compiler version: g++ 10.2.1

    Steps to Reproduce

    1. Install ugrep
    2. Try running ugrep 0..10FFFF which will show every assigned unicode character.
    3. Eventually, Contour will crash

    The point appears to be in the range of box drawing glyphs (U+2500) as I'm able to get it to coredump immediately when I type:

    ugrep box draw
    

    Update:

    This does not crash:

    ugrep 2500..70
    

    Nor does this:

    ugrep 2580..FF
    

    But this crashes:

    ugrep 2570..F
    
    bug VT: rasterizer fonts stability blocker 
    opened by hackerb9 34
  • XTSMGRAPHICS

    XTSMGRAPHICS "Read sixel graphics geometry" returns the different value from xterm.

    Contour Terminal version

    0.3.1-unreleased-master-7f13fbb0

    Installer source

    Github: source code cloned

    Operating System

    Ubuntu Linux 20.04

    Architecture

    x86-64

    Other Software

    No response

    Steps to reproduce

    cat <<EOF > test.sh
    IFS=';' read -a REPLY -s -t 0.25 -d "S" -p $'\e[?2;1;0S'
    echo "width=\${REPLY[2]} height=\${REPLY[3]}"
    EOF
    bash test.sh
    

    Expected Behavior

    Returned width and height are smaller than or equal to screen width and height (same as the latest xterm).

    Actual Behavior

    Returned width and height are always 1920 and 1080 regardless of screen size.

    Additional notes

    By this problem, https://github.com/hackerb9/lsix can not layout pictures as expected position.

    contour image

    xterm image

    ref: xterm implementation:

    https://github.com/ThomasDickey/xterm-snapshots/blob/834b501a1416d7f14b1c38705083f413aea92eee/charproc.c#L4625

    bug 
    opened by kumattau 31
  • segfault with with latest git

    segfault with with latest git

    Contour Terminal version

    latest git

    Installer source

    Github: source code cloned

    Operating System

    arch linux

    Architecture

    x86-64

    Other Software

    none

    Steps to reproduce

    build remove config start

    Expected Behavior

    contour starting

    Actual Behavior

    segment fault

    Additional notes

    https://termbin.com/m7r4 happens also with with stable

    bug frontend: OpenGL OpenGL blocker 
    opened by Glog78 23
  • Set some environment variable if shell is running inside Contour

    Set some environment variable if shell is running inside Contour

    Abstract

    I would like to have some environment variable automatically set by Contour, so the shells running inside may know they are running in Contour.

    When a shell is run inside Konsole, you get a few env vars to at least check their existence and be in the know:

    ╰─ env | grep KONSOLE
    KONSOLE_DBUS_SERVICE=:1.37
    KONSOLE_DBUS_SESSION=/Sessions/10
    KONSOLE_DBUS_WINDOW=/Windows/1
    KONSOLE_PROFILE_NAME=Default (ZSH)
    

    Motivation

    I am using the conceal feature in Vim. Conceal allows you to change keywords and sequences to a single letter. E.g. in C++, I am changing bool to 𝔹, true to and false to . This makes Vim show code when reading like below.

    Unfortunately, Konsole (KDE's terminal emulator I'm using normally) has issues with rendering Unicode. Note how the right-hand sidebar is wobbly, and how in the initialisation of the bool local variables, the just randomly went missing.

    Screenshot_20210217_131849

    So instead, I use a different glyph for the false keyword, . They might look similar, but they ain't. Even Wikipedia mentions the difference between the two symbols. While this makes the disappearing symbol issue fixed, it looks ugly...ish. Note the issue with this symbol is shown, but the wobbly is still there.

    Screenshot_20210217_132137

    If there was some environment variable set by Contour, I could write my Vim scripts in a way that they show the glyph instead of when I'm in Konsole (or rather, disable this whole feature altogether because of the Unicode rendering issues of Konsole), and use the real symbol (and have the conceal feature enabled) when Contour is running.

    Specification

    I'm not sure what kind of env-var could be useful. But if there is "something" that starts with CONTOUR_ and I could grep for it similarly to KONSOLE_, it's already fine for scripting user-facing stuff.

    enhancement good first issue 
    opened by whisperity 23
  • No syntax highlighting in VIM

    No syntax highlighting in VIM

    After compiling under Gentoo I have no color in vim. The normal shell shows colors fine, but when I start vim, it only gives underscoring as highlighting. Is there a way to activate the color in VIM?

    opened by echo2go 21
  • SIGSEGV when displaying sixels

    SIGSEGV when displaying sixels

    Description

    When I run lsix to list the images in a directory, the first row of images appears and then Contour dumps core with a segfault.

    Environment

    • Contour Version or Git commit hash: Git main 77cb600f52f94d888cafe5282a64ad27d0494137
    • Operating System (name / distribution / version): Debian GNU/Linux 11 (bullseye) with Wayland
    • Contour configuration: unchanged
    • TERM environment variable: unchanged
    • Compiler version: g++ 10.2.1 [It didn't show while compiling, but g++ is what I have as my system default (/bin/c++ → /etc/alternatives/c++ → /usr/bin/g++)]

    Steps to Reproduce

    1. Run lsix in a directory with many images.
    2. The first row of images appears
    3. 💥(Kaboom)💥

    Debugging output

    Backtrace № 1
    Thread 10 "contour" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffebe29700 (LWP 530418)]
    terminal::Grid::at (this=0x9b0740, _coord=...) at src/contour/src/terminal/Grid.h:794
    794             return (*next(lines_.begin(), unbox<int>(historyLineCount()) + _coord.row - 1))[static_cast<size_t>(_coord.column - 1)];
    (gdb) bt
    #0  terminal::Grid::at(terminal::Coordinate const&) (this=0x9b0740, _coord=...)
        at src/contour/src/terminal/Grid.h:794
    #1  0x00000000004fd0e9 in terminal::Screen::at(terminal::Coordinate const&) (_coord=..., this=
        0x9afd20) at src/contour/src/terminal/Screen.h:565
    #2  operator() (offset=..., __closure=<synthetic pointer>)
        at src/contour/src/terminal/Screen.cpp:2114
    #3  std::for_each<terminal::GridSize::iterator, terminal::Screen::renderImage(const std::shared_ptr<const terminal::Image>&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, terminal::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)::<lambda(terminal::GridSize::Offset)> > (__last=..., __last=..., __f=..., __first=...) at /usr/include/c++/10/bits/stl_algo.h:3839
    #4  crispy::for_each<terminal::GridSize, terminal::Screen::renderImage(const std::shared_ptr<const terminal::Image>&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, terminal::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)::<lambda(terminal::GridSize::Offset)> >
        (_fn=<optimized out>, _container=<optimized out>)
        at  src/contour/src/crispy/algorithm.h:55
    #5  terminal::Screen::renderImage(std::shared_ptr<terminal::Image const> const&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, crispy::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)
        (this=<optimized out>, _imageRef=<optimized out>, _topLeft=..., _gridSize=..., _imageOffset=..., _imageSize=..., _alignmentPolicy=terminal::ImageAlignment::TopStart, _resizePolicy=terminal::ImageResize::NoResize, _autoScroll=true) at src/contour/src/terminal/Screen.cpp:2107
    #6  0x00000000004fd3ad in terminal::Screen::sixelImage(crispy::ImageSize, std::vector<unsigned char, std::allocator<unsigned char> >&&) (this=0x9afd20, _pixelSize=..., _data=<optimized out>)
        at src/contour/src/terminal/Screen.cpp:2060
    --Type <RET> for more, q to quit, c to continue without paging--c
    #7  0x000000000050b646 in terminal::Sequencer::unhook() (this=0x9b0590) at src/contour/src/terminal/Sequencer.cpp:1073
    #8  0x00000000004f68c9 in terminal::parser::Parser::processInput(char32_t) (this=this@entry=0x9b0668, _ch=27 U'\033') at src/contour/src/terminal/Parser.h:796
    #9  0x00000000004f4bfc in terminal::parser::Parser::parseFragment(std::basic_string_view<char, std::char_traits<char> >) (this=this@entry=0x9b0668, _data=Python Exception <class 'gdb.error'> value has been optimized out: 
    ) at src/contour/src/terminal/Parser.cpp:117
    #10 0x000000000050045e in terminal::Screen::write(std::basic_string_view<char, std::char_traits<char> >) (this=this@entry=0x9afd20, _data="17!158?C#11!65?G#17!80?G!45?A#19!147?C$#17!334?_-#16!30~fv!20~z!12~rzz!15~}!38~vrNf!28~||k!53~|z!8~^!33~^!9~}!14~}!24~v|!23~^!13~|!14~v!51~}!21~|!28~|||!4~}!12~}!14~z{{!39~v!29~b!9~z!14~^!26~n!20~n}!4"...) at src/contour/src/terminal/Screen.cpp:528
    #11 0x0000000000518776 in terminal::Terminal::writeToScreen(std::basic_string_view<char, std::char_traits<char> >) (this=0x9afb40, _data="17!158?C#11!65?G#17!80?G!45?A#19!147?C$#17!334?_-#16!30~fv!20~z!12~rzz!15~}!38~vrNf!28~||k!53~|z!8~^!33~^!9~}!14~}!24~v|!23~^!13~|!14~v!51~}!21~|!28~|||!4~}!12~}!14~z{{!39~v!29~b!9~z!14~^!26~n!20~n}!4"...) at src/contour/src/terminal/Terminal.cpp:696
    #12 0x000000000051ae38 in terminal::Terminal::processInputOnce() (this=0x9afb40) at src/contour/src/terminal/Terminal.cpp:185
    #13 0x000000000051d2c0 in terminal::Terminal::mainLoop() (this=0x9afb40) at src/contour/src/terminal/Terminal.cpp:154
    #14 0x00007ffff686ced0 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #15 0x00007ffff7778ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
    #16 0x00007ffff6576def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    (gdb)
    
    Backtrace № 2
    Thread 10 "contour" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fffebe29700 (LWP 535751)]
    0x00000000004fd141 in terminal::ImageFragment::ImageFragment (this=<optimized out>) at /usr/include/c++/10/bits/shared_ptr_base.h:1190
    1190          __shared_ptr(__shared_ptr&& __r) noexcept
    (gdb) bt
    #0  0x00000000004fd141 in terminal::ImageFragment::ImageFragment(terminal::ImageFragment&&)
        (this=<optimized out>) at /usr/include/c++/10/bits/shared_ptr_base.h:1190
    #1  std::_Optional_base_impl<terminal::ImageFragment, std::_Optional_base<terminal::ImageFragment, false, false> >::_M_construct<terminal::ImageFragment>(terminal::ImageFragment&&)
        (this=<optimized out>) at /usr/include/c++/10/optional:419
    #2  std::optional<terminal::ImageFragment>::emplace<terminal::ImageFragment>(terminal::ImageFragment&&) (this=<optimized out>) at /usr/include/c++/10/optional:851
    #3  terminal::Cell::setImage(terminal::ImageFragment) (_imageFragment=..., this=<optimized out>)
        at src/contour/src/terminal/Grid.h:324
    #4  operator() (offset=..., __closure=<synthetic pointer>)
        at src/contour/src/terminal/Screen.cpp:2115
    #5  std::for_each<terminal::GridSize::iterator, terminal::Screen::renderImage(const std::shared_ptr<const terminal::Image>&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, terminal::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)::<lambda(terminal::GridSize::Offset)> > (__last=..., __last=..., __f=..., __first=...) at /usr/include/c++/10/bits/stl_algo.h:3839
    #6  crispy::for_each<terminal::GridSize, terminal::Screen::renderImage(const std::shared_ptr<const terminal::Image>&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, terminal::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)::<lambda(terminal::GridSize::Offset)> >
        (_fn=<optimized out>, _container=<optimized out>)
        at src/contour/src/crispy/algorithm.h:55
    #7  terminal::Screen::renderImage(std::shared_ptr<terminal::Image const> const&, terminal::Coordinate, terminal::GridSize, terminal::Coordinate, crispy::ImageSize, terminal::ImageAlignment, terminal::ImageResize, bool)
        (this=<optimized out>, _imageRef=<optimized out>, _topLeft=..., _gridSize=..., _imageOffset=..., --Type <RET> for more, q to quit, c to continue without paging--c
    _imageSize=..., _alignmentPolicy=terminal::ImageAlignment::TopStart, _resizePolicy=terminal::ImageResize::NoResize, _autoScroll=true) at src/contour/src/terminal/Screen.cpp:2107
    #8  0x00000000004fd3ad in terminal::Screen::sixelImage(crispy::ImageSize, std::vector<unsigned char, std::allocator<unsigned char> >&&) (this=0x9af260, _pixelSize=..., _data=<optimized out>) at src/contour/src/terminal/Screen.cpp:2060
    #9  0x000000000050b646 in terminal::Sequencer::unhook() (this=0x9afad0) at src/contour/src/terminal/Sequencer.cpp:1073
    #10 0x00000000004f68c9 in terminal::parser::Parser::processInput(char32_t) (this=this@entry=0x9afba8, _ch=27 U'\033') at src/contour/src/terminal/Parser.h:796
    #11 0x00000000004f4bfc in terminal::parser::Parser::parseFragment(std::basic_string_view<char, std::char_traits<char> >) (this=this@entry=0x9afba8, _data=Python Exception <class 'gdb.error'> value has been optimized out: 
    ) at src/contour/src/terminal/Parser.cpp:117
    #12 0x000000000050045e in terminal::Screen::write(std::basic_string_view<char, std::char_traits<char> >) (this=this@entry=0x9af260, _data="5?A#162?O#163_$#175!54?G#161??C#171C#205!9?_#28?q???o!4?C$#205!54?S#210???G#47!11?K???G#164???G$#196!71?o!7?A$#210!71?C#89C!4?G$#167!72?A#204A!4?C-#14!45~!4{~!10{~{{__g{{{}{{~~{{vooo?oo!19~nNFN!545~^^"...) at src/contour/src/terminal/Screen.cpp:528
    #13 0x0000000000518776 in terminal::Terminal::writeToScreen(std::basic_string_view<char, std::char_traits<char> >) (this=0x9af080, _data="5?A#162?O#163_$#175!54?G#161??C#171C#205!9?_#28?q???o!4?C$#205!54?S#210???G#47!11?K???G#164???G$#196!71?o!7?A$#210!71?C#89C!4?G$#167!72?A#204A!4?C-#14!45~!4{~!10{~{{__g{{{}{{~~{{vooo?oo!19~nNFN!545~^^"...) at src/contour/src/terminal/Terminal.cpp:696
    #14 0x000000000051ae38 in terminal::Terminal::processInputOnce() (this=0x9af080) at src/contour/src/terminal/Terminal.cpp:185
    #15 0x000000000051d2c0 in terminal::Terminal::mainLoop() (this=0x9af080) at src/contour/src/terminal/Terminal.cpp:154
    #16 0x00007ffff686ced0 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
    #17 0x00007ffff7778ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
    #18 0x00007ffff6576def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    (gdb) 
    
    bug VT: Backend stability 
    opened by hackerb9 19
  • Make deps of several C++ header libraries to improve terminal

    Make deps of several C++ header libraries to improve terminal

    Windows Terminal uses these C++ libraries: https://github.com/microsoft/terminal/tree/main/oss for a few things that include type-safety, thread-safety, safer math, performance, and easier implementation of some functionalities. Since this is a C++ terminal project, I thought I'd recommend these to improve things here. These libraries work on all platforms (Linux, Windows, MacOS).

    enhancement 
    opened by WSLUser 19
  • Chinese display has some problems

    Chinese display has some problems

    Contour Terminal version

    0.2.3

    Installer source

    GitHub: release page

    Operating System

    OS/X Monterey 12.0.1

    Architecture

    x86-64

    Other Software

    NeoVim 0.6.1

    Steps to reproduce

    display

    Expected Behavior

    image

    image

    Actual Behavior

    image

    image

    Additional notes

    bug fonts platform: osx 
    opened by Jackson-soft 18
  • empty window and

    empty window and "Precision qualifier" is not supported prior to GLSL version 1.30

    Description

    an empty window appears, the desktop background shines through can only be closed

    Environment

    ubuntu 20

    Steps to Reproduce

    > dpkg -i contour-terminfo_0.2.1~develop-2021-09-09-20-49-77cb600f-0ubuntu1~focal_amd64
    > dpkg -i contour_0.2.1~develop-2021-09-09-20-49-77cb600f-0ubuntu1~focal_amd64
    

    contour

    [error] Superfluous config key found: profiles.main.font.regular
    [error] Superfluous config key found: profiles.main.hyperlink_decoration.default
    qt5ct: using qt5ct plugin
    QOpenGLShader::compile(Vertex): Vertex shader failed to compile with the following errors:
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: error(#273) 5 compilation errors.  No code generated
    
    
    *** Problematic Vertex shader source code ***
    #line 1
    attribute highp vec3 vertexCoord;attribute highp vec2 textureCoord;varying highp vec2 uv;uniform highp mat4 vertexTransform;uniform highp mat3 textureTransform;void main() {   uv = (textureTransform * vec3(textureCoord,1.0)).xy;   gl_Position = vertexTransform * vec4(vertexCoord,1.0);}
    ***
    Could not link shader program:
     "Vertex shader failed to compile with the following errors:\nERROR: 1:1: error(#263) \"Precision qualifier\" is not supported prior to GLSL version 1.30\nERROR: 1:1: error(#263) \"Precision qualifier\" is not supported prior to GLSL version 1.30\nERROR: 1:1: error(#263) \"Precision qualifier\" is not supported prior to GLSL version 1.30\nERROR: 1:1: error(#263) \"Precision qualifier\" is not supported prior to GLSL version 1.30\nERROR: 1:1: error(#263) \"Precision qualifier\" is not supported prior to GLSL version 1.30\nERROR: error(#273) 5 compilation errors.  No code generated\n\n"
    QOpenGLShader::compile(Vertex): Vertex shader failed to compile with the following errors:
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: 1:1: error(#263) "Precision qualifier" is not supported prior to GLSL version 1.30
    ERROR: error(#273) 5 compilation errors.  No code generated
    

    the above error continues multiple times Sorry, no idea about any of this

    bug frontend: OpenGL stability 
    opened by dbpaul 17
  • Allow build on FreeBSD

    Allow build on FreeBSD

    These are some fixes for making contour compile on FreeBSD. Mostly things where Linux was assumed.

    Build with autogen.sh does not work because of the broken shebang (which I didn't bother fixing). Thus build manually with cmake:

    $ cmake -G'Unix Makefiles' -Bbuild .

    Everything seems fine so far, except changing the font. That causes a floating point exception. I may do some further debugging to try and figure out what is going on there.

    I don't know if the change in UnixPty.h:108 causes any trouble because of const correctness. The prototype of openpty on FreeBSD is :

     int
     openpty(int *amaster, int *aslave, char *name, struct termios *termp,
             struct winsize *winp);
    

    (see https://www.freebsd.org/cgi/man.cgi?query=openpty&apropos=0&sektion=0&manpath=FreeBSD+13.0-RELEASE+and+Ports&arch=default&format=html ). The compiler complains about the discarded const which causes the candidade to be disregarded.

    In case the changes get merged and the floating point exception fixed, I may bring contour to the FreeBSD Ports.

    VT: Backend 
    opened by herrhotzenplotz 16
  • Unicode character display (strangely wide or missing)

    Unicode character display (strangely wide or missing)

    Description

    Contour displays some characters very strangely or not at all.

    Environment

    • Contour Version or Git commit hash: 2814f42f705756cd2dbaeb8579618801c714c7fd
    • Operating System (name / distribution / version): Debian GNU/Linux 11
    • Contour configuration: None
    • TERM environment variable: xterm-256color
    • Compiler version: g++ 10.2.1

    Steps to Reproduce

    1. Run the fonttable script
    2. Notice that some of the characters are strangely large and most are missing. image
    3. Now run fonttable | less. Use the > key to go to the end of input.
    4. Notice that, although it should be identical, the glyphs now appear correct. image
    bug VT: rasterizer fonts blocker 
    opened by hackerb9 16
  • streamline naming conventions

    streamline naming conventions

    about a year ago or so, the naming scheme has changed in some places. That made it just worse.

    This ticket is to track that we've fixed that again as part of the bigger goals: having good looking code :) :hankey:

    Changes

    • function parameters don't use any underscores anymore
    • private member variables use leading underscore

    Checklist

    • [x] CI: Add it to .clang-tidy to ensure proper naming
    • [x] vtpty
    • [x] vtbackend
    • [x] vtrasterizer
    • [x] crispy
    • [x] text_shaper
    • [ ] contour frontend
    • [ ] add CI check to enforce valid naming in CI
    • [ ] get rid of stdfs.h and related legacy
    code health 
    opened by christianparpart 0
  • Contour built with Qt6 doesn't adhere to terminal size provided in config file

    Contour built with Qt6 doesn't adhere to terminal size provided in config file

    Contour Terminal version

    Contour Terminal Emulator 0.3.10-master-f2a0c3d5

    Installer source

    Github: source code cloned

    Operating System

    Fedora 37

    Architecture

    x86-64

    Other Software

    No response

    Steps to reproduce

    1. Build contour with Qt6.
    2. Run contour with default config.

    Expected Behavior

    When default config is used the terminal size should be 25 line high and 80 columns wide.

    Actual Behavior

    The contour window that appears is 20 lines high and 56 columns wide.

    Additional notes

    No response

    bug frontend 
    opened by Utkarsh-khambra 2
  • Migrate frontend from Qt Widgets to Qt QML API

    Migrate frontend from Qt Widgets to Qt QML API

    We have a PR for that one already, but this is the tracking ticket.

    We basically depend on #955 before we can continue working on this, in order to make it way simpler to use QML (as we only need to care about latest major Qt version)

    Depends on #955.

    frontend code health 
    opened by christianparpart 0
  • Migrate to Qt 6 on all platforms

    Migrate to Qt 6 on all platforms

    Motivation behind? Supporting multiple major Qt versions seems almost impossible. And with the move to QML on the frontend side, it's basically not possible at all.

    The idea is to only use Qt 6 only, have all references to Qt 5 completely removed, and then have a much easier time when working on the QML port again.

    The only challenge here is the older Linux distributions that either don't have native Qt 6 package or aren't even supported by Qt at all (Ubuntu 18.04!).

    Checklist

    • [x] OS/X
    • [x] Windows
    • [x] FreeBSD
    • [x] Fedora Linux
    • [x] Arch Linux
    • [x] Ubuntu 22.04
    • [ ] Ubuntu 20.04
    • [ ] Ubuntu 18.04
    • [ ] AppImage (using Ubuntu 18.04 as base?)
    • [ ] Have all support of Qt 5 completely removed.
    frontend code health platform: osx platform: linux platform: windows platform: FreeBSD 
    opened by christianparpart 0
  • Implement action CopyToClipboardHTML

    Implement action CopyToClipboardHTML

    Description

    Describe your changes in detail

    Upon pressing ctrl h in the keyboard, action  CopyToClipboardHTML  is triggered which will copy to clipboard the selected text in html format.
    

    Motivation and Context

    Why is this change required? What problem does it solve?

    
    

    How Has This Been Tested?

    • [ ] Please describe how you tested your changes.
    • [ ] see how your change affects other areas of the code, etc.

    Checklist:

    Go over all the following points, and put an x in all the boxes that apply.

    If you're unsure about any of these, don't hesitate to ask. We're here to help!

    • [x] I have read the CONTRIBUTING document in my spoken language, and understand the terms
    • [ ] I have updated (or added) the documentation accordingly.
    • [ ] I have added tests to cover my changes.
    • [ ] I have gone through all the steps, and have thoroughly read the instructions
    VT: Backend frontend 
    opened by theoniko 3
Releases(v0.3.9.250)
Owner
Contour Terminal Emulator
Contour is a terminal emulator aiming at todays power users
Contour Terminal Emulator
Spitfire is a basic terminal language that can exicute code via the terminal.

Spitfire is a basic terminal language that can exicute code via the terminal. It is easy to learn and runs fast, considering that its just a 300 line c++ file.

jhomas tefferson 0 Nov 18, 2021
X terminal emulator rendering through OpenGL ES Compute Shaders

Zutty is a terminal emulator for the X Window System, functionally similar to several other X terminal emulators such as xterm, rxvt and countless others

Tom Szilagyi 259 Dec 24, 2022
Make your terminal emulator colorful!

libvterm Make your terminal emulator colorful! LibVTerm is an embeddable ANSI C89 (C90) library for parsing ANSI escape sequences. It is constructed i

Kirill GPRB 5 Jun 4, 2022
Small header only C++ library for writing multiplatform terminal applications

Terminal Terminal is small header only library for writing terminal applications. It works on Linux, macOS and Windows (in the native cmd.exe console)

Jupyter Xeus 274 Jan 2, 2023
:computer: C++ Functional Terminal User Interface. :heart:

FTXUI Functional Terminal (X) User interface A simple C++ library for terminal based user interface. Demo: Feature Functional style. Inspired by [1] a

Arthur Sonzogni 4k Jan 3, 2023
A little UNIX-inspired terminal application for the Numworks Calculator (not using escher).

L.E. Terminal (let for short) is a little UNIX-inspired terminal for the Numworks Calculator.

Cacahuète Sans Sel 20 Aug 31, 2022
Draw sequence diagram in text from terminal.

sequence-diagram-cli Draw seqence diagram from terminal.

null 44 Dec 20, 2022
Terminal calculator made for programmers working with multiple number representations, sizes, and overall close to the bits

Programmer calculator The programmer calculator is a simple terminal tool designed to give maximum efficiency and flexibility to the programmer workin

romes 183 Dec 24, 2022
The new Windows Terminal and the original Windows console host, all in the same place!

The new Windows Terminal and the original Windows console host, all in the same place!

Microsoft 86.8k Dec 29, 2022
n³ The unorthodox terminal file manager

n³ The unorthodox terminal file manager

Mischievous Meerkat 15.5k Jan 1, 2023
Graphs the activity of a chia harvester in a linux terminal.

Chia Harvest Graph Monitor for Chia Harvesting Introduction The chiaharvestgraph tool will graph Chia Harvesting activity in a linux terminal. Use a 2

Bram Stolk 215 Dec 11, 2022
a simple to use linux terminal

a simple to use linux terminal

notaweeb 7 Feb 17, 2022
Collection of human friendly terminal interface for git.

A collection of human friendly terminal user interface for git.

Arthur Sonzogni 76 Dec 30, 2022
Simple benchmark for terminal output

TermBench This is a simple timing utility you can use to see how slow your terminal program is at parsing escape-sequence-coded color output. It can b

Casey Muratori 174 Dec 4, 2022
tinytetris - 80x23 terminal tetris

tinytetris - 80x23 terminal tetris

Conor Taylor 2k Jan 3, 2023
A C, C++ and Rust library to draw graphics with pixels in the terminal

A library to draw graphics with pixels in the terminal Who needs a GUI when you have a terminal ? Building To generate libpluto.a, run: $ make To ins

null 69 Nov 7, 2022
📺🗿 Terminal graphics for the 21st century.

???? Chafa is a command-line utility that converts all kinds of images, including animated GIFs, into sixel or ANSI/Unicode character output that can be displayed in a terminal.

Hans Petter Jansson 1.8k Dec 31, 2022
Simple Unix Terminal Football Manager-like game.

Superleage 2020/2021 It is a "work in progress" simple game based on some mechanics of Football Manager. The game is in a very early stage of Developm

sewe2000 2 Oct 14, 2021
timg - Terminal Image and Video Viewer

timg - Terminal Image and Video Viewer

Henner Zeller 1.3k Dec 31, 2022