Repository: Swordfish90/cool-retro-term Branch: master Commit: 86ee7da8da8b Files: 200 Total size: 344.3 KB Directory structure: gitextract_dw7tnwnr/ ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ └── release.yml ├── .gitignore ├── .gitmodules ├── README.md ├── app/ │ ├── app.pro │ ├── fileio.cpp │ ├── fileio.h │ ├── fontlistmodel.cpp │ ├── fontlistmodel.h │ ├── fontmanager.cpp │ ├── fontmanager.h │ ├── icons/ │ │ └── crt.icns │ ├── main.cpp │ ├── qml/ │ │ ├── AboutDialog.qml │ │ ├── ApplicationSettings.qml │ │ ├── BurnInEffect.qml │ │ ├── CheckableSlider.qml │ │ ├── ColorButton.qml │ │ ├── Components/ │ │ │ └── SizedLabel.qml │ │ ├── InsertNameDialog.qml │ │ ├── PreprocessedTerminal.qml │ │ ├── SettingsAdvancedTab.qml │ │ ├── SettingsEffectsTab.qml │ │ ├── SettingsGeneralTab.qml │ │ ├── SettingsTerminalTab.qml │ │ ├── SettingsWindow.qml │ │ ├── ShaderTerminal.qml │ │ ├── SimpleSlider.qml │ │ ├── SizeOverlay.qml │ │ ├── Storage.qml │ │ ├── TerminalContainer.qml │ │ ├── TerminalFrame.qml │ │ ├── TerminalTabs.qml │ │ ├── TerminalWindow.qml │ │ ├── TimeManager.qml │ │ ├── fonts/ │ │ │ ├── apple2/ │ │ │ │ └── FreeLicense.txt │ │ │ ├── bigblue-terminal/ │ │ │ │ └── LICENSE.TXT │ │ │ ├── departure-mono/ │ │ │ │ ├── DepartureMonoNerdFontMono-Regular.otf │ │ │ │ └── LICENSE │ │ │ ├── fira-code/ │ │ │ │ └── LICENSE.txt │ │ │ ├── gohu/ │ │ │ │ └── LICENSE │ │ │ ├── greybeard/ │ │ │ │ └── LICENSE │ │ │ ├── hack/ │ │ │ │ └── LICENSE.txt │ │ │ ├── ibm-3278/ │ │ │ │ ├── LICENSE.txt │ │ │ │ └── README.md │ │ │ ├── iosevka/ │ │ │ │ └── LICENSE.txt │ │ │ ├── jetbrains-mono/ │ │ │ │ └── LICENSE.txt │ │ │ ├── oldschool-pc-fonts/ │ │ │ │ └── LICENSE.TXT │ │ │ ├── opendyslexic/ │ │ │ │ ├── LICENSE.txt │ │ │ │ └── OpenDyslexicMNerdFontMono-Regular.otf │ │ │ ├── pet-me/ │ │ │ │ └── FreeLicense.txt │ │ │ ├── source-code-pro/ │ │ │ │ └── LICENSE.txt │ │ │ ├── terminus/ │ │ │ │ └── LICENSE-Terminess.txt │ │ │ └── unscii/ │ │ │ └── LICENSE │ │ ├── main.qml │ │ ├── menus/ │ │ │ ├── FullContextMenu.qml │ │ │ ├── ShortContextMenu.qml │ │ │ └── WindowMenu.qml │ │ ├── resources.qrc │ │ └── utils.js │ └── shaders/ │ ├── burn_in.frag │ ├── burn_in.frag.qsb │ ├── burn_in.vert │ ├── burn_in.vert.qsb │ ├── passthrough.vert │ ├── passthrough.vert.qsb │ ├── terminal_dynamic.frag │ ├── terminal_dynamic.vert │ ├── terminal_dynamic.vert.qsb │ ├── terminal_dynamic_raster0_burn0_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster0_burn0_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster0_burn0_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster0_burn0_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster0_burn1_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster0_burn1_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster0_burn1_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster0_burn1_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster1_burn0_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster1_burn0_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster1_burn0_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster1_burn0_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster1_burn1_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster1_burn1_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster1_burn1_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster1_burn1_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster2_burn0_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster2_burn0_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster2_burn0_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster2_burn0_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster2_burn1_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster2_burn1_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster2_burn1_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster2_burn1_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster3_burn0_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster3_burn0_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster3_burn0_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster3_burn0_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster3_burn1_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster3_burn1_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster3_burn1_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster3_burn1_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster4_burn0_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster4_burn0_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster4_burn0_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster4_burn0_frame1_chroma1.frag.qsb │ ├── terminal_dynamic_raster4_burn1_frame0_chroma0.frag.qsb │ ├── terminal_dynamic_raster4_burn1_frame0_chroma1.frag.qsb │ ├── terminal_dynamic_raster4_burn1_frame1_chroma0.frag.qsb │ ├── terminal_dynamic_raster4_burn1_frame1_chroma1.frag.qsb │ ├── terminal_frame.frag │ ├── terminal_frame.frag.qsb │ ├── terminal_frame.vert │ ├── terminal_frame.vert.qsb │ ├── terminal_static.frag │ ├── terminal_static.vert │ ├── terminal_static.vert.qsb │ ├── terminal_static_rgb0_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb0_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_bloom1_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_bloom1_curve1_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve1.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma0_bloom1_curve1_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve1.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve1_shine0.frag.qsb │ ├── terminal_static_rgb0_chroma1_bloom1_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb1_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_bloom1_curve1_shine0.frag.qsb │ ├── terminal_static_rgb1_bloom1_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve1.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve1_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma0_bloom1_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve0.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve1_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom0_curve1_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom1_curve0.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom1_curve0_shine0.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom1_curve0_shine1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom1_curve1.frag.qsb │ ├── terminal_static_rgb1_chroma1_bloom1_curve1_shine0.frag.qsb │ └── terminal_static_rgb1_chroma1_bloom1_curve1_shine1.frag.qsb ├── cool-retro-term.desktop ├── cool-retro-term.pro ├── gpl-2.0.txt ├── gpl-3.0.txt ├── packaging/ │ ├── appdata/ │ │ └── cool-retro-term.appdata.xml │ ├── debian/ │ │ ├── .gitignore │ │ ├── changelog │ │ ├── compat │ │ ├── control │ │ ├── cool-retro-term.1 │ │ ├── copyright │ │ ├── rules │ │ ├── source/ │ │ │ └── format │ │ └── watch │ └── rpm/ │ └── cool-retro-term.spec ├── scripts/ │ ├── build-appimage.sh │ ├── build-dmg.sh │ └── list_glyph_counts.py └── snap/ └── snapcraft.yaml ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms patreon: swordfish90 custom: ['https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=flscogna%40gmail.com&item_name=Support+CRT¤cy_code=EUR&source=url'] ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: workflow_dispatch: push: branches: - main - master tags: - '*' permissions: contents: write jobs: build-appimage: name: Build (Linux, AppImage) runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Install build deps run: | sudo apt update sudo apt install -y build-essential rsync wget - name: Install Qt uses: jurplel/install-qt-action@v4 with: version: 6.10.0 dir: .. modules: qt5compat qtshadertools setup-python: false cache: true - name: Build AppImage run: | ./scripts/build-appimage.sh - name: Collect artifact run: | mkdir -p release mv ./*.AppImage release/ - name: Upload artifact uses: actions/upload-artifact@v4 with: name: cool-retro-term-appimage path: ./release/* build-dmg: name: Build (macOS, DMG) runs-on: macos-14 steps: - uses: actions/checkout@v4 with: submodules: recursive - name: Install Qt uses: jurplel/install-qt-action@v4 with: version: 6.10.* modules: qt5compat qtshadertools setup-python: true python-version: '3.11' cache: true - name: Build DMG run: | JOBS="$(sysctl -n hw.ncpu)" ./scripts/build-dmg.sh - name: Collect artifact run: | mkdir -p release mv ./*.dmg release/ - name: Upload artifact uses: actions/upload-artifact@v4 with: name: cool-retro-term-dmg path: ./release/* release: name: Create Release runs-on: ubuntu-22.04 needs: - build-appimage - build-dmg steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Download AppImage uses: actions/download-artifact@v4 with: name: cool-retro-term-appimage path: ./release - name: Download DMG uses: actions/download-artifact@v4 with: name: cool-retro-term-dmg path: ./release - name: Update rolling tag if: startsWith(github.ref, 'refs/heads/') run: | git tag -f rolling git push -f origin rolling - name: Publish rolling release if: startsWith(github.ref, 'refs/heads/') uses: softprops/action-gh-release@v2 with: tag_name: rolling name: Rolling Release prerelease: true files: ./release/* - name: Publish tagged release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref_name }} files: ./release/* ================================================ FILE: .gitignore ================================================ # C++ objects and libs *.slo *.lo *.o *.a *.la *.lai *.so *.dll *.dylib # Qt-es /.qmake.cache /.qmake.stash *.pro.user *.pro.user.* *.moc moc_*.cpp moc_*.h qrc_*.cpp ui_*.h Makefile* *-build-* # QtCreator *.autosave # QtCtreator Qml *.qmlproject.user *.qmlproject.user.* # Others *.xcf # Ubuntu SDk *.excludes *.json # Excludes compiled files imports cool-retro-term build # Linux *.AppImage # Mac OSX .DS_Store *.app *.dmg ================================================ FILE: .gitmodules ================================================ [submodule "qmltermwidget"] path = qmltermwidget url = https://github.com/Swordfish90/qmltermwidget branch = unstable [submodule "KDSingleApplication"] path = KDSingleApplication url = https://github.com/KDAB/KDSingleApplication.git ================================================ FILE: README.md ================================================ # cool-retro-term |> Default Amber|C:\ IBM DOS|$ Default Green| |---|---|---| |![Default Amber Cool Retro Term](https://user-images.githubusercontent.com/121322/32070717-16708784-ba42-11e7-8572-a8fcc10d7f7d.gif)|![IBM DOS](https://user-images.githubusercontent.com/121322/32070716-16567e5c-ba42-11e7-9e64-ba96dfe9b64d.gif)|![Default Green Cool Retro Term](https://user-images.githubusercontent.com/121322/32070715-163a1c94-ba42-11e7-80bb-41fbf10fc634.gif)| ## Description cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. It uses the QML port of qtermwidget (Konsole): https://github.com/Swordfish90/qmltermwidget. This terminal emulator works under Linux and macOS and requires Qt6. Settings such as colors, fonts, and effects can be accessed via context menu. ## Screenshots ![Image]() ![Image]() ![Image]() ## Install If you want to get a hold of the latest version, just go to the Releases page and grab the latest AppImage (Linux) or dmg (macOS). Alternatively, most distributions such as Ubuntu, Fedora or Arch already package cool-retro-term in their official repositories. ## Building Check out the wiki and follow the instructions on how to build it on [Linux](https://github.com/Swordfish90/cool-retro-term/wiki/Build-Instructions-(Linux)) and [macOS](https://github.com/Swordfish90/cool-retro-term/wiki/Build-Instructions-(macOS)). ================================================ FILE: app/app.pro ================================================ QT += qml quick widgets sql quickcontrols2 TARGET = cool-retro-term APP_VERSION = $$system(git -C $$PWD/.. describe --tags --always --dirty=-dirty) isEmpty(APP_VERSION): APP_VERSION = "unknown" DEFINES += APP_VERSION=\\\"$$APP_VERSION\\\" # TODO: When migrating to CMake, use KDSingleApplication's CMakeLists.txt instead of these manual sources. INCLUDEPATH += $$PWD/../KDSingleApplication/src HEADERS += \ $$PWD/../KDSingleApplication/src/kdsingleapplication.h \ $$PWD/../KDSingleApplication/src/kdsingleapplication_lib.h \ $$PWD/../KDSingleApplication/src/kdsingleapplication_localsocket_p.h SOURCES += \ $$PWD/../KDSingleApplication/src/kdsingleapplication.cpp \ $$PWD/../KDSingleApplication/src/kdsingleapplication_localsocket.cpp DEFINES += KDSINGLEAPPLICATION_STATIC_BUILD DESTDIR = $$OUT_PWD/../ HEADERS += \ fileio.h \ fontmanager.h \ fontlistmodel.h SOURCES += main.cpp \ fileio.cpp \ fontmanager.cpp \ fontlistmodel.cpp macx:ICON = icons/crt.icns RESOURCES += qml/resources.qrc # Shader compilation (Qt Shader Baker) QSB_BIN = $$[QT_HOST_BINS]/qsb isEmpty(QSB_BIN): QSB_BIN = $$[QT_INSTALL_BINS]/qsb SHADERS_DIR = $${_PRO_FILE_PWD_}/shaders SHADERS += $$files($$SHADERS_DIR/*.frag) $$files($$SHADERS_DIR/*.vert) SHADERS -= $$SHADERS_DIR/terminal_dynamic.frag SHADERS -= $$SHADERS_DIR/terminal_static.frag SHADERS -= $$SHADERS_DIR/passthrough.vert qsb.input = SHADERS qsb.output = ../../app/shaders/${QMAKE_FILE_NAME}.qsb qsb.commands = $$QSB_BIN --glsl \"100 es,120,150\" --hlsl 50 --msl 12 --qt6 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} qsb.clean = $$qsb.output qsb.name = qsb ${QMAKE_FILE_IN} qsb.variable_out = QSB_FILES QMAKE_EXTRA_COMPILERS += qsb PRE_TARGETDEPS += $$QSB_FILES OTHER_FILES += $$SHADERS $$QSB_FILES DYNAMIC_SHADER = $$SHADERS_DIR/terminal_dynamic.frag STATIC_SHADER = $$SHADERS_DIR/terminal_static.frag RASTER_MODES = 0 1 2 3 4 BINARY_FLAGS = 0 1 VARIANT_SHADER_DIR = $$relative_path($$PWD/shaders, $$OUT_PWD) VARIANT_OUTPUTS = for(raster_mode, RASTER_MODES) { for(burn_in, BINARY_FLAGS) { for(display_frame, BINARY_FLAGS) { for(chroma_on, BINARY_FLAGS) { dynamic_variant = terminal_dynamic_raster$${raster_mode}_burn$${burn_in}_frame$${display_frame}_chroma$${chroma_on} dynamic_output = $${VARIANT_SHADER_DIR}/$${dynamic_variant}.frag.qsb dynamic_target = shader_variant_$${dynamic_variant} $${dynamic_target}.target = $${dynamic_output} $${dynamic_target}.depends = $$DYNAMIC_SHADER $${dynamic_target}.commands = $$QSB_BIN --glsl \"100 es,120,150\" --hlsl 50 --msl 12 --qt6 -DCRT_RASTER_MODE=$${raster_mode} -DCRT_BURN_IN=$${burn_in} -DCRT_DISPLAY_FRAME=$${display_frame} -DCRT_CHROMA=$${chroma_on} -o $${dynamic_output} $$DYNAMIC_SHADER QMAKE_EXTRA_TARGETS += $${dynamic_target} VARIANT_OUTPUTS += $${dynamic_output} } } } } for(rgb_shift, BINARY_FLAGS) { for(bloom_on, BINARY_FLAGS) { for(curve_on, BINARY_FLAGS) { for(shine_on, BINARY_FLAGS) { static_variant = terminal_static_rgb$${rgb_shift}_bloom$${bloom_on}_curve$${curve_on}_shine$${shine_on} static_output = $${VARIANT_SHADER_DIR}/$${static_variant}.frag.qsb static_target = shader_variant_$${static_variant} $${static_target}.target = $${static_output} $${static_target}.depends = $$STATIC_SHADER $${static_target}.commands = $$QSB_BIN --glsl \"100 es,120,150\" --hlsl 50 --msl 12 --qt6 -DCRT_RGB_SHIFT=$${rgb_shift} -DCRT_BLOOM=$${bloom_on} -DCRT_CURVATURE=$${curve_on} -DCRT_FRAME_SHININESS=$${shine_on} -o $${static_output} $$STATIC_SHADER QMAKE_EXTRA_TARGETS += $${static_target} VARIANT_OUTPUTS += $${static_output} } } } } PRE_TARGETDEPS += $${VARIANT_OUTPUTS} ######################################### ## INTALLS ######################################### target.path += /usr/bin/ INSTALLS += target # Install icons unix { icon32.files = icons/32x32/cool-retro-term.png icon32.path = /usr/share/icons/hicolor/32x32/apps icon64.files = icons/64x64/cool-retro-term.png icon64.path = /usr/share/icons/hicolor/64x64/apps icon128.files = icons/128x128/cool-retro-term.png icon128.path = /usr/share/icons/hicolor/128x128/apps icon256.files = icons/256x256/cool-retro-term.png icon256.path = /usr/share/icons/hicolor/256x256/apps INSTALLS += icon32 icon64 icon128 icon256 } ================================================ FILE: app/fileio.cpp ================================================ #include "fileio.h" FileIO::FileIO() { } bool FileIO::write(const QString& sourceUrl, const QString& data) { if (sourceUrl.isEmpty()) return false; QUrl url(sourceUrl); QFile file(url.toLocalFile()); if (!file.open(QFile::WriteOnly | QFile::Truncate)) return false; QTextStream out(&file); out << data; file.close(); return true; } QString FileIO::read(const QString& sourceUrl) { if (sourceUrl.isEmpty()) return ""; QUrl url(sourceUrl); QFile file(url.toLocalFile()); if (!file.open(QFile::ReadOnly)) return ""; QTextStream in(&file); QString result = in.readAll(); file.close(); return result; } ================================================ FILE: app/fileio.h ================================================ #ifndef FILEIO_H #define FILEIO_H #include #include #include #include class FileIO : public QObject { Q_OBJECT public: FileIO(); public slots: bool write(const QString& sourceUrl, const QString& data); QString read(const QString& sourceUrl); }; #endif // FILEIO_H ================================================ FILE: app/fontlistmodel.cpp ================================================ #include "fontlistmodel.h" FontListModel::FontListModel(QObject *parent) : QAbstractListModel(parent) { } int FontListModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) { return 0; } return m_fonts.size(); } QVariant FontListModel::data(const QModelIndex &index, int role) const { if (!index.isValid() || index.row() < 0 || index.row() >= m_fonts.size()) { return QVariant(); } const FontEntry &font = m_fonts.at(index.row()); switch (role) { case NameRole: return font.name; case TextRole: return font.text; case SourceRole: return font.source; case BaseWidthRole: return font.baseWidth; case PixelSizeRole: return font.pixelSize; case LowResolutionRole: return font.lowResolutionFont; case IsSystemRole: return font.isSystemFont; case FamilyRole: return font.family; case FallbackNameRole: return font.fallbackName; default: return QVariant(); } } QHash FontListModel::roleNames() const { QHash roles; roles[NameRole] = "name"; roles[TextRole] = "text"; roles[SourceRole] = "source"; roles[BaseWidthRole] = "baseWidth"; roles[PixelSizeRole] = "pixelSize"; roles[LowResolutionRole] = "lowResolutionFont"; roles[IsSystemRole] = "isSystemFont"; roles[FamilyRole] = "family"; roles[FallbackNameRole] = "fallbackName"; return roles; } void FontListModel::setFonts(const QVector &fonts) { beginResetModel(); m_fonts = fonts; endResetModel(); emit countChanged(); } const QVector &FontListModel::fonts() const { return m_fonts; } QVariantMap FontListModel::get(int index) const { QVariantMap map; if (index < 0 || index >= m_fonts.size()) { return map; } const FontEntry &font = m_fonts.at(index); map.insert("name", font.name); map.insert("text", font.text); map.insert("source", font.source); map.insert("baseWidth", font.baseWidth); map.insert("pixelSize", font.pixelSize); map.insert("lowResolutionFont", font.lowResolutionFont); map.insert("isSystemFont", font.isSystemFont); map.insert("family", font.family); map.insert("fallbackName", font.fallbackName); return map; } ================================================ FILE: app/fontlistmodel.h ================================================ #ifndef FONTLISTMODEL_H #define FONTLISTMODEL_H #include #include #include #include #include struct FontEntry { QString name; QString text; QString source; qreal baseWidth = 1.0; int pixelSize = 0; bool lowResolutionFont = false; bool isSystemFont = false; QString family; QString fallbackName; }; class FontListModel : public QAbstractListModel { Q_OBJECT Q_PROPERTY(int count READ rowCount NOTIFY countChanged) public: explicit FontListModel(QObject *parent = nullptr); enum Roles { NameRole = Qt::UserRole + 1, TextRole, SourceRole, BaseWidthRole, PixelSizeRole, LowResolutionRole, IsSystemRole, FamilyRole, FallbackNameRole }; int rowCount(const QModelIndex &parent = QModelIndex()) const override; QVariant data(const QModelIndex &index, int role) const override; QHash roleNames() const override; void setFonts(const QVector &fonts); const QVector &fonts() const; Q_INVOKABLE QVariantMap get(int index) const; signals: void countChanged(); private: QVector m_fonts; }; #endif // FONTLISTMODEL_H ================================================ FILE: app/fontmanager.cpp ================================================ #include "fontmanager.h" #include #include #include #include #include namespace { constexpr int kModernRasterization = 4; constexpr int kBaseFontPixelHeight = 32; constexpr int kSystemFontPixelSize = 32; } FontManager::FontManager(QObject *parent) : QObject(parent) , m_fontListModel(this) , m_filteredFontListModel(this) { populateBundledFonts(); populateSystemFonts(); m_fontListModel.setFonts(m_allFonts); updateFilteredFonts(); updateComputedFont(); } QStringList FontManager::retrieveMonospaceFonts() { QStringList result; QFontDatabase fontDatabase; const QStringList fontFamilies = fontDatabase.families(); for (const QString &fontFamily : fontFamilies) { QFont font(fontFamily); if (fontDatabase.isFixedPitch(font.family())) { result.append(fontFamily); } } return result; } void FontManager::refresh() { updateFilteredFonts(); updateComputedFont(); } FontListModel *FontManager::fontList() { return &m_fontListModel; } FontListModel *FontManager::filteredFontList() { return &m_filteredFontListModel; } int FontManager::fontSource() const { return m_fontSource; } void FontManager::setFontSource(int fontSource) { if (m_fontSource == fontSource) { return; } m_fontSource = fontSource; emit fontSourceChanged(); updateFilteredFonts(); updateComputedFont(); } int FontManager::rasterization() const { return m_rasterization; } void FontManager::setRasterization(int rasterization) { if (m_rasterization == rasterization) { return; } m_rasterization = rasterization; emit rasterizationChanged(); updateFilteredFonts(); updateComputedFont(); } QString FontManager::fontName() const { return m_fontName; } void FontManager::setFontName(const QString &fontName) { if (m_fontName == fontName) { return; } m_fontName = fontName; emit fontNameChanged(); updateFilteredFonts(); updateComputedFont(); } qreal FontManager::fontScaling() const { return m_fontScaling; } void FontManager::setFontScaling(qreal fontScaling) { if (qFuzzyCompare(m_fontScaling, fontScaling)) { return; } m_fontScaling = fontScaling; emit fontScalingChanged(); updateComputedFont(); } qreal FontManager::fontWidth() const { return m_fontWidth; } void FontManager::setFontWidth(qreal fontWidth) { if (qFuzzyCompare(m_fontWidth, fontWidth)) { return; } m_fontWidth = fontWidth; emit fontWidthChanged(); updateComputedFont(); } qreal FontManager::lineSpacing() const { return m_lineSpacing; } void FontManager::setLineSpacing(qreal lineSpacing) { if (qFuzzyCompare(m_lineSpacing, lineSpacing)) { return; } m_lineSpacing = lineSpacing; emit lineSpacingChanged(); updateComputedFont(); } qreal FontManager::baseFontScaling() const { return m_baseFontScaling; } void FontManager::setBaseFontScaling(qreal baseFontScaling) { if (qFuzzyCompare(m_baseFontScaling, baseFontScaling)) { return; } m_baseFontScaling = baseFontScaling; emit baseFontScalingChanged(); updateComputedFont(); } bool FontManager::lowResolutionFont() const { return m_lowResolutionFont; } void FontManager::setFontSubstitutions(const QString &family, const QStringList &substitutes) { if (family.isEmpty()) { return; } QFont::removeSubstitutions(family); if (substitutes.isEmpty()) { return; } QFont::insertSubstitutions(family, substitutes); } void FontManager::removeFontSubstitution(const QString &family) { if (family.isEmpty()) { return; } QFont::removeSubstitutions(family); } void FontManager::populateBundledFonts() { m_allFonts.clear(); addBundledFont( "TERMINESS_SCALED", "Terminess", ":/fonts/terminus/TerminessNerdFontMono-Regular.ttf", 1.0, 12, true); addBundledFont( "BIGBLUE_TERMINAL_SCALED", "BigBlue Terminal", ":/fonts/bigblue-terminal/BigBlueTerm437NerdFontMono-Regular.ttf", 1.0, 12, true); addBundledFont( "EXCELSIOR_SCALED", "Fixedsys Excelsior", ":/fonts/fixedsys-excelsior/FSEX301-L2.ttf", 1.0, 16, true, "UNSCII_16_SCALED"); addBundledFont( "GREYBEARD_SCALED", "Greybeard", ":/fonts/greybeard/Greybeard-16px.ttf", 1.0, 16, true, "UNSCII_16_SCALED"); addBundledFont( "COMMODORE_PET_SCALED", "Commodore PET", ":/fonts/pet-me/PetMe.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "GOHU_11_SCALED", "Gohu 11", ":/fonts/gohu/GohuFont11NerdFontMono-Regular.ttf", 1.0, 11, true); addBundledFont( "COZETTE_SCALED", "Cozette", ":/fonts/cozette/CozetteVector.ttf", 1.0, 13, true); addBundledFont( "UNSCII_8_SCALED", "Unscii 8", ":/fonts/unscii/unscii-8.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "UNSCII_8_THIN_SCALED", "Unscii 8 Thin", ":/fonts/unscii/unscii-8-thin.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "UNSCII_16_SCALED", "Unscii 16", ":/fonts/unscii/unscii-16-full.ttf", 1.0, 16, true, "UNSCII_16_SCALED"); addBundledFont( "APPLE_II_SCALED", "Apple ][", ":/fonts/apple2/PrintChar21.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "ATARI_400_SCALED", "Atari 400-800", ":/fonts/atari-400-800/AtariClassic-Regular.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "COMMODORE_64_SCALED", "Commodore 64", ":/fonts/pet-me/PetMe64.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "IBM_EGA_8x8", "IBM EGA 8x8", ":/fonts/oldschool-pc-fonts/PxPlus_IBM_EGA_8x8.ttf", 0.5, 8, true, "UNSCII_8_SCALED"); addBundledFont( "IBM_VGA_8x16", "IBM VGA 8x16", ":/fonts/oldschool-pc-fonts/PxPlus_IBM_VGA_8x16.ttf", 1.0, 16, true, "UNSCII_16_SCALED"); addBundledFont( "TERMINESS", "Terminess", ":/fonts/terminus/TerminessNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "HACK", "Hack", ":/fonts/hack/HackNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "FIRA_CODE", "Fira Code", ":/fonts/fira-code/FiraCodeNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "IOSEVKA", "Iosevka", ":/fonts/iosevka/IosevkaTermNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "JETBRAINS_MONO", "JetBrains Mono", ":/fonts/jetbrains-mono/JetBrainsMonoNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "IBM_3278", "IBM 3278", ":/fonts/ibm-3278/3270NerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "SOURCE_CODE_PRO", "Source Code Pro", ":/fonts/source-code-pro/SauceCodeProNerdFontMono-Regular.ttf", 1.0, 32, false); addBundledFont( "DEPARTURE_MONO_SCALED", "Departure Mono", ":/fonts/departure-mono/DepartureMonoNerdFontMono-Regular.otf", 1.0, 11, true); addBundledFont( "OPENDYSLEXIC", "OpenDyslexic", ":/fonts/opendyslexic/OpenDyslexicMNerdFontMono-Regular.otf", 1.0, 32, false); } void FontManager::addBundledFont(const QString &name, const QString &text, const QString &source, qreal baseWidth, int pixelSize, bool lowResolutionFont, const QString &fallbackName) { FontEntry entry; entry.name = name; entry.text = text; entry.source = source; entry.pixelSize = pixelSize; entry.lowResolutionFont = lowResolutionFont; entry.isSystemFont = false; entry.fallbackName = fallbackName; entry.family = resolveFontFamily(source); entry.baseWidth = lowResolutionFont ? computeBaseWidth(entry.family, pixelSize, baseWidth) : baseWidth; m_allFonts.append(entry); } void FontManager::populateSystemFonts() { const QStringList families = retrieveMonospaceFonts(); for (const QString &family : families) { if (m_bundledFamilies.contains(family)) { continue; } FontEntry entry; entry.name = family; entry.text = family; entry.source = QString(); entry.baseWidth = 1.0; entry.pixelSize = kSystemFontPixelSize; entry.lowResolutionFont = false; entry.isSystemFont = true; entry.family = family; m_allFonts.append(entry); } } void FontManager::updateFilteredFonts() { QVector filtered; bool fontNameFound = false; const bool modernMode = (m_rasterization == kModernRasterization); for (const FontEntry &font : m_allFonts) { const bool isBundled = !font.isSystemFont; const bool matchesSource = (m_fontSource == 0 && isBundled) || (m_fontSource == 1 && font.isSystemFont); if (!matchesSource) { continue; } const bool matchesRasterization = font.isSystemFont || (modernMode == !font.lowResolutionFont); if (!matchesRasterization) { continue; } filtered.append(font); if (font.name == m_fontName) { fontNameFound = true; } } if (!fontNameFound && !filtered.isEmpty()) { if (m_fontName != filtered.first().name) { m_fontName = filtered.first().name; emit fontNameChanged(); } } m_filteredFontListModel.setFonts(filtered); emit filteredFontListChanged(); } void FontManager::updateComputedFont() { const FontEntry *font = findFontByName(m_fontName); if (!font) { const QVector &filteredFonts = m_filteredFontListModel.fonts(); if (!filteredFonts.isEmpty()) { font = &filteredFonts.first(); } } if (!font) { return; } const qreal totalFontScaling = m_baseFontScaling * m_fontScaling; const qreal targetPixelHeight = kBaseFontPixelHeight * totalFontScaling; const qreal lineSpacingFactor = m_lineSpacing; const int lineSpacing = qRound(targetPixelHeight * lineSpacingFactor); const int pixelSize = font->lowResolutionFont ? font->pixelSize : static_cast(targetPixelHeight); const qreal nativeLineHeight = font->pixelSize + qRound(font->pixelSize * lineSpacingFactor); const qreal targetLineHeight = targetPixelHeight + lineSpacing; const qreal screenScaling = font->lowResolutionFont ? (nativeLineHeight > 0 ? targetLineHeight / nativeLineHeight : 1.0) : 1.0; const qreal fontWidth = font->baseWidth * m_fontWidth; QString fontFamily = font->family.isEmpty() ? font->name : font->family; QString fallbackFontFamily; if (!font->fallbackName.isEmpty() && font->fallbackName != font->name) { const FontEntry *fallback = findFontByName(font->fallbackName); if (fallback) { fallbackFontFamily = fallback->family.isEmpty() ? fallback->name : fallback->family; } } QStringList fallbackChain; if (!fallbackFontFamily.isEmpty()) { fallbackChain.append(fallbackFontFamily); } #if defined(Q_OS_MAC) fallbackChain.append(QStringLiteral("Menlo")); #else fallbackChain.append(QStringLiteral("Monospace")); #endif setFontSubstitutions(fontFamily, fallbackChain); if (m_lowResolutionFont != font->lowResolutionFont) { m_lowResolutionFont = font->lowResolutionFont; emit lowResolutionFontChanged(); } emit terminalFontChanged(fontFamily, pixelSize, lineSpacing, screenScaling, fontWidth, fallbackFontFamily, font->lowResolutionFont); } const FontEntry *FontManager::findFontByName(const QString &name) const { for (const FontEntry &font : m_allFonts) { if (font.name == name) { return &font; } } return nullptr; } QString FontManager::resolveFontFamily(const QString &sourcePath) { const auto cached = m_loadedFamilies.constFind(sourcePath); if (cached != m_loadedFamilies.constEnd()) { return cached.value(); } const int fontId = QFontDatabase::addApplicationFont(sourcePath); QString family; if (fontId != -1) { const QStringList families = QFontDatabase::applicationFontFamilies(fontId); if (!families.isEmpty()) { family = families.first(); } } if (!family.isEmpty()) { m_bundledFamilies.insert(family); } m_loadedFamilies.insert(sourcePath, family); return family; } qreal FontManager::computeBaseWidth(const QString &family, int pixelSize, qreal fallbackWidth) const { if (family.isEmpty()) { return fallbackWidth; } QFont font(family); font.setPixelSize(pixelSize); QFontMetricsF metrics(font); const qreal glyphWidth = metrics.horizontalAdvance(QLatin1String("M")); const qreal glyphHeight = metrics.height(); if (glyphWidth <= 0.0 || glyphHeight <= 0.0) { return fallbackWidth; } const qreal targetRatio = 0.5; qreal computedWidth = (targetRatio * glyphHeight) / glyphWidth; return qBound(0.25, computedWidth, 2.0); } ================================================ FILE: app/fontmanager.h ================================================ #ifndef FONTMANAGER_H #define FONTMANAGER_H #include #include #include #include #include "fontlistmodel.h" class FontManager : public QObject { Q_OBJECT Q_PROPERTY(FontListModel *fontList READ fontList CONSTANT) Q_PROPERTY(FontListModel *filteredFontList READ filteredFontList NOTIFY filteredFontListChanged) Q_PROPERTY(int fontSource READ fontSource WRITE setFontSource NOTIFY fontSourceChanged) Q_PROPERTY(int rasterization READ rasterization WRITE setRasterization NOTIFY rasterizationChanged) Q_PROPERTY(QString fontName READ fontName WRITE setFontName NOTIFY fontNameChanged) Q_PROPERTY(qreal fontScaling READ fontScaling WRITE setFontScaling NOTIFY fontScalingChanged) Q_PROPERTY(qreal fontWidth READ fontWidth WRITE setFontWidth NOTIFY fontWidthChanged) Q_PROPERTY(qreal lineSpacing READ lineSpacing WRITE setLineSpacing NOTIFY lineSpacingChanged) Q_PROPERTY(qreal baseFontScaling READ baseFontScaling WRITE setBaseFontScaling NOTIFY baseFontScalingChanged) Q_PROPERTY(bool lowResolutionFont READ lowResolutionFont NOTIFY lowResolutionFontChanged) public: explicit FontManager(QObject *parent = nullptr); Q_INVOKABLE void refresh(); FontListModel *fontList(); FontListModel *filteredFontList(); int fontSource() const; void setFontSource(int fontSource); int rasterization() const; void setRasterization(int rasterization); QString fontName() const; void setFontName(const QString &fontName); qreal fontScaling() const; void setFontScaling(qreal fontScaling); qreal fontWidth() const; void setFontWidth(qreal fontWidth); qreal lineSpacing() const; void setLineSpacing(qreal lineSpacing); qreal baseFontScaling() const; void setBaseFontScaling(qreal baseFontScaling); bool lowResolutionFont() const; signals: void fontSourceChanged(); void rasterizationChanged(); void fontNameChanged(); void fontScalingChanged(); void fontWidthChanged(); void lineSpacingChanged(); void baseFontScalingChanged(); void lowResolutionFontChanged(); void filteredFontListChanged(); void terminalFontChanged(QString fontFamily, int pixelSize, int lineSpacing, qreal screenScaling, qreal fontWidth, QString fallbackFontFamily, bool lowResolutionFont); private: QStringList retrieveMonospaceFonts(); void populateBundledFonts(); void populateSystemFonts(); void addBundledFont(const QString &name, const QString &text, const QString &source, qreal baseWidth, int pixelSize, bool lowResolutionFont, const QString &fallbackName = QString()); void setFontSubstitutions(const QString &family, const QStringList &substitutes); void removeFontSubstitution(const QString &family); void updateFilteredFonts(); void updateComputedFont(); const FontEntry *findFontByName(const QString &name) const; QString resolveFontFamily(const QString &sourcePath); qreal computeBaseWidth(const QString &family, int pixelSize, qreal fallbackWidth) const; FontListModel m_fontListModel; FontListModel m_filteredFontListModel; QVector m_allFonts; int m_fontSource = 0; int m_rasterization = 0; QString m_fontName = QStringLiteral("TERMINESS_SCALED"); qreal m_fontScaling = 1.0; qreal m_fontWidth = 1.0; qreal m_lineSpacing = 0.1; qreal m_baseFontScaling = 0.75; bool m_lowResolutionFont = false; QHash m_loadedFamilies; QSet m_bundledFamilies; }; #endif // FONTMANAGER_H ================================================ FILE: app/main.cpp ================================================ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(Q_OS_MAC) #include #include #include #endif QString getNamedArgument(QStringList args, QString name, QString defaultName) { int index = args.indexOf(name); return (index != -1) ? args[index + 1] : QString(defaultName); } QString getNamedArgument(QStringList args, QString name) { return getNamedArgument(args, name, ""); } int main(int argc, char *argv[]) { // Some environmental variable are necessary on certain platforms. // Disable Connections slot warnings QLoggingCategory::setFilterRules("qt.qml.connections.warning=false"); QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::Round); // #if defined (Q_OS_LINUX) // setenv("QSG_RENDER_LOOP", "threaded", 0); // #endif #if defined(Q_OS_MAC) // This allows UTF-8 characters usage in OSX. setenv("LC_CTYPE", "UTF-8", 1); // Ensure key repeat works for letter keys (disable macOS press-and-hold for this app). CFPreferencesSetAppValue(CFSTR("ApplePressAndHoldEnabled"), kCFBooleanFalse, kCFPreferencesCurrentApplication); CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); // Qt6 macOS default look is still lacking, so let's force Fusion for now QQuickStyle::setStyle(QStringLiteral("Fusion")); #endif if (argc>1 && (!strcmp(argv[1],"-h") || !strcmp(argv[1],"--help"))) { QTextStream cout(stdout, QIODevice::WriteOnly); cout << "Usage: " << argv[0] << " [--default-settings] [--workdir ] [--program ] [-p|--profile ] [--fullscreen] [-h|--help]" << Qt::endl; cout << " --default-settings Run cool-retro-term with the default settings" << Qt::endl; cout << " --workdir Change working directory to 'dir'" << Qt::endl; cout << " -e Command to execute. This option will catch all following arguments, so use it as the last option." << Qt::endl; cout << " --fullscreen Run cool-retro-term in fullscreen." << Qt::endl; cout << " -p|--profile Run cool-retro-term with the given profile." << Qt::endl; cout << " -h|--help Print this help." << Qt::endl; cout << " --verbose Print additional information such as profiles and settings." << Qt::endl; return 0; } QString appVersion(QStringLiteral(APP_VERSION)); if (argc>1 && (!strcmp(argv[1],"-v") || !strcmp(argv[1],"--version"))) { QTextStream cout(stdout, QIODevice::WriteOnly); cout << "cool-retro-term " << appVersion << Qt::endl; return 0; } QApplication app(argc, argv); app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta, true); app.setApplicationName(QStringLiteral("cool-retro-term")); app.setOrganizationName(QStringLiteral("cool-retro-term")); app.setOrganizationDomain(QStringLiteral("cool-retro-term")); app.setApplicationVersion(appVersion); KDSingleApplication singleApp(QStringLiteral("cool-retro-term")); if (!singleApp.isPrimaryInstance()) { if (singleApp.sendMessage("new-window")) return 0; qWarning() << "KDSingleApplication: primary not reachable, continuing as independent instance."; } QQmlApplicationEngine engine; FileIO fileIO; qmlRegisterType("CoolRetroTerm", 1, 0, "FontManager"); qmlRegisterUncreatableType("CoolRetroTerm", 1, 0, "FontListModel", "FontListModel is created by FontManager"); #if !defined(Q_OS_MAC) app.setWindowIcon(QIcon::fromTheme("cool-retro-term", QIcon(":../icons/32x32/cool-retro-term.png"))); #if defined(Q_OS_LINUX) QGuiApplication::setDesktopFileName(QStringLiteral("cool-retro-term")); #endif #else app.setWindowIcon(QIcon(":../icons/32x32/cool-retro-term.png")); #endif // Manage command line arguments from the cpp side QStringList args = app.arguments(); // Manage default command QStringList cmdList; if (args.contains("-e")) { cmdList << args.mid(args.indexOf("-e") + 1); } QVariant command(cmdList.empty() ? QVariant() : cmdList[0]); QVariant commandArgs(cmdList.size() <= 1 ? QVariant() : QVariant(cmdList.mid(1))); engine.rootContext()->setContextProperty("appVersion", appVersion); engine.rootContext()->setContextProperty("defaultCmd", command); engine.rootContext()->setContextProperty("defaultCmdArgs", commandArgs); engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", QDir::currentPath())); engine.rootContext()->setContextProperty("fileIO", &fileIO); // Manage import paths for Linux and OSX. QStringList importPathList = engine.importPathList(); importPathList.append(QCoreApplication::applicationDirPath() + "/qmltermwidget"); importPathList.append(QCoreApplication::applicationDirPath() + "/../PlugIns"); importPathList.append(QCoreApplication::applicationDirPath() + "/../../../qmltermwidget"); engine.setImportPathList(importPathList); engine.load(QUrl(QStringLiteral ("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) { qDebug() << "Cannot load QML interface"; return EXIT_FAILURE; } // Quit the application when the engine closes. QObject::connect((QObject*) &engine, SIGNAL(quit()), (QObject*) &app, SLOT(quit())); auto requestNewWindow = [&engine]() { if (engine.rootObjects().isEmpty()) return; QObject *rootObject = engine.rootObjects().constFirst(); QMetaObject::invokeMethod(rootObject, "createWindow", Qt::QueuedConnection); }; QObject::connect(&singleApp, &KDSingleApplication::messageReceived, &app, [&requestNewWindow](const QByteArray &message) { if (message.isEmpty() || message == QByteArray("new-window")) requestNewWindow(); }); #if defined(Q_OS_MAC) QMenu *dockMenu = new QMenu(nullptr); dockMenu->addAction(QObject::tr("New Window"), [&requestNewWindow]() { requestNewWindow(); }); dockMenu->setAsDockMenu(); #endif return app.exec(); } ================================================ FILE: app/qml/AboutDialog.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.1 import QtQuick.Window 2.0 ApplicationWindow { id: dialogwindow title: qsTr("About") width: 600 height: 400 ColumnLayout { anchors.fill: parent anchors.margins: 15 spacing: 15 Text { Layout.alignment: Qt.AlignHCenter text: "cool-retro-term" color: palette.text font { bold: true pointSize: 18 } } Loader { id: mainContent Layout.fillHeight: true Layout.fillWidth: true states: [ State { name: "Default" PropertyChanges { target: mainContent sourceComponent: defaultComponent } }, State { name: "License" PropertyChanges { target: mainContent sourceComponent: licenseComponent } } ] Component.onCompleted: mainContent.state = "Default" } Item { Layout.fillWidth: true height: childrenRect.height Button { anchors.left: parent.left text: qsTr("License") onClicked: { mainContent.state == "Default" ? mainContent.state = "License" : mainContent.state = "Default" } } Button { anchors.right: parent.right text: qsTr("Close") onClicked: dialogwindow.close() } } } // MAIN COMPONENTS //////////////////////////////////////////////////////// Component { id: defaultComponent ColumnLayout { anchors.fill: parent spacing: 10 Image { Layout.fillWidth: true Layout.fillHeight: true Layout.alignment: Qt.AlignHCenter fillMode: Image.PreserveAspectFit source: "images/crt256.png" smooth: true } Text { Layout.alignment: Qt.AlignCenter horizontalAlignment: Text.AlignHCenter color: palette.text text: appSettings.version + "\n" + qsTr( "Author: ") + "Filippo Scognamiglio\n" + qsTr( "Email: ") + "flscogna@gmail.com\n" + qsTr( "Source: ") + "https://github.com/Swordfish90/cool-retro-term\n" } } } Component { id: licenseComponent ScrollView { anchors.fill: parent clip: true TextArea { readOnly: true wrapMode: TextEdit.Wrap color: palette.text text: "Copyright (c) 2013-2025 Filippo Scognamiglio \n\n" + "https://github.com/Swordfish90/cool-retro-term\n\n" + "cool-retro-term is free software: you can redistribute it and/or modify " + "it under the terms of the GNU General Public License as published by " + "the Free Software Foundation, either version 3 of the License, or " + "(at your option) any later version.\n\n" + "This program is distributed in the hope that it will be useful, " + "but WITHOUT ANY WARRANTY; without even the implied warranty of " + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " + "GNU General Public License for more details.\n\n" + "You should have received a copy of the GNU General Public License " + "along with this program. If not, see ." } } } } ================================================ FILE: app/qml/ApplicationSettings.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import CoolRetroTerm 1.0 import "utils.js" as Utils QtObject { readonly property string version: appVersion readonly property int profileVersion: 2 // STATIC CONSTANTS //////////////////////////////////////////////////////// readonly property real screenCurvatureSize: 0.6 readonly property real minimumFontScaling: 0.25 readonly property real maximumFontScaling: 2.50 readonly property int defaultMargin: 16 readonly property real minBurnInFadeTime: 0.16 readonly property real maxBurnInFadeTime: 1.6 property bool isMacOS: Qt.platform.os === "osx" // GENERAL SETTINGS /////////////////////////////////////////////////////// property bool showMenubar: false property bool showTerminalSize: true property real windowScaling: 1.0 property int effectsFrameSkip: 3 property bool verbose: false property real bloomQuality: 0.5 property real burnInQuality: 0.5 property bool blinkingCursor: false // PROFILE SETTINGS /////////////////////////////////////////////////////// property real windowOpacity: 1.0 property real ambientLight: 0.2 property real contrast: 0.80 property real brightness: 0.5 property bool useCustomCommand: false property string customCommand: "" property string _backgroundColor: "#000000" property string _fontColor: "#ff8100" property string _frameColor: "#ffffff" property string saturatedColor: Utils.mix(Utils.strToColor(_fontColor), Utils.strToColor("#FFFFFF"), (saturationColor * 0.5)) property color fontColor: Utils.mix(Utils.strToColor(_backgroundColor), Utils.strToColor(saturatedColor), (0.7 + (contrast * 0.3))) property color backgroundColor: Utils.mix(Utils.strToColor(saturatedColor), Utils.strToColor(_backgroundColor), (0.7 + (contrast * 0.3))) property color frameColor: Utils.strToColor(_frameColor) property real staticNoise: 0.12 property real screenCurvature: 0.3 property real glowingLine: 0.2 property real burnIn: 0.25 property real bloom: 0.55 property real chromaColor: 0.25 property real saturationColor: 0.25 property real jitter: 0.2 property real horizontalSync: 0.08 property real flickering: 0.1 property real rgbShift: 0.0 property real _frameShininess: 0.2 property real frameShininess: _frameShininess * 0.5 property real _frameSize: 0.2 property real frameSize: _frameSize * 0.05 property real _screenRadius: 0.2 property real screenRadius: Utils.lint(4.0, 120.0, _screenRadius) property real _margin: 0.5 property real margin: Utils.lint(1.0, 40.0, _margin) + (1.0 - Math.SQRT1_2) * screenRadius readonly property bool frameEnabled: ambientLight > 0 || _frameSize > 0 || screenCurvature > 0 readonly property int no_rasterization: 0 readonly property int scanline_rasterization: 1 readonly property int pixel_rasterization: 2 readonly property int subpixel_rasterization: 3 readonly property int modern_rasterization: 4 property alias rasterization: fontManager.rasterization readonly property int bundled_fonts: 0 readonly property int system_fonts: 1 property alias fontSource: fontManager.fontSource // FONTS ////////////////////////////////////////////////////////////////// readonly property real baseFontScaling: 0.75 property alias fontScaling: fontManager.fontScaling property real totalFontScaling: baseFontScaling * fontScaling property alias fontWidth: fontManager.fontWidth property alias lineSpacing: fontManager.lineSpacing property alias lowResolutionFont: fontManager.lowResolutionFont property alias fontName: fontManager.fontName property alias filteredFontList: fontManager.filteredFontList property FontManager fontManager: FontManager { id: fontManager baseFontScaling: baseFontScaling } signal initializedSettings function incrementScaling() { fontScaling = Math.min(fontScaling + 0.05, maximumFontScaling) } function decrementScaling() { fontScaling = Math.max(fontScaling - 0.05, minimumFontScaling) } function close() { storeSettings() storeCustomProfiles() Qt.quit() } property Storage storage: Storage {} function stringify(obj) { var replacer = function (key, val) { return val.toFixed ? Number(val.toFixed(4)) : val } return JSON.stringify(obj, replacer, 2) } function composeSettingsString() { var settings = { "effectsFrameSkip": effectsFrameSkip, "windowScaling": windowScaling, "showTerminalSize": showTerminalSize, "fontScaling": fontScaling, "showMenubar": showMenubar, "bloomQuality": bloomQuality, "burnInQuality": burnInQuality, "useCustomCommand": useCustomCommand, "customCommand": customCommand } return stringify(settings) } function composeProfileObject() { var profile = { "backgroundColor": _backgroundColor, "fontColor": _fontColor, "flickering": flickering, "horizontalSync": horizontalSync, "staticNoise": staticNoise, "chromaColor": chromaColor, "saturationColor": saturationColor, "screenCurvature": screenCurvature, "glowingLine": glowingLine, "burnIn": burnIn, "bloom": bloom, "rasterization": rasterization, "jitter": jitter, "rgbShift": rgbShift, "brightness": brightness, "contrast": contrast, "ambientLight": ambientLight, "windowOpacity": windowOpacity, "fontName": fontName, "fontSource": fontSource, "fontWidth": fontWidth, "margin": _margin, "blinkingCursor": blinkingCursor, "frameSize": _frameSize, "screenRadius": _screenRadius, "frameColor": _frameColor, "frameShininess": _frameShininess } return profile } function composeProfileString() { return stringify(composeProfileObject()) } function loadSettings() { var settingsString = storage.getSetting("_CURRENT_SETTINGS") var profileString = storage.getSetting("_CURRENT_PROFILE") if (!settingsString) return if (!profileString) return loadSettingsString(settingsString) loadProfileString(profileString) if (verbose) console.log("Loading settings: " + settingsString + profileString) } function storeSettings() { var settingsString = composeSettingsString() var profileString = composeProfileString() storage.setSetting("_CURRENT_SETTINGS", settingsString) storage.setSetting("_CURRENT_PROFILE", profileString) if (verbose) { console.log("Storing settings: " + settingsString) console.log("Storing profile: " + profileString) } } function loadSettingsString(settingsString) { var settings = JSON.parse(settingsString) showTerminalSize = settings.showTerminalSize !== undefined ? settings.showTerminalSize : showTerminalSize effectsFrameSkip = settings.effectsFrameSkip !== undefined ? settings.effectsFrameSkip : effectsFrameSkip windowScaling = settings.windowScaling !== undefined ? settings.windowScaling : windowScaling fontScaling = settings.fontScaling !== undefined ? settings.fontScaling : fontScaling showMenubar = settings.showMenubar !== undefined ? settings.showMenubar : showMenubar bloomQuality = settings.bloomQuality !== undefined ? settings.bloomQuality : bloomQuality burnInQuality = settings.burnInQuality !== undefined ? settings.burnInQuality : burnInQuality useCustomCommand = settings.useCustomCommand !== undefined ? settings.useCustomCommand : useCustomCommand customCommand = settings.customCommand !== undefined ? settings.customCommand : customCommand } function loadProfileString(profileString) { var settings = JSON.parse(profileString) _backgroundColor = settings.backgroundColor !== undefined ? settings.backgroundColor : _backgroundColor _fontColor = settings.fontColor !== undefined ? settings.fontColor : _fontColor horizontalSync = settings.horizontalSync !== undefined ? settings.horizontalSync : horizontalSync flickering = settings.flickering !== undefined ? settings.flickering : flickering staticNoise = settings.staticNoise !== undefined ? settings.staticNoise : staticNoise chromaColor = settings.chromaColor !== undefined ? settings.chromaColor : chromaColor saturationColor = settings.saturationColor !== undefined ? settings.saturationColor : saturationColor screenCurvature = settings.screenCurvature !== undefined ? settings.screenCurvature : screenCurvature glowingLine = settings.glowingLine !== undefined ? settings.glowingLine : glowingLine burnIn = settings.burnIn !== undefined ? settings.burnIn : burnIn bloom = settings.bloom !== undefined ? settings.bloom : bloom rasterization = settings.rasterization !== undefined ? settings.rasterization : rasterization jitter = settings.jitter !== undefined ? settings.jitter : jitter rgbShift = settings.rgbShift !== undefined ? settings.rgbShift : rgbShift ambientLight = settings.ambientLight !== undefined ? settings.ambientLight : ambientLight contrast = settings.contrast !== undefined ? settings.contrast : contrast brightness = settings.brightness !== undefined ? settings.brightness : brightness windowOpacity = settings.windowOpacity !== undefined ? settings.windowOpacity : windowOpacity fontName = settings.fontName !== undefined ? settings.fontName : fontName fontSource = settings.fontSource !== undefined ? settings.fontSource : fontSource fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth lineSpacing = settings.lineSpacing !== undefined ? settings.lineSpacing : lineSpacing _margin = settings.margin !== undefined ? settings.margin : _margin _frameSize = settings.frameSize !== undefined ? settings.frameSize : _frameSize _screenRadius = settings.screenRadius !== undefined ? settings.screenRadius : _screenRadius _frameColor = settings.frameColor !== undefined ? settings.frameColor : _frameColor _frameShininess = settings.frameShininess !== undefined ? settings.frameShininess : _frameShininess blinkingCursor = settings.blinkingCursor !== undefined ? settings.blinkingCursor : blinkingCursor } function storeCustomProfiles() { storage.setSetting("_CUSTOM_PROFILES", composeCustomProfilesString()) } function loadCustomProfiles() { var customProfileString = storage.getSetting("_CUSTOM_PROFILES") if (customProfileString === undefined) customProfileString = "[]" loadCustomProfilesString(customProfileString) } function loadCustomProfilesString(customProfilesString) { var customProfiles = JSON.parse(customProfilesString) for (var i = 0; i < customProfiles.length; i++) { var profile = customProfiles[i] if (verbose) console.log("Loading custom profile: " + stringify(profile)) profilesList.append(profile) } } function composeCustomProfilesString() { var customProfiles = [] for (var i = 0; i < profilesList.count; i++) { var profile = profilesList.get(i) if (profile.builtin) continue customProfiles.push({ "text": profile.text, "obj_string": profile.obj_string, "builtin": false }) } return stringify(customProfiles) } function loadProfile(index) { var profile = profilesList.get(index) loadProfileString(profile.obj_string) } function appendCustomProfile(name, profileString) { profilesList.append({ "text": name, "obj_string": profileString, "builtin": false }) } // PROFILES /////////////////////////////////////////////////////////////// property ListModel profilesList: ListModel { ListElement { text: "Default Amber" obj_string: '{ "ambientLight": 0.3, "backgroundColor": "#000000", "bloom": 0.6, "brightness": 0.5, "burnIn": 0.3, "chromaColor": 0.2, "contrast": 0.8, "flickering": 0.1, "fontColor": "#ff8100", "fontName": "TERMINESS_SCALED", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.2, "horizontalSync": 0.1, "jitter": 0.2, "rasterization": 0, "rgbShift": 0, "saturationColor": 0.2, "screenCurvature": 0.2, "screenRadius": 0.1, "staticNoise": 0.1, "windowOpacity": 1, "margin": 0.3, "blinkingCursor": false, "frameSize": 0.1, "frameColor": "#cfcfcf", "frameShininess": 0.3 }' builtin: true } ListElement { text: "Monochrome Green" obj_string: '{ "ambientLight": 0.3, "backgroundColor": "#000000", "bloom": 0.5, "brightness": 0.5, "burnIn": 0.3, "chromaColor": 0.0, "contrast": 0.8, "flickering": 0.1, "fontColor": "#0ccc68", "fontName": "DEPARTURE_MONO_SCALED", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.2, "horizontalSync": 0.1, "jitter": 0.2, "rasterization": 0, "rgbShift": 0, "saturationColor": 0.0, "screenCurvature": 0.3, "screenRadius": 0.2, "staticNoise": 0.1, "windowOpacity": 1, "margin": 0.3, "blinkingCursor": false, "frameSize": 0.1, "frameColor": "#d4d4d4", "frameShininess": 0.1 }' builtin: true } ListElement { text: "Deep Blue" obj_string: '{ "ambientLight": 0.0, "backgroundColor": "#000000", "bloom": 0.6, "brightness": 0.5, "burnIn": 0.3, "chromaColor": 1.0, "contrast": 0.8, "flickering": 0.1, "fontColor": "#7fb4ff", "fontName": "BIGBLUE_TERMINAL_SCALED", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.2, "horizontalSync": 0.1, "jitter": 0.2, "rasterization": 0, "rgbShift": 0, "saturationColor": 0.2, "screenCurvature": 0.4, "screenRadius": 0.1, "staticNoise": 0.1, "windowOpacity": 1, "margin": 0.3, "blinkingCursor": false, "frameSize": 0.1, "frameColor": "#ffffff", "frameShininess": 0.9 }' builtin: true } ListElement { text: "Commodore 64" obj_string: '{ "ambientLight": 0.4, "backgroundColor": "#3b3b8f", "bloom": 0.4, "brightness": 0.6, "burnIn": 0.1, "chromaColor": 0.0, "contrast": 0.7, "flickering": 0.1, "fontColor": "#a9a7ff", "fontName": "COMMODORE_64_SCALED", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.1, "horizontalSync": 0.0, "jitter": 0.0, "rasterization": 1, "rgbShift": 0, "saturationColor": 0, "screenCurvature": 0.5, "screenRadius": 0.1, "staticNoise": 0.1, "windowOpacity": 1, "margin": 0.3, "blinkingCursor": false, "frameSize": 0.5, "frameColor": "#999999", "frameShininess": 0.0 }' builtin: true } ListElement { text: "Commodore PET" obj_string: '{ "ambientLight": 0.0, "backgroundColor": "#000000", "bloom": 0.4, "brightness": 0.5, "burnIn": 0.4, "chromaColor": 0, "contrast": 0.8, "flickering": 0.2, "fontColor": "#ffffff", "fontName": "COMMODORE_PET_SCALED", "fontSource": 0, "fontWidth": 1.25, "lineSpacing": 0.1, "glowingLine": 0.3, "horizontalSync": 0.2, "jitter": 0.15, "rasterization": 1, "rgbShift": 0.0, "saturationColor": 0, "screenCurvature": 0.7, "screenRadius": 0.3, "staticNoise": 0.2, "windowOpacity": 1, "margin": 0.2, "blinkingCursor": false, "frameSize": 0.5, "frameColor": "#000000", "frameShininess": 0.6 }' builtin: true } ListElement { text: "Apple ][" obj_string: '{ "ambientLight": 1.0, "backgroundColor": "#001100", "bloom": 0.3, "brightness": 0.5, "burnIn": 0.3, "chromaColor": 0, "contrast": 0.8, "flickering": 0.2, "fontColor": "#4dff6b", "fontName": "APPLE_II_SCALED", "fontSource": 0, "fontWidth": 1.25, "lineSpacing": 0.1, "glowingLine": 0.3, "horizontalSync": 0.2, "jitter": 0.2, "rasterization": 1, "rgbShift": 0.0, "saturationColor": 0, "screenCurvature": 0.5, "screenRadius": 0.3, "staticNoise": 0.2, "windowOpacity": 1, "margin": 0.0, "blinkingCursor": false, "frameSize": 0.2, "frameColor": "#ffffff", "frameShininess": 0.8 }' builtin: true } ListElement { text: "Atari 400" obj_string: '{ "ambientLight": 0.1, "backgroundColor": "#0f1f5a", "bloom": 0.1, "brightness": 0.6, "burnIn": 0.2, "chromaColor": 0, "contrast": 0.9, "flickering": 0.1, "fontColor": "#8ed6ff", "fontName": "ATARI_400_SCALED", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.1, "horizontalSync": 0.0, "jitter": 0.0, "rasterization": 1, "rgbShift": 0.0, "saturationColor": 0, "screenCurvature": 0.4, "screenRadius": 0.2, "staticNoise": 0.1, "windowOpacity": 1, "margin": 0.2, "blinkingCursor": false, "frameSize": 0.4, "frameColor": "#cccccc", "frameShininess": 0.3 }' builtin: true } ListElement { text: "IBM VGA 8x16" obj_string: '{ "ambientLight": 0.2, "backgroundColor": "#000000", "bloom": 0.2, "brightness": 0.6, "burnIn": 0.1, "chromaColor": 0.5, "contrast": 1.0, "flickering": 0.1, "fontColor": "#c0c0c0", "fontName": "IBM_VGA_8x16", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.1, "horizontalSync": 0.0, "jitter": 0.0, "rasterization": 1, "rgbShift": 0.1, "saturationColor": 0, "screenCurvature": 0.3, "screenRadius": 0.1, "staticNoise": 0.0, "windowOpacity": 1, "margin": 0.2, "blinkingCursor": false, "frameSize": 0.1, "frameColor": "#ffffff", "frameShininess": 0.3 }' builtin: true } ListElement { text: "IBM 3278 Reborn" obj_string: '{ "ambientLight": 0.2, "backgroundColor": "#000000", "bloom": 0.2, "brightness": 0.5, "burnIn": 0.5, "chromaColor": 0, "contrast": 0.8, "flickering": 0, "fontColor": "#3cff7a", "fontName": "IBM_3278", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.0, "horizontalSync": 0, "jitter": 0, "rasterization": 4, "rgbShift": 0, "saturationColor": 0, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.0, "windowOpacity": 1, "margin": 0.1, "blinkingCursor": false, "frameSize": 0, "frameColor": "#ffffff", "frameShininess": 0.2 }' builtin: true } ListElement { text: "Neon Cyan" obj_string: '{ "ambientLight": 0.1, "backgroundColor": "#001018", "bloom": 0.6, "brightness": 0.6, "burnIn": 0.1, "chromaColor": 1, "contrast": 0.9, "flickering": 0.1, "fontColor": "#52f7ff", "fontName": "IOSEVKA", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.2, "horizontalSync": 0.0, "jitter": 0.1, "rasterization": 4, "rgbShift": 0.0, "saturationColor": 0.6, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.1, "windowOpacity": 0.8, "margin": 0.1, "blinkingCursor": false, "frameSize": 0, "frameColor": "#c3c3c3", "frameShininess": 0.2 }' builtin: true } ListElement { text: "Ghost Terminal" obj_string: '{ "ambientLight": 0.3, "backgroundColor": "#0b1014", "bloom": 0.3, "brightness": 0.6, "burnIn": 0.2, "chromaColor": 0, "contrast": 0.5, "flickering": 0.0, "fontColor": "#a6b3c0", "fontName": "JETBRAINS_MONO", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.1, "horizontalSync": 0.0, "jitter": 0.0, "rasterization": 4, "rgbShift": 0.0, "saturationColor": 0.0, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.1, "windowOpacity": 0.7, "margin": 0.1, "blinkingCursor": false, "frameSize": 0, "frameColor": "#a7a7a7", "frameShininess": 0.2 }' builtin: true } ListElement { text: "Plasma" obj_string: '{ "ambientLight": 0.1, "backgroundColor": "#070014", "bloom": 0.7, "brightness": 0.6, "burnIn": 0.1, "chromaColor": 1, "contrast": 0.8, "flickering": 0.1, "fontColor": "#ff9bd6", "fontName": "FIRA_CODE", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.2, "horizontalSync": 0.0, "jitter": 0.1, "rasterization": 4, "rgbShift": 0.1, "saturationColor": 0.8, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.1, "windowOpacity": 1.0, "margin": 0.1, "blinkingCursor": false, "frameSize": 0, "frameColor": "#d0d0d0", "frameShininess": 0.2 }' builtin: true } ListElement { text: "Boring" obj_string: '{ "ambientLight": 0.1, "backgroundColor": "#000000", "bloom": 0.5, "brightness": 0.5, "burnIn": 0.05, "chromaColor": 1, "contrast": 0.8, "flickering": 0.0, "fontColor": "#ffffff", "fontName": "JETBRAINS_MONO", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.1, "horizontalSync": 0, "jitter": 0.0, "rasterization": 4, "rgbShift": 0, "saturationColor": 0.0, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.0, "windowOpacity": 1.0, "margin": 0.0, "blinkingCursor": false, "frameSize": 0, "frameColor": "#c0c0c0", "frameShininess": 0.2 }' builtin: true } ListElement { text: "E-Ink" obj_string: '{ "ambientLight": 0.6, "backgroundColor": "#f2f2ec", "bloom": 0.0, "brightness": 1.0, "burnIn": 0.6, "chromaColor": 0, "contrast": 0.5, "flickering": 0.0, "fontColor": "#101010", "fontName": "HACK", "fontSource": 0, "fontWidth": 1, "lineSpacing": 0.1, "glowingLine": 0.0, "horizontalSync": 0.0, "jitter": 0.0, "rasterization": 4, "rgbShift": 0, "saturationColor": 0, "screenCurvature": 0, "screenRadius": 0.0, "staticNoise": 0.0, "windowOpacity": 1, "margin": 0.1, "blinkingCursor": false, "frameSize": 0, "frameColor": "#cdcdcd", "frameShininess": 0.2 }' builtin: true } } function getProfileIndexByName(name) { for (var i = 0; i < profilesList.count; i++) { if (profilesList.get(i).text === name) return i } return -1 } Component.onCompleted: { // Manage the arguments from the QML side. var args = Qt.application.arguments if (args.indexOf("--verbose") !== -1) { verbose = true } if (args.indexOf("--default-settings") === -1) { loadSettings() } loadCustomProfiles() var profileArgPosition = args.indexOf("--profile") if (profileArgPosition !== -1) { var profileIndex = getProfileIndexByName(args[profileArgPosition + 1]) if (profileIndex !== -1) { loadProfile(profileIndex) } else { console.log("Warning: selected profile is not valid; ignoring it") } } initializedSettings() } // VARS /////////////////////////////////////////////////////////////////// property Label _sampleLabel: Label { text: "100%" } property real labelWidth: _sampleLabel.width } ================================================ FILE: app/qml/BurnInEffect.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.0 import "utils.js" as Utils Loader { id: burnInEffect property ShaderEffectSource effectSource: item ? item.source : null property bool resizing: false property real lastUpdate: 0 property real prevLastUpdate: 0 property real burnIn: appSettings.burnIn property real burnInFadeTime: 1 / Utils.lint(_minBurnInFadeTime, _maxBurnInFadeTime, burnIn) property real _minBurnInFadeTime: appSettings.minBurnInFadeTime property real _maxBurnInFadeTime: appSettings.maxBurnInFadeTime active: appSettings.burnIn !== 0 anchors.fill: parent function completelyUpdate() { let newTime = timeManager.time if (newTime > lastUpdate) { prevLastUpdate = lastUpdate lastUpdate = newTime } item.source.scheduleUpdate() } function restartBlurSource() { prevLastUpdate = timeManager.time lastUpdate = prevLastUpdate completelyUpdate() } sourceComponent: Item { property alias source: burnInEffectSource ShaderEffectSource { id: burnInEffectSource anchors.fill: parent sourceItem: burnInShaderEffect live: false recursive: !resizing hideSource: true wrapMode: ShaderEffectSource.ClampToEdge format: ShaderEffectSource.RGBA smooth: true visible: false Connections { target: kterminal onImagePainted: { completelyUpdate() } } // Restart blurred source settings change. Connections { target: appSettings.fontManager onTerminalFontChanged: { burnInEffect.restartBlurSource() } } Connections { target: appSettings onBurnInChanged: { burnInEffect.restartBlurSource() } onRasterizationChanged: { burnInEffect.restartBlurSource() } onBurnInQualityChanged: { burnInEffect.restartBlurSource() } } } ShaderEffect { id: burnInShaderEffect property real time: timeManager.time property variant txt_source: kterminalSource property variant burnInSource: burnInEffectSource property real burnInTime: burnInFadeTime property real burnInLastUpdate: burnInEffect.lastUpdate property real prevLastUpdate: burnInEffect.prevLastUpdate anchors.fill: parent blending: false fragmentShader: "qrc:/shaders/burn_in.frag.qsb" vertexShader: "qrc:/shaders/burn_in.vert.qsb" onStatusChanged: if (log) console.log(log) //Print warning messages } } onWidthChanged: { resizing = true resizeTimer.restart() } onHeightChanged: { resizing = true resizeTimer.restart() } Timer { id: resizeTimer interval: 300 onTriggered: resizing = false } } ================================================ FILE: app/qml/CheckableSlider.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 import "Components" RowLayout { property alias name: check.text property double value property alias min_value: slider.from property alias max_value: slider.to property alias stepSize: slider.stepSize signal newValue(real newValue) id: setting_component Layout.fillWidth: true onValueChanged: { check.checked = !(value == 0) if (check.checked) slider.value = value } CheckBox { id: check implicitWidth: 160 onClicked: { if (!checked) { checked = false slider.enabled = false newValue(0) } else { checked = true newValue(slider.value) slider.enabled = true } } } Slider { id: slider stepSize: parent.stepSize Layout.fillWidth: true onValueChanged: { newValue(value) } } SizedLabel { text: Math.round( ((value - min_value) / (max_value - min_value)) * 100) + "%" } } ================================================ FILE: app/qml/ColorButton.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Dialogs Item { id: rootItem signal colorSelected(color color) property color color property string name ColorDialog { id: colorDialog title: qsTr("Choose a color") modality: Qt.ApplicationModal selectedColor: rootItem.color onSelectedColorChanged: { if (!appSettings.isMacOS && visible) colorSelected(selectedColor) } onAccepted: colorSelected(selectedColor) } Rectangle { anchors.fill: parent radius: 10 color: rootItem.color Rectangle { anchors.fill: parent anchors.margins: parent.height * 0.25 radius: parent.radius color: "white" opacity: 0.5 } Text { anchors.centerIn: parent z: parent.z + 1 text: name + ": " + rootItem.color } } MouseArea { anchors.fill: parent onClicked: colorDialog.open() } } ================================================ FILE: app/qml/Components/SizedLabel.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 // This component is simply a label with a predefined size. // Used to improve alignment. Label { id: textfield Layout.minimumWidth: appSettings.labelWidth width: appSettings.labelWidth } ================================================ FILE: app/qml/InsertNameDialog.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Window 2.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 import QtQuick.Dialogs Window { id: insertnamedialog width: 400 height: 100 modality: Qt.ApplicationModal title: qsTr("Save new profile") property alias profileName: namefield.text signal nameSelected(string name) MessageDialog { id: errorDialog title: qsTr("Error") visible: false function showError(message) { text = message open() } } function validateName(name) { var profile_list = appSettings.profilesList if (name === "") return 1 return 0 } ColumnLayout { anchors.margins: 10 anchors.fill: parent RowLayout { Label { text: qsTr("Name") } TextField { id: namefield Layout.fillWidth: true Component.onCompleted: forceActiveFocus() onAccepted: okbutton.clickAction() } } RowLayout { Layout.alignment: Qt.AlignBottom | Qt.AlignRight Button { id: okbutton text: qsTr("OK") onClicked: clickAction() function clickAction() { var name = namefield.text switch (validateName(name)) { case 1: errorDialog.showError( qsTr("The name you inserted is empty. Please choose a different one.")) break default: nameSelected(name) close() } } } Button { text: qsTr("Cancel") onClicked: close() } } } } ================================================ FILE: app/qml/PreprocessedTerminal.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import QMLTermWidget 2.0 import "menus" import "utils.js" as Utils Item{ id: terminalContainer signal sessionFinished() property size virtualResolution: Qt.size(kterminal.totalWidth, kterminal.totalHeight) property alias mainTerminal: kterminal property ShaderEffectSource mainSource: kterminalSource property BurnInEffect burnInEffect: burnInEffect property real fontWidth: 1.0 property real screenScaling: 1.0 property real scaleTexture: 1.0 property alias title: ksession.title property alias kterminal: kterminal property bool isActive: false property size terminalSize: kterminal.terminalSize property size fontMetrics: kterminal.fontMetrics // Manage copy and paste Connections { target: copyAction onTriggered: { if (terminalContainer.isActive) { kterminal.copyClipboard() } } } Connections { target: pasteAction onTriggered: { if (terminalContainer.isActive) { kterminal.pasteClipboard() } } } //When settings are updated sources need to be redrawn. Connections { target: appSettings onFontScalingChanged: { terminalContainer.updateSources() } onFontWidthChanged: { terminalContainer.updateSources() } } Connections { target: terminalContainer onWidthChanged: { terminalContainer.updateSources() } onHeightChanged: { terminalContainer.updateSources() } } function updateSources() { kterminal.update() } QMLTermWidget { id: kterminal property int textureResolutionScale: appSettings.lowResolutionFont ? Screen.devicePixelRatio : 1 property int margin: appSettings.margin / screenScaling property int totalWidth: Math.floor(parent.width / (screenScaling * fontWidth)) property int totalHeight: Math.floor(parent.height / screenScaling) property int rawWidth: totalWidth - 2 * margin property int rawHeight: totalHeight - 2 * margin textureSize: Qt.size(width / textureResolutionScale, height / textureResolutionScale) width: ensureMultiple(rawWidth, Screen.devicePixelRatio) height: ensureMultiple(rawHeight, Screen.devicePixelRatio) /** Ensure size is a multiple of factor. This is needed for pixel perfect scaling on highdpi screens. */ function ensureMultiple(size, factor) { return Math.round(size / factor) * factor; } fullCursorHeight: true blinkingCursor: appSettings.blinkingCursor colorScheme: "cool-retro-term" session: QMLTermSession { id: ksession onFinished: { terminalContainer.sessionFinished() } } QMLTermScrollbar { id: kterminalScrollbar terminal: kterminal anchors.margins: width * 0.5 width: terminal.fontMetrics.width * 0.75 Rectangle { anchors.fill: parent anchors.topMargin: 1 anchors.bottomMargin: 1 color: "white" opacity: 0.7 } } function handleFontChanged(fontFamily, pixelSize, lineSpacing, screenScaling, fontWidth, fallbackFontFamily, lowResolutionFont) { kterminal.lineSpacing = lineSpacing; kterminal.antialiasText = !lowResolutionFont; kterminal.smooth = !lowResolutionFont; kterminal.enableBold = !lowResolutionFont; kterminal.enableItalic = !lowResolutionFont; kterminal.font = Qt.font({ family: fontFamily, pixelSize: pixelSize }); terminalContainer.fontWidth = fontWidth; terminalContainer.screenScaling = screenScaling; scaleTexture = Math.max(1.0, Math.floor(screenScaling * appSettings.windowScaling)); } Connections { target: appSettings onWindowScalingChanged: { scaleTexture = Math.max(1.0, Math.floor(terminalContainer.screenScaling * appSettings.windowScaling)); } } function startSession() { // Retrieve the variable set in main.cpp if arguments are passed. if (defaultCmd) { ksession.setShellProgram(defaultCmd); ksession.setArgs(defaultCmdArgs); } else if (appSettings.useCustomCommand) { var args = Utils.tokenizeCommandLine(appSettings.customCommand); ksession.setShellProgram(args[0]); ksession.setArgs(args.slice(1)); } else if (!defaultCmd && appSettings.isMacOS) { // OSX Requires the following default parameters for auto login. ksession.setArgs(["-i", "-l"]); } if (workdir) ksession.initialWorkingDirectory = workdir; ksession.startShellProgram(); forceActiveFocus(); } Component.onCompleted: { appSettings.fontManager.terminalFontChanged.connect(handleFontChanged); appSettings.fontManager.refresh() startSession(); } Component.onDestruction: { appSettings.fontManager.terminalFontChanged.disconnect(handleFontChanged); } } Component { id: shortContextMenu ShortContextMenu { } } Component { id: fullContextMenu FullContextMenu { } } Loader { id: menuLoader sourceComponent: (appSettings.isMacOS || (appSettings.showMenubar && !terminalWindow.fullscreen) ? shortContextMenu : fullContextMenu) } property alias contextmenu: menuLoader.item MouseArea { property real margin: appSettings.margin property real frameSize: appSettings.frameSize * terminalWindow.normalizedWindowScale acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton anchors.fill: parent cursorShape: kterminal.terminalUsesMouse ? Qt.ArrowCursor : Qt.IBeamCursor onWheel: function(wheel) { if (wheel.modifiers & Qt.ControlModifier) { wheel.angleDelta.y > 0 ? zoomIn.trigger() : zoomOut.trigger(); } else { var coord = correctDistortion(wheel.x, wheel.y); kterminal.simulateWheel(coord.x, coord.y, wheel.buttons, wheel.modifiers, wheel.angleDelta); } } onDoubleClicked: function(mouse) { var coord = correctDistortion(mouse.x, mouse.y); kterminal.simulateMouseDoubleClick(coord.x, coord.y, mouse.button, mouse.buttons, mouse.modifiers); } onPressed: function(mouse) { kterminal.forceActiveFocus() if ((!kterminal.terminalUsesMouse || mouse.modifiers & Qt.ShiftModifier) && mouse.button == Qt.RightButton) { contextmenu.popup(); } else { var coord = correctDistortion(mouse.x, mouse.y); kterminal.simulateMousePress(coord.x, coord.y, mouse.button, mouse.buttons, mouse.modifiers) } } onReleased: function(mouse) { var coord = correctDistortion(mouse.x, mouse.y); kterminal.simulateMouseRelease(coord.x, coord.y, mouse.button, mouse.buttons, mouse.modifiers); } onPositionChanged: function(mouse) { var coord = correctDistortion(mouse.x, mouse.y); kterminal.simulateMouseMove(coord.x, coord.y, mouse.button, mouse.buttons, mouse.modifiers); } function correctDistortion(x, y) { x = (x - margin) / width; y = (y - margin) / height; x = x * (1 + frameSize * 2) - frameSize; y = y * (1 + frameSize * 2) - frameSize; var cc = Qt.size(0.5 - x, 0.5 - y); var distortion = (cc.height * cc.height + cc.width * cc.width) * appSettings.screenCurvature * appSettings.screenCurvatureSize * terminalWindow.normalizedWindowScale; return Qt.point((x - cc.width * (1+distortion) * distortion) * (kterminal.totalWidth), (y - cc.height * (1+distortion) * distortion) * (kterminal.totalHeight)) } } ShaderEffectSource{ id: kterminalSource sourceItem: kterminal hideSource: true wrapMode: ShaderEffectSource.Repeat visible: false textureSize: Qt.size(kterminal.totalWidth * scaleTexture, kterminal.totalHeight * scaleTexture) sourceRect: Qt.rect(-kterminal.margin, -kterminal.margin, kterminal.totalWidth, kterminal.totalHeight) } Item { id: burnInContainer property int burnInScaling: scaleTexture * appSettings.burnInQuality width: Math.round(appSettings.lowResolutionFont ? kterminal.totalWidth * Math.max(1, burnInScaling) : kterminal.totalWidth * scaleTexture * appSettings.burnInQuality) height: Math.round(appSettings.lowResolutionFont ? kterminal.totalHeight * Math.max(1, burnInScaling) : kterminal.totalHeight * scaleTexture * appSettings.burnInQuality) BurnInEffect { id: burnInEffect } } } ================================================ FILE: app/qml/SettingsAdvancedTab.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 import QtQml 2.0 import "Components" ColumnLayout { GroupBox { Layout.fillWidth: true Layout.fillHeight: true title: qsTr("Miscellaneous") padding: appSettings.defaultMargin ColumnLayout { anchors.fill: parent CheckBox { id: useCustomCommand text: qsTr("Use custom command instead of shell at startup") checked: appSettings.useCustomCommand onCheckedChanged: appSettings.useCustomCommand = checked } TextField { id: customCommand Layout.fillWidth: true text: appSettings.customCommand enabled: useCustomCommand.checked onEditingFinished: appSettings.customCommand = text // Save text even if user forgets to press enter or unfocus function saveSetting() { appSettings.customCommand = text } Component.onCompleted: settings_window.closing.connect( saveSetting) } CheckBox { id: blinkingCursor text: qsTr("Blinking Cursor") checked: appSettings.blinkingCursor onCheckedChanged: appSettings.blinkingCursor = checked } CheckBox { id: showMenubar text: qsTr("Show Menubar") enabled: !appSettings.isMacOS checked: appSettings.showMenubar onCheckedChanged: appSettings.showMenubar = checked } } } GroupBox { title: qsTr("Performance") Layout.fillWidth: true Layout.fillHeight: true padding: appSettings.defaultMargin GridLayout { anchors.fill: parent columns: 4 Label { text: qsTr("Effects FPS") } Slider { Layout.fillWidth: true Layout.columnSpan: 2 id: effectsFpsSlider onValueChanged: appSettings.effectsFrameSkip = Math.round(value) stepSize: 1 enabled: true from: 5 to: 1 value: appSettings.effectsFrameSkip } SizedLabel { text: Math.round(100 / Math.max(1, Math.round(effectsFpsSlider.value))) + "%" } Label { text: qsTr("Texture Quality") } Slider { id: txtslider Layout.fillWidth: true Layout.columnSpan: 2 onValueChanged: appSettings.windowScaling = value stepSize: 0.05 enabled: true from: 0.25 value: appSettings.windowScaling } SizedLabel { text: Math.round(txtslider.value * 100) + "%" } Label { text: qsTr("Bloom Quality") } Slider { Layout.fillWidth: true Layout.columnSpan: 2 id: bloomSlider onValueChanged: appSettings.bloomQuality = value stepSize: 0.05 enabled: true from: 0.25 value: appSettings.bloomQuality } SizedLabel { text: Math.round(bloomSlider.value * 100) + "%" } Label { text: qsTr("BurnIn Quality") } Slider { Layout.fillWidth: true id: burnInSlider Layout.columnSpan: 2 onValueChanged: appSettings.burnInQuality = value stepSize: 0.05 enabled: true from: 0.25 value: appSettings.burnInQuality } SizedLabel { text: Math.round(burnInSlider.value * 100) + "%" } } } } ================================================ FILE: app/qml/SettingsEffectsTab.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true spacing: 2 GroupBox { title: qsTr("Effects") Layout.fillWidth: true Layout.fillHeight: true padding: appSettings.defaultMargin ColumnLayout { anchors.fill: parent CheckableSlider { name: qsTr("Bloom") onNewValue: function(newValue) { appSettings.bloom = newValue } value: appSettings.bloom } CheckableSlider { name: qsTr("BurnIn") onNewValue: function(newValue) { appSettings.burnIn = newValue } value: appSettings.burnIn } CheckableSlider { name: qsTr("Static Noise") onNewValue: function(newValue) { appSettings.staticNoise = newValue } value: appSettings.staticNoise } CheckableSlider { name: qsTr("Jitter") onNewValue: function(newValue) { appSettings.jitter = newValue } value: appSettings.jitter } CheckableSlider { name: qsTr("Glow Line") onNewValue: function(newValue) { appSettings.glowingLine = newValue } value: appSettings.glowingLine } CheckableSlider { name: qsTr("Screen Curvature") onNewValue: function(newValue) { appSettings.screenCurvature = newValue } value: appSettings.screenCurvature } CheckableSlider { name: qsTr("Ambient Light") onNewValue: function(newValue) { appSettings.ambientLight = newValue } value: appSettings.ambientLight enabled: appSettings.framesIndex !== 0 } CheckableSlider { name: qsTr("Flickering") onNewValue: function(newValue) { appSettings.flickering = newValue } value: appSettings.flickering } CheckableSlider { name: qsTr("Horizontal Sync") onNewValue: function(newValue) { appSettings.horizontalSync = newValue } value: appSettings.horizontalSync } CheckableSlider { name: qsTr("RGB Shift") onNewValue: function(newValue) { appSettings.rgbShift = newValue } value: appSettings.rgbShift } CheckableSlider { name: qsTr("Frame Shininess") onNewValue: function(newValue) { appSettings._frameShininess = newValue } value: appSettings._frameShininess } } } } ================================================ FILE: app/qml/SettingsGeneralTab.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.4 import QtQuick.Layouts 1.1 import QtQuick.Dialogs ColumnLayout { GroupBox { Layout.fillWidth: true Layout.fillHeight: true title: qsTr("Profile") padding: appSettings.defaultMargin RowLayout { anchors.fill: parent ListView { id: profilesView Layout.fillWidth: true Layout.fillHeight: true model: appSettings.profilesList clip: true delegate: Rectangle { width: label.width height: label.height color: (index == profilesView.currentIndex) ? palette.highlight : palette.base Label { id: label text: appSettings.profilesList.get(index).text MouseArea { anchors.fill: parent onClicked: profilesView.currentIndex = index onDoubleClicked: appSettings.loadProfile(index) } } } } ColumnLayout { Layout.fillHeight: true Layout.fillWidth: false Button { Layout.fillWidth: true text: qsTr("Save") onClicked: { insertname.profileName = "" insertname.show() } } Button { Layout.fillWidth: true property alias currentIndex: profilesView.currentIndex enabled: currentIndex >= 0 text: qsTr("Load") onClicked: { var index = currentIndex if (index >= 0) appSettings.loadProfile(index) } } Button { Layout.fillWidth: true text: qsTr("Remove") property alias currentIndex: profilesView.currentIndex enabled: currentIndex >= 0 && !appSettings.profilesList.get( currentIndex).builtin onClicked: { appSettings.profilesList.remove(currentIndex) profilesView.selection.clear() // TODO This is a very ugly workaround. The view didn't update on Qt 5.3.2. profilesView.model = 0 profilesView.model = appSettings.profilesList } } Item { // Spacing Layout.fillHeight: true } Button { Layout.fillWidth: true text: qsTr("Import") onClicked: { fileDialog.selectExisting = true fileDialog.callBack = function (url) { loadFile(url) } fileDialog.open() } function loadFile(url) { try { if (appSettings.verbose) console.log("Loading file: " + url) var profileObject = JSON.parse(fileIO.read(url)) var name = profileObject.name if (!name) throw "Profile doesn't have a name" var version = profileObject.version !== undefined ? profileObject.version : 1 if (version !== appSettings.profileVersion) throw "This profile is not supported on this version of CRT." delete profileObject.name appSettings.appendCustomProfile(name, JSON.stringify( profileObject)) } catch (err) { messageDialog.text = qsTr(err) messageDialog.open() } } } Button { property alias currentIndex: profilesView.currentIndex Layout.fillWidth: true text: qsTr("Export") enabled: currentIndex >= 0 && !appSettings.profilesList.get( currentIndex).builtin onClicked: { fileDialog.selectExisting = false fileDialog.callBack = function (url) { storeFile(url) } fileDialog.open() } function storeFile(url) { try { var urlString = url.toString() // Fix the extension if it's missing. var extension = urlString.substring( urlString.length - 5, urlString.length) var urlTail = (extension === ".json" ? "" : ".json") url += urlTail if (true) console.log("Storing file: " + url) var profileObject = appSettings.profilesList.get( currentIndex) var profileSettings = JSON.parse( profileObject.obj_string) profileSettings["name"] = profileObject.text profileSettings["version"] = appSettings.profileVersion var result = fileIO.write(url, JSON.stringify( profileSettings, undefined, 2)) if (!result) throw "The file could not be written." } catch (err) { console.log(err) messageDialog.text = qsTr( "There has been an error storing the file.") messageDialog.open() } } } } } } GroupBox { title: qsTr("Screen") Layout.fillWidth: true Layout.fillHeight: true padding: appSettings.defaultMargin GridLayout { anchors.fill: parent columns: 2 Label { text: qsTr("Brightness") } SimpleSlider { onValueChanged: appSettings.brightness = value value: appSettings.brightness } Label { text: qsTr("Contrast") } SimpleSlider { onValueChanged: appSettings.contrast = value value: appSettings.contrast } Label { text: qsTr("Margin") } SimpleSlider { onValueChanged: appSettings._margin = value value: appSettings._margin } Label { text: qsTr("Radius") } SimpleSlider { onValueChanged: appSettings._screenRadius = value value: appSettings._screenRadius } Label { text: qsTr("Frame size") } SimpleSlider { onValueChanged: appSettings._frameSize = value value: appSettings._frameSize } Label { text: qsTr("Opacity") visible: !appSettings.isMacOS } SimpleSlider { onValueChanged: appSettings.windowOpacity = value value: appSettings.windowOpacity visible: !appSettings.isMacOS } } } // DIALOGS //////////////////////////////////////////////////////////////// InsertNameDialog { id: insertname onNameSelected: { appSettings.appendCustomProfile(name, appSettings.composeProfileString()) } } MessageDialog { id: messageDialog title: qsTr("File Error") buttons: MessageDialog.Ok onAccepted: { messageDialog.close() } } Loader { property var callBack property bool selectExisting: false id: fileDialog sourceComponent: FileDialog { nameFilters: ["Json files (*.json)"] fileMode: fileDialog.selectExisting ? FileDialog.OpenFile : FileDialog.SaveFile onAccepted: callBack(selectedFile) } onSelectExistingChanged: reload() function open() { item.open() } function reload() { active = false active = true } } } ================================================ FILE: app/qml/SettingsTerminalTab.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.1 import QtQml 2.0 import "Components" ColumnLayout { GroupBox { title: qsTr("Font") Layout.fillWidth: true Layout.fillHeight: true padding: appSettings.defaultMargin GridLayout { anchors.fill: parent columns: 2 Label { text: qsTr("Source") } RowLayout { Layout.fillWidth: true RadioButton { text: qsTr("Bundled") checked: appSettings.fontSource === appSettings.bundled_fonts onClicked: { appSettings.fontSource = appSettings.bundled_fonts } } RadioButton { text: qsTr("System") checked: appSettings.fontSource === appSettings.system_fonts onClicked: { appSettings.fontSource = appSettings.system_fonts } } } Label { text: qsTr("Rendering") enabled: appSettings.fontSource === appSettings.bundled_fonts } ComboBox { id: renderingBox property string selectedElement: model[currentIndex] Layout.fillWidth: true model: [qsTr("Default"), qsTr("Scanlines"), qsTr("Pixels"), qsTr("Sub-Pixels"), qsTr("Modern")] currentIndex: appSettings.rasterization onCurrentIndexChanged: { appSettings.rasterization = currentIndex } enabled: appSettings.fontSource === appSettings.bundled_fonts } Label { text: qsTr("Name") } ComboBox { id: fontChanger Layout.fillWidth: true model: appSettings.filteredFontList textRole: "text" onActivated: { var font = appSettings.filteredFontList.get(currentIndex) // If selecting a high-res font while not in Modern mode, // switch to Modern to render at full resolution. if (!font.lowResolutionFont && appSettings.rasterization !== appSettings.modern_rasterization) { appSettings.rasterization = appSettings.modern_rasterization } // If selecting a low-res font while in Modern mode, switch back to default. if (font.lowResolutionFont && appSettings.rasterization === appSettings.modern_rasterization) { appSettings.rasterization = appSettings.no_rasterization } appSettings.fontName = font.name } function updateIndex() { for (var i = 0; i < appSettings.filteredFontList.count; i++) { var font = appSettings.filteredFontList.get(i) if (font.name === appSettings.fontName) { currentIndex = i return } } currentIndex = 0 } Connections { target: appSettings.fontManager onTerminalFontChanged: { fontChanger.updateIndex() } onFilteredFontListChanged: { fontChanger.updateIndex() } } Component.onCompleted: updateIndex() } Label { text: qsTr("Scaling") } RowLayout { Layout.fillWidth: true Slider { Layout.fillWidth: true id: fontScalingChanger onValueChanged: appSettings.fontScaling = value value: appSettings.fontScaling stepSize: 0.05 from: appSettings.minimumFontScaling to: appSettings.maximumFontScaling } SizedLabel { text: Math.round(fontScalingChanger.value * 100) + "%" } } Label { text: qsTr("Font Width") } RowLayout { Layout.fillWidth: true Slider { Layout.fillWidth: true id: widthChanger onValueChanged: appSettings.fontWidth = value value: appSettings.fontWidth stepSize: 0.05 from: 0.5 to: 1.5 } SizedLabel { text: Math.round(widthChanger.value * 100) + "%" } } Label { text: qsTr("Line Spacing") } RowLayout { Layout.fillWidth: true Slider { Layout.fillWidth: true id: lineSpacingChanger onValueChanged: appSettings.lineSpacing = value value: appSettings.lineSpacing stepSize: 0.01 from: 0.0 to: 1.0 } SizedLabel { text: Math.round(lineSpacingChanger.value * 100) + "%" } } } } GroupBox { title: qsTr("Colors") Layout.fillWidth: true Layout.fillHeight: true padding: appSettings.defaultMargin ColumnLayout { anchors.fill: parent ColumnLayout { Layout.fillWidth: true CheckableSlider { name: qsTr("Chroma Color") onNewValue: function(newValue) { appSettings.chromaColor = newValue } value: appSettings.chromaColor } CheckableSlider { name: qsTr("Saturation Color") onNewValue: function(newValue) { appSettings.saturationColor = newValue } value: appSettings.saturationColor enabled: appSettings.chromaColor !== 0 } } RowLayout { Layout.fillWidth: true ColorButton { name: qsTr("Font") height: 50 Layout.fillWidth: true onColorSelected: appSettings._fontColor = color color: appSettings._fontColor } ColorButton { name: qsTr("Background") height: 50 Layout.fillWidth: true onColorSelected: appSettings._backgroundColor = color color: appSettings._backgroundColor } ColorButton { name: qsTr("Frame") height: 50 Layout.fillWidth: true onColorSelected: appSettings._frameColor = color color: appSettings._frameColor } } } } } ================================================ FILE: app/qml/SettingsWindow.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.1 import QtQuick.Window 2.1 import QtQuick.Layouts 1.3 import QtQuick.Dialogs ApplicationWindow { readonly property real tabButtonPadding: 10 id: settings_window title: qsTr("Settings") width: 640 height: 520 Item { anchors { fill: parent; } TabBar { id: bar anchors { left: parent.left; right: parent.right; top: parent.top; } TabButton { padding: tabButtonPadding text: qsTr("General") } TabButton { padding: tabButtonPadding text: qsTr("Terminal") } TabButton { padding: tabButtonPadding text: qsTr("Effects") } TabButton { padding: tabButtonPadding text: qsTr("Advanced") } } StackLayout { anchors { top: bar.bottom left: parent.left right: parent.right bottom: parent.bottom margins: 16 } currentIndex: bar.currentIndex SettingsGeneralTab { } SettingsTerminalTab { } SettingsEffectsTab { } SettingsAdvancedTab { } } } } ================================================ FILE: app/qml/ShaderTerminal.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import "utils.js" as Utils Item { function dynamicFragmentPath() { var rasterMode = appSettings.rasterization; var burnInOn = appSettings.burnIn > 0 ? 1 : 0; var frameOn = appSettings.frameEnabled ? 1 : 0; var chromaOn = appSettings.chromaColor > 0 ? 1 : 0; return "qrc:/shaders/terminal_dynamic_raster" + rasterMode + "_burn" + burnInOn + "_frame" + frameOn + "_chroma" + chromaOn + ".frag.qsb"; } function staticFragmentPath() { var rgbShiftOn = appSettings.rgbShift > 0 ? 1 : 0; var bloomOn = appSettings.bloom > 0 ? 1 : 0; var curvatureOn = (appSettings.screenCurvature > 0 || appSettings.frameSize > 0) ? 1 : 0; var shineOn = appSettings.frameShininess > 0 ? 1 : 0; return "qrc:/shaders/terminal_static_rgb" + rgbShiftOn + "_bloom" + bloomOn + "_curve" + curvatureOn + "_shine" + shineOn + ".frag.qsb"; } property ShaderEffectSource source property BurnInEffect burnInEffect property ShaderEffectSource bloomSource property color fontColor: appSettings.fontColor property color backgroundColor: appSettings.backgroundColor property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize * terminalWindow.normalizedWindowScale property real frameSize: appSettings.frameSize * terminalWindow.normalizedWindowScale property real chromaColor: appSettings.chromaColor property real ambientLight: appSettings.ambientLight * 0.2 property size virtualResolution property size screenResolution property real _screenDensity: Math.min( screenResolution.width / virtualResolution.width, screenResolution.height / virtualResolution.height ) ShaderEffect { id: dynamicShader property ShaderEffectSource screenBuffer: frameBuffer property ShaderEffectSource burnInSource: burnInEffect.effectSource property ShaderEffectSource frameSource: terminalFrameLoader.item property color fontColor: parent.fontColor property color backgroundColor: parent.backgroundColor property real screenCurvature: parent.screenCurvature property real chromaColor: parent.chromaColor property real ambientLight: parent.ambientLight property real flickering: appSettings.flickering property real horizontalSync: appSettings.horizontalSync property real horizontalSyncStrength: Utils.lint(0.05, 0.35, horizontalSync) property real glowingLine: appSettings.glowingLine * 0.2 // Fast burnin properties property real burnIn: appSettings.burnIn property real burnInLastUpdate: burnInEffect.lastUpdate property real burnInTime: burnInEffect.burnInFadeTime property real jitter: appSettings.jitter property size jitterDisplacement: Qt.size(0.007 * jitter, 0.002 * jitter) property real staticNoise: appSettings.staticNoise property size scaleNoiseSize: Qt.size((width * 0.75) / (noiseTexture.width * appSettings.windowScaling * appSettings.totalFontScaling), (height * 0.75) / (noiseTexture.height * appSettings.windowScaling * appSettings.totalFontScaling)) property size virtualResolution: parent.virtualResolution // Rasterization might display oversamping issues if virtual resolution is close to physical display resolution. // We progressively disable rasterization from 4x up to 2x resolution. property real rasterizationIntensity: Utils.smoothstep(2.0, 4.0, _screenDensity) property real time: timeManager ? timeManager.time : 0 property ShaderEffectSource noiseSource: noiseShaderSource property real frameSize: parent.frameSize property real frameShininess: appSettings.frameShininess property real bloom: parent.bloomSource ? appSettings.bloom * 2.5 : 0 anchors.fill: parent blending: false Image { id: noiseTexture source: "images/allNoise512.png" width: 512 height: 512 fillMode: Image.Tile visible: false } ShaderEffectSource { id: noiseShaderSource sourceItem: noiseTexture wrapMode: ShaderEffectSource.Repeat visible: false smooth: true } vertexShader: "qrc:/shaders/terminal_dynamic.vert.qsb" fragmentShader: dynamicFragmentPath() onStatusChanged: if (log) console.log(log) } Loader { id: terminalFrameLoader active: appSettings.frameEnabled width: staticShader.width height: staticShader.height sourceComponent: ShaderEffectSource { sourceItem: terminalFrame hideSource: true visible: false format: ShaderEffectSource.RGBA TerminalFrame { id: terminalFrame blending: false anchors.fill: parent } } } ShaderEffect { id: staticShader width: parent.width * appSettings.windowScaling height: parent.height * appSettings.windowScaling property ShaderEffectSource source: parent.source property ShaderEffectSource bloomSource: parent.bloomSource property color fontColor: parent.fontColor property color backgroundColor: parent.backgroundColor property real bloom: bloomSource ? appSettings.bloom * 2.5 : 0 property real screenCurvature: parent.screenCurvature property real chromaColor: appSettings.chromaColor; property real rgbShift: appSettings.rgbShift * (4.0 / width) * appSettings.totalFontScaling property real screen_brightness: Utils.lint(0.5, 1.5, appSettings.brightness) property real frameShininess: appSettings.frameShininess property real frameSize: parent.frameSize blending: false visible: false vertexShader: "qrc:/shaders/terminal_static.vert.qsb" fragmentShader: staticFragmentPath() onStatusChanged: if (log) console.log(log) } ShaderEffectSource { id: frameBuffer visible: false sourceItem: staticShader hideSource: true } } ================================================ FILE: app/qml/SimpleSlider.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 import "Components" RowLayout { property alias value: slider.value property alias stepSize: slider.stepSize property alias minimumValue: slider.from property alias maximumValue: slider.to property real maxMultiplier: 100 id: setting_component spacing: 10 Slider { id: slider stepSize: parent.stepSize Layout.fillWidth: true } SizedLabel { text: Math.round(value * maxMultiplier) + "%" } } ================================================ FILE: app/qml/SizeOverlay.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 Rectangle { property size terminalSize property real topOpacity: 0.5 width: textSize.width * 2 height: textSize.height * 2 radius: 5 color: "black" opacity: sizetimer.running ? 0.5 : 0.0 Behavior on opacity { NumberAnimation { duration: 200 } } onTerminalSizeChanged: sizetimer.restart() Text { id: textSize anchors.centerIn: parent color: "white" text: terminalSize.width + "x" + terminalSize.height } Timer { id: sizetimer interval: 1000 running: false } } ================================================ FILE: app/qml/Storage.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.LocalStorage 2.0 QtObject { readonly property string dbMajorVersion: "2" readonly property string dbMinorVersion: "1.0" property bool initialized: false function getDatabase() { return LocalStorage.openDatabaseSync("coolretroterm" + dbMajorVersion, dbMinorVersion, "StorageDatabase", 100000) } function initialize() { var db = getDatabase(); db.transaction( function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS settings(setting TEXT UNIQUE, value TEXT)'); } ) initialized = true } function setSetting(setting, value) { if(!initialized) initialize(); var db = getDatabase(); var res = ""; db.transaction( function(tx) { var rs = tx.executeSql('INSERT OR REPLACE INTO settings VALUES (?,?);', [setting,value]); //console.log(rs.rowsAffected) if (rs.rowsAffected > 0) { res = "OK"; } else { res = "Error"; } } ) // The function returns “OK” if it was successful, or “Error” if it wasn't return res } function getSetting(setting) { if(!initialized) initialize(); var db = getDatabase(); var res = ""; db.transaction( function(tx) { var rs = tx.executeSql('SELECT value FROM settings WHERE setting=?;', [setting]); if (rs.rows.length > 0) { res = rs.rows.item(0).value; } else { res = undefined; } } ) return res } function dropSettings(){ var db = getDatabase(); db.transaction( function(tx) { tx.executeSql('DROP TABLE settings'); } ) } } ================================================ FILE: app/qml/TerminalContainer.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import Qt5Compat.GraphicalEffects import "utils.js" as Utils ShaderTerminal { property alias title: terminal.title property alias terminalSize: terminal.terminalSize property bool isActive: false signal sessionFinished() property bool loadBloomEffect: appSettings.bloom > 0 || appSettings._frameShininess > 0 id: mainShader opacity: appSettings.windowOpacity * 0.3 + 0.7 source: terminal.mainSource burnInEffect: terminal.burnInEffect virtualResolution: terminal.virtualResolution screenResolution: Qt.size( terminalWindow.width * Screen.devicePixelRatio * appSettings.windowScaling, terminalWindow.height * Screen.devicePixelRatio * appSettings.windowScaling ) bloomSource: bloomSourceLoader.item PreprocessedTerminal { id: terminal anchors.fill: parent isActive: mainShader.isActive onSessionFinished: mainShader.sessionFinished() } function activate() { terminal.mainTerminal.forceActiveFocus() } // EFFECTS //////////////////////////////////////////////////////////////// Loader { id: bloomEffectLoader active: loadBloomEffect asynchronous: true width: parent.width * appSettings.bloomQuality height: parent.height * appSettings.bloomQuality sourceComponent: FastBlur { radius: Utils.lint(16, 64, appSettings.bloomQuality) source: terminal.mainSource transparentBorder: true } } Loader { id: bloomSourceLoader active: loadBloomEffect asynchronous: true sourceComponent: ShaderEffectSource { id: _bloomEffectSource sourceItem: bloomEffectLoader.item wrapMode: ShaderEffectSource.Repeat hideSource: true smooth: true visible: false } } } ================================================ FILE: app/qml/TerminalFrame.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.0 import "utils.js" as Utils ShaderEffect { property color _staticFrameColor: Utils.sum(appSettings.frameColor, Qt.rgba(0.1, 0.1, 0.1, 1.0)) property color _backgroundColor: appSettings.backgroundColor property color _fontColor: appSettings.fontColor property color _lightColor: Utils.mix(_fontColor, _backgroundColor, 0.2) property color frameColor: Utils.mix( Utils.scaleColor(_lightColor, 0.2), _staticFrameColor, 0.125 + 0.750 * ambientLight ) property real screenCurvature: appSettings.screenCurvature * appSettings.screenCurvatureSize * terminalWindow.normalizedWindowScale property real frameShininess: appSettings.frameShininess property real frameSize: appSettings.frameSize * terminalWindow.normalizedWindowScale property real screenRadius: appSettings.screenRadius property size viewportSize: Qt.size(width / appSettings.windowScaling, height / appSettings.windowScaling) property real ambientLight: appSettings.ambientLight vertexShader: "qrc:/shaders/terminal_frame.vert.qsb" fragmentShader: "qrc:/shaders/terminal_frame.frag.qsb" onStatusChanged: if (log) console.log(log) //Print warning messages } ================================================ FILE: app/qml/TerminalTabs.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick import QtQuick.Controls import QtQuick.Layouts import QtQml.Models Item { id: tabsRoot readonly property int innerPadding: 6 readonly property string currentTitle: tabsModel.get(currentIndex).title ?? "cool-retro-term" property alias currentIndex: tabBar.currentIndex readonly property int count: tabsModel.count property size terminalSize: Qt.size(0, 0) function normalizeTitle(rawTitle) { if (rawTitle === undefined || rawTitle === null) { return "" } return String(rawTitle).trim() } function addTab() { tabsModel.append({ title: "" }) tabBar.currentIndex = tabsModel.count - 1 } function closeTab(index) { if (tabsModel.count <= 1) { terminalWindow.close() return } tabsModel.remove(index) tabBar.currentIndex = Math.min(tabBar.currentIndex, tabsModel.count - 1) } ListModel { id: tabsModel } Component.onCompleted: addTab() ColumnLayout { anchors.fill: parent spacing: 0 Rectangle { id: tabRow Layout.fillWidth: true height: rowLayout.implicitHeight color: palette.window visible: tabsModel.count > 1 RowLayout { id: rowLayout anchors.fill: parent spacing: 0 TabBar { id: tabBar Layout.fillWidth: true Layout.fillHeight: true focusPolicy: Qt.NoFocus Repeater { model: tabsModel TabButton { id: tabButton contentItem: RowLayout { anchors.fill: parent anchors { leftMargin: innerPadding; rightMargin: innerPadding } spacing: innerPadding Label { text: model.title elide: Text.ElideRight Layout.fillWidth: true Layout.alignment: Qt.AlignVCenter } ToolButton { text: "\u00d7" focusPolicy: Qt.NoFocus padding: innerPadding Layout.alignment: Qt.AlignVCenter onClicked: tabsRoot.closeTab(index) } } } } } ToolButton { id: addTabButton text: "+" focusPolicy: Qt.NoFocus Layout.fillHeight: true padding: innerPadding Layout.alignment: Qt.AlignVCenter onClicked: tabsRoot.addTab() } } } StackLayout { id: stack Layout.fillWidth: true Layout.fillHeight: true currentIndex: tabBar.currentIndex Repeater { model: tabsModel TerminalContainer { property bool shouldHaveFocus: terminalWindow.active && StackLayout.isCurrentItem isActive: StackLayout.isCurrentItem onShouldHaveFocusChanged: { if (shouldHaveFocus) { activate() } } onTitleChanged: tabsModel.setProperty(index, "title", normalizeTitle(title)) Layout.fillWidth: true Layout.fillHeight: true onSessionFinished: tabsRoot.closeTab(index) onTerminalSizeChanged: updateTerminalSize() function updateTerminalSize() { // Every tab will have the same size so we can simply take the first one. if (index == 0) { tabsRoot.terminalSize = terminalSize } } } } } } } ================================================ FILE: app/qml/TerminalWindow.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick import QtQuick.Window import QtQuick.Controls import "menus" ApplicationWindow { id: terminalWindow width: 1024 height: 768 // Show the window once it is ready. Component.onCompleted: { visible = true } minimumWidth: 320 minimumHeight: 240 visible: false property bool fullscreen: false onFullscreenChanged: visibility = (fullscreen ? Window.FullScreen : Window.Windowed) menuBar: WindowMenu { } property real normalizedWindowScale: 1024 / ((0.5 * width + 0.5 * height)) color: "#00000000" title: terminalTabs.currentTitle Action { id: fullscreenAction text: qsTr("Fullscreen") enabled: !appSettings.isMacOS shortcut: StandardKey.FullScreen onTriggered: fullscreen = !fullscreen checkable: true checked: fullscreen } Action { id: newWindowAction text: qsTr("New Window") shortcut: appSettings.isMacOS ? "Meta+N" : "Ctrl+Shift+N" onTriggered: appRoot.createWindow() } Action { id: quitAction text: qsTr("Quit") shortcut: appSettings.isMacOS ? StandardKey.Close : "Ctrl+Shift+Q" onTriggered: terminalWindow.close() } Action { id: showsettingsAction text: qsTr("Settings") onTriggered: { settingsWindow.show() settingsWindow.requestActivate() settingsWindow.raise() } } Action { id: copyAction text: qsTr("Copy") shortcut: appSettings.isMacOS ? StandardKey.Copy : "Ctrl+Shift+C" } Action { id: pasteAction text: qsTr("Paste") shortcut: appSettings.isMacOS ? StandardKey.Paste : "Ctrl+Shift+V" } Action { id: zoomIn text: qsTr("Zoom In") shortcut: StandardKey.ZoomIn onTriggered: appSettings.incrementScaling() } Action { id: zoomOut text: qsTr("Zoom Out") shortcut: StandardKey.ZoomOut onTriggered: appSettings.decrementScaling() } Action { id: showAboutAction text: qsTr("About") onTriggered: { aboutDialog.show() aboutDialog.requestActivate() aboutDialog.raise() } } Action { id: newTabAction text: qsTr("New Tab") shortcut: appSettings.isMacOS ? "Meta+T" : "Ctrl+Shift+T" onTriggered: terminalTabs.addTab() } Action { id: closeTabAction text: qsTr("Close Tab") shortcut: appSettings.isMacOS ? "Meta+W" : "Ctrl+Shift+W" onTriggered: terminalTabs.closeTab(terminalTabs.currentIndex) } Shortcut { sequence: appSettings.isMacOS ? "Meta+1" : "Alt+1" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 0) terminalTabs.currentIndex = 0 } Shortcut { sequence: appSettings.isMacOS ? "Meta+2" : "Alt+2" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 1) terminalTabs.currentIndex = 1 } Shortcut { sequence: appSettings.isMacOS ? "Meta+3" : "Alt+3" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 2) terminalTabs.currentIndex = 2 } Shortcut { sequence: appSettings.isMacOS ? "Meta+4" : "Alt+4" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 3) terminalTabs.currentIndex = 3 } Shortcut { sequence: appSettings.isMacOS ? "Meta+5" : "Alt+5" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 4) terminalTabs.currentIndex = 4 } Shortcut { sequence: appSettings.isMacOS ? "Meta+6" : "Alt+6" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 5) terminalTabs.currentIndex = 5 } Shortcut { sequence: appSettings.isMacOS ? "Meta+7" : "Alt+7" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 6) terminalTabs.currentIndex = 6 } Shortcut { sequence: appSettings.isMacOS ? "Meta+8" : "Alt+8" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 7) terminalTabs.currentIndex = 7 } Shortcut { sequence: appSettings.isMacOS ? "Meta+9" : "Alt+9" context: Qt.WindowShortcut onActivated: if (terminalTabs.count > 8) terminalTabs.currentIndex = 8 } TerminalTabs { id: terminalTabs width: parent.width height: (parent.height + Math.abs(y)) } Loader { anchors.centerIn: parent active: appSettings.showTerminalSize sourceComponent: SizeOverlay { z: 3 terminalSize: terminalTabs.terminalSize } } onClosing: { appRoot.closeWindow(terminalWindow) } } ================================================ FILE: app/qml/TimeManager.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick QtObject { id: timeManager property bool enableTimer: false property real time: 0 property int framesPerUpdate: Math.max(1, appSettings.effectsFrameSkip) property int _frameCounter: 0 property var frameDriver: FrameAnimation { running: enableTimer onTriggered: { timeManager._frameCounter += 1 if (timeManager._frameCounter >= timeManager.framesPerUpdate) { time = elapsedTime timeManager._frameCounter = 0 } } } onEnableTimerChanged: if (!enableTimer) _frameCounter = 0 onFramesPerUpdateChanged: _frameCounter = 0 } ================================================ FILE: app/qml/fonts/apple2/FreeLicense.txt ================================================ KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE version 1.2f Permission is hereby granted, free of charge, to any person or entity (the "User") obtaining a copy of the included font files (the "Software") produced by Kreative Software, to utilize, display, embed, or redistribute the Software, subject to the following conditions: 1. The User may not sell copies of the Software for a fee. 1a. The User may give away copies of the Software free of charge provided this license and any documentation is included verbatim and credit is given to Kreative Korporation or Kreative Software. 2. The User may not modify, reverse-engineer, or create any derivative works of the Software. 3. Any Software carrying the following font names or variations thereof is not covered by this license and may not be used under the terms of this license: Jewel Hill, Miss Diode n Friends, This is Beckie's font! 3a. Any Software carrying a font name ending with the string "Pro CE" is not covered by this license and may not be used under the terms of this license. 4. This license becomes null and void if any of the above conditions are not met. 5. Kreative Software reserves the right to change this license at any time without notice. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE SOFTWARE OR FROM OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: app/qml/fonts/bigblue-terminal/LICENSE.TXT ================================================ Attribution-ShareAlike 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike. In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: app/qml/fonts/departure-mono/LICENSE ================================================ Copyright 2022–2024 Helena Zhang (helenazhang.com). This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: https://openfontlicense.org ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/fira-code/LICENSE.txt ================================================ Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/gohu/LICENSE ================================================ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar 14 rue de Plaisance, 75014 Paris, France Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. ================================================ FILE: app/qml/fonts/greybeard/LICENSE ================================================ MIT License Copyright (c) 2012-2015 Uwe Waldmann Modified work Copyright 2018 Andy Walker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: app/qml/fonts/hack/LICENSE.txt ================================================ The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License The work in the DejaVu project was committed to the public domain. Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera" ### MIT License Copyright (c) 2018 Source Foundry Authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ### BITSTREAM VERA LICENSE Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera". This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. ================================================ FILE: app/qml/fonts/ibm-3278/LICENSE.txt ================================================ Copyright 2022 The 3270font Authors (https://github.com/rbanffy/3270font) Copyright (c) 2011-2022, Ricardo Banffy. Copyright (c) 1993-2011, Paul Mattes. Copyright (c) 2004-2005, Don Russell. Copyright (c) 2004, Dick Altenbern. Copyright (c) 1990, Jeff Sparkes. Copyright (c) 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA 30332. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Ricardo Banffy, Paul Mattes, Don Russell, Dick Altenbern, Jeff Sparkes, GTRC nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICARDO BANFFY, PAUL MATTES, DON RUSSELL, DICK ALTENBERN, JEFF SPARKES OR GTRC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The Debian Logo glyph is based on the Debian Open Use Logo and is Copyright (c) 1999 Software in the Public Interest, Inc., and it is incorporated here under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License. The logo is released under the terms of the GNU Lesser General Public License, version 3 or any later version, or, at your option, of the Creative Commons Attribution-ShareAlike 3.0 Unported License. Ubuntu, the Ubuntu logo and the Circle of Friends symbol are registered trademarks of Canonical Ltd. The Fontforge SFD font description file is optionally licensed under the SIL Open Font License v1.1 with no Reserved Font Name. This license is available with a FAQ at http://scripts.sil.org/OFL. ================================================ FILE: app/qml/fonts/ibm-3278/README.md ================================================ 3270font: A font for the nostalgic ================================== ![Travis-CI](https://api.travis-ci.org/rbanffy/3270font.svg) ![Screenshot](https://raw.githubusercontent.com/wiki/rbanffy/3270font/emacs.png) ![Sample](https://raw.githubusercontent.com/wiki/rbanffy/3270font/3270Medium_sample.png) A little bit of history ----------------------- This font is derived from the x3270 font, which, in turn, was translated from the one in Georgia Tech's 3270tool, which was itself hand-copied from a 3270 series terminal. I built it because I felt terminals deserve to be pretty. The .sfd font file contains a x3270 bitmap font that was used for guidance. ![Using with the cool-old-tern (now cool-retro-term) terminal program]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/cool-retro-term.png) Getting it ---------- If you are running Debian or Ubuntu and you don't want to mess with building your font files, you can simply `apt-get install fonts-3270` (It's available from the Debian (https://packages.debian.org/sid/fonts/fonts-3270) and Ubuntu (http://packages.ubuntu.com/zesty/fonts-3270) package repos at https://packages.debian.org/sid/fonts/fonts-3270 and http://packages.ubuntu.com/xenial/fonts/fonts-3270, although the packaged version may not be the latest version, but it's good enough for most purposes. For those who don't have the luxury of a proper system-managed package, Adobe Type 1, TTF, OTF and WOFF versions are available for download on http://s3.amazonaws.com/3270font/3270_fonts_4cfe95c.zip (although this URL may not always reflect the latest version). ![ASCII is so 60's]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/cyrillic.png) The format ---------- The "source" file is edited using FontForge. You'll need it if you want to generate fonts for your platform. On most civilized operating systems, you can simply `apt-get install fontforge`, `yum install fontforge` or even `port install fontforge`. On others, you may need to grab your copy from http://fontforge.org/. I encourage you to drop by and read the tutorials. ![Powerline-shell compatible!]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/powerline.png) ![Using it on OSX (don't forget to turn antialiasing on)]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/osx_terminal.png) If you are running Windows, you'll probably need something like Cygwin, but, in the end, the font works correctly (with some very minor hinting issues). ![Works on Windows]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/windows_7.png) Generating usable font files ---------------------------- The easiest way to generate the font files your computer can use is to run `make all` (if you are running Ubuntu or Debian, `make install` will install them too). Using `make help` will offer a handy list of options. The script `generate_derived.pe` calls FontForge and generates PostScript, OTF, TTF and WOFF versions of the base font, as well as a slightly more condensed .sfd file with the base font narrowed to 488 units, with no glyph rescaling (or cropping - we need to fix that) and its corresponding PostScript, TTF, OTF and WOFF versions. ![For your favorite editor]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/symbols.png) Contributing ------------ I fear GitHub's pull-request mechanism may not be very FontForge-friendly. If you want to contribute (there are a lot of missing glyphs, such as most non-latin alphabets which most likely were never built into 3270 terminals), the best workflow would probably be to add the encoding slots (if needed), add/make the changes, remove the unchanged glyphs and save it as a different file. If, in doubt, get in touch and we will figure out how to do it right. In order to generate the sample image and the grids for FontForge, you'll need a Python 3 environment with PIL or pillow installed. The requirements.txt file lists everything you need to do it. Known problems -------------- Not all symbols in the 3270 charset have Unicode counterparts. When possible, they are duplicated in the Unicode space. The 3270-only symbols are at the end of the font, along with some glyphs useful for building others. Please refer to http://x3270.bgp.nu/Charset.html for a complete map. Future improvements ------------------- A grid generator is provided for producing various grid sizes for the font. Those grids are not used yet, but they are intended to be used to align font features to provide better rendering at common font size choices. The captures below exemplify these choices: ![x3270 with 32 pixel font (used as bitmap template for the font)]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/measurements_x3270_32.png) ![x3270 with 20 pixel font]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/measurements_x3270_20.png) ![Gnome Terminal on Ubuntu 17.10]( https://raw.githubusercontent.com/wiki/rbanffy/3270font/measurements_gnome_terminal.png) ================================================ FILE: app/qml/fonts/iosevka/LICENSE.txt ================================================ Copyright (c) 2015-2023, Renzhi Li (aka. Belleve Invis, belleve@typeof.net) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL -------------------------- SIL Open Font License v1.1 ==================================================== Preamble ---------- The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. Definitions ------------- `"Font Software"` refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. `"Reserved Font Name"` refers to any names specified as such after the copyright statement(s). `"Original Version"` refers to the collection of Font Software components as distributed by the Copyright Holder(s). `"Modified Version"` refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. `"Author"` refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. Permission & Conditions ------------------------ Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1. Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2. Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3. No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5. The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. Termination ----------- This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/jetbrains-mono/LICENSE.txt ================================================ Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: https://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/oldschool-pc-fonts/LICENSE.TXT ================================================ Attribution-ShareAlike 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike. In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: app/qml/fonts/opendyslexic/LICENSE.txt ================================================ License ------- The license for this font is: ♡ Copying is an act of love. Please copy. Bitstream License: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (“Fonts”) and associated documentation files (the “Font Software”), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces. The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words “Bitstream” or the word “Vera”. This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the “Bitstream Vera” names. The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org. ================================================ FILE: app/qml/fonts/pet-me/FreeLicense.txt ================================================ KREATIVE SOFTWARE RELAY FONTS FREE USE LICENSE version 1.2f Permission is hereby granted, free of charge, to any person or entity (the "User") obtaining a copy of the included font files (the "Software") produced by Kreative Software, to utilize, display, embed, or redistribute the Software, subject to the following conditions: 1. The User may not sell copies of the Software for a fee. 1a. The User may give away copies of the Software free of charge provided this license and any documentation is included verbatim and credit is given to Kreative Korporation or Kreative Software. 2. The User may not modify, reverse-engineer, or create any derivative works of the Software. 3. Any Software carrying the following font names or variations thereof is not covered by this license and may not be used under the terms of this license: Jewel Hill, Miss Diode n Friends, This is Beckie's font! 3a. Any Software carrying a font name ending with the string "Pro CE" is not covered by this license and may not be used under the terms of this license. 4. This license becomes null and void if any of the above conditions are not met. 5. Kreative Software reserves the right to change this license at any time without notice. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE SOFTWARE OR FROM OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: app/qml/fonts/source-code-pro/LICENSE.txt ================================================ Copyright 2010-2020 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/terminus/LICENSE-Terminess.txt ================================================ Copyright (c) 2010 Dimitar Toshkov Zhekov, with Reserved Font Name "Terminus Font". Copyright (c) 2011-2021 Tilman Blumenbach, with Reserved Font Name "Terminus (TTF)". This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. ================================================ FILE: app/qml/fonts/unscii/LICENSE ================================================ You can consider it Public Domain (or CC-0) except for the files derived from or containing parts of Roman Czyborra's Unifont project (unifont.hex, hex2bdf.pl, unscii-16-full.*) which fall under GPL. See https://savannah.gnu.org/projects/unifont/ for more. ================================================ FILE: app/qml/main.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import "menus" QtObject { id: appRoot property ApplicationSettings appSettings: ApplicationSettings { onInitializedSettings: appRoot.createWindow() } property TimeManager timeManager: TimeManager { enableTimer: windowsModel.count > 0 } property SettingsWindow settingsWindow: SettingsWindow { visible: false } property AboutDialog aboutDialog: AboutDialog { visible: false } property Component windowComponent: Component { TerminalWindow { } } property ListModel windowsModel: ListModel { } function createWindow() { var window = windowComponent.createObject(null) if (!window) return windowsModel.append({ window: window }) window.show() window.requestActivate() } function closeWindow(window) { for (var i = 0; i < windowsModel.count; i++) { if (windowsModel.get(i).window === window) { windowsModel.remove(i) break } } window.destroy() if (windowsModel.count === 0) { appSettings.close() } } } ================================================ FILE: app/qml/menus/FullContextMenu.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.3 Menu { id: contextmenu MenuItem { action: copyAction } MenuItem { action: pasteAction } MenuItem { action: showsettingsAction } Menu { title: qsTr("File") MenuItem { action: newWindowAction } MenuItem { action: newTabAction } MenuSeparator {} MenuItem { action: quitAction } } Menu { title: qsTr("Edit") MenuItem { action: copyAction } MenuItem { action: pasteAction } MenuSeparator {} MenuItem { action: showsettingsAction } } Menu { title: qsTr("View") MenuItem { action: fullscreenAction visible: fullscreenAction.enabled } MenuItem { action: zoomIn } MenuItem { action: zoomOut } } Menu { id: profilesMenu title: qsTr("Profiles") Instantiator { model: appSettings.profilesList delegate: MenuItem { text: model.text onTriggered: { appSettings.loadProfileString(obj_string) } } onObjectAdded: function(index, object) { profilesMenu.insertItem(index, object) } onObjectRemoved: function(object) { profilesMenu.removeItem(object) } } } Menu { title: qsTr("Help") MenuItem { action: showAboutAction } } } ================================================ FILE: app/qml/menus/ShortContextMenu.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.3 Menu { id: contextmenu MenuItem { action: copyAction } MenuItem { action: pasteAction } } ================================================ FILE: app/qml/menus/WindowMenu.qml ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ import QtQuick 2.2 import QtQuick.Controls 2.3 MenuBar { id: defaultMenuBar visible: appSettings.isMacOS || appSettings.showMenubar Menu { title: qsTr("File") MenuItem { action: newWindowAction } MenuItem { action: newTabAction } MenuItem { action: closeTabAction } MenuSeparator { } MenuItem { action: quitAction } } Menu { title: qsTr("Edit") MenuItem { action: copyAction } MenuItem { action: pasteAction } MenuSeparator {} MenuItem { action: showsettingsAction } } Menu { id: viewMenu title: qsTr("View") Instantiator { model: !appSettings.isMacOS ? 1 : 0 delegate: MenuItem { action: fullscreenAction } onObjectAdded: (index, object) => viewMenu.insertItem(index, object) onObjectRemoved: (index, object) => viewMenu.removeItem(object) } MenuItem { action: zoomIn } MenuItem { action: zoomOut } } Menu { id: profilesMenu title: qsTr("Profiles") Instantiator { model: appSettings.profilesList delegate: MenuItem { text: model.text onTriggered: { appSettings.loadProfileString(obj_string) } } onObjectAdded: function(index, object) { profilesMenu.insertItem(index, object) } onObjectRemoved: function(object) { profilesMenu.removeItem(object) } } } Menu { title: qsTr("Help") MenuItem { action: showAboutAction } } } ================================================ FILE: app/qml/resources.qrc ================================================ SizeOverlay.qml ShaderTerminal.qml CheckableSlider.qml ApplicationSettings.qml SettingsWindow.qml TerminalWindow.qml SettingsGeneralTab.qml PreprocessedTerminal.qml TimeManager.qml SimpleSlider.qml ColorButton.qml AboutDialog.qml InsertNameDialog.qml SettingsEffectsTab.qml main.qml SettingsTerminalTab.qml fonts/apple2/PrintChar21.ttf fonts/ibm-3278/3270NerdFontMono-Regular.ttf Storage.qml SettingsAdvancedTab.qml TerminalContainer.qml TerminalTabs.qml images/crt256.png utils.js images/allNoise512.png fonts/fixedsys-excelsior/FSEX301-L2.ttf fonts/cozette/CozetteVector.ttf fonts/greybeard/Greybeard-16px.ttf fonts/gohu/GohuFont11NerdFontMono-Regular.ttf fonts/hack/HackNerdFontMono-Regular.ttf fonts/fira-code/FiraCodeNerdFontMono-Regular.ttf fonts/bigblue-terminal/BigBlueTerm437NerdFontMono-Regular.ttf fonts/iosevka/IosevkaTermNerdFontMono-Regular.ttf fonts/jetbrains-mono/JetBrainsMonoNerdFontMono-Regular.ttf ../icons/32x32/cool-retro-term.png Components/SizedLabel.qml fonts/atari-400-800/AtariClassic-Regular.ttf fonts/pet-me/PetMe64.ttf fonts/pet-me/PetMe.ttf BurnInEffect.qml fonts/terminus/TerminessNerdFontMono-Regular.ttf fonts/departure-mono/DepartureMonoNerdFontMono-Regular.otf fonts/opendyslexic/OpenDyslexicMNerdFontMono-Regular.otf fonts/source-code-pro/SauceCodeProNerdFontMono-Regular.ttf TerminalFrame.qml menus/WindowMenu.qml menus/FullContextMenu.qml menus/ShortContextMenu.qml ../shaders/terminal_dynamic.vert.qsb ../shaders/terminal_static.vert.qsb ../shaders/terminal_frame.vert.qsb ../shaders/burn_in.vert.qsb ../shaders/terminal_dynamic_raster0_burn0_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster0_burn0_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster0_burn0_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster0_burn0_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster0_burn1_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster0_burn1_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster0_burn1_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster0_burn1_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster1_burn0_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster1_burn0_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster1_burn0_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster1_burn0_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster1_burn1_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster1_burn1_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster1_burn1_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster1_burn1_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster2_burn0_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster2_burn0_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster2_burn0_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster2_burn0_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster2_burn1_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster2_burn1_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster2_burn1_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster2_burn1_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster3_burn0_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster3_burn0_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster3_burn0_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster3_burn0_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster3_burn1_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster3_burn1_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster3_burn1_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster3_burn1_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster4_burn0_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster4_burn0_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster4_burn0_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster4_burn0_frame1_chroma1.frag.qsb ../shaders/terminal_dynamic_raster4_burn1_frame0_chroma0.frag.qsb ../shaders/terminal_dynamic_raster4_burn1_frame0_chroma1.frag.qsb ../shaders/terminal_dynamic_raster4_burn1_frame1_chroma0.frag.qsb ../shaders/terminal_dynamic_raster4_burn1_frame1_chroma1.frag.qsb ../shaders/terminal_static_rgb0_bloom0_curve0_shine0.frag.qsb ../shaders/terminal_static_rgb0_bloom0_curve0_shine1.frag.qsb ../shaders/terminal_static_rgb0_bloom0_curve1_shine0.frag.qsb ../shaders/terminal_static_rgb0_bloom0_curve1_shine1.frag.qsb ../shaders/terminal_static_rgb0_bloom1_curve0_shine0.frag.qsb ../shaders/terminal_static_rgb0_bloom1_curve0_shine1.frag.qsb ../shaders/terminal_static_rgb0_bloom1_curve1_shine0.frag.qsb ../shaders/terminal_static_rgb0_bloom1_curve1_shine1.frag.qsb ../shaders/terminal_static_rgb1_bloom0_curve0_shine0.frag.qsb ../shaders/terminal_static_rgb1_bloom0_curve0_shine1.frag.qsb ../shaders/terminal_static_rgb1_bloom0_curve1_shine0.frag.qsb ../shaders/terminal_static_rgb1_bloom0_curve1_shine1.frag.qsb ../shaders/terminal_static_rgb1_bloom1_curve0_shine0.frag.qsb ../shaders/terminal_static_rgb1_bloom1_curve0_shine1.frag.qsb ../shaders/terminal_static_rgb1_bloom1_curve1_shine0.frag.qsb ../shaders/terminal_static_rgb1_bloom1_curve1_shine1.frag.qsb ../shaders/terminal_frame.frag.qsb ../shaders/burn_in.frag.qsb fonts/unscii/unscii-8-thin.ttf fonts/unscii/unscii-16-full.ttf fonts/unscii/unscii-8.ttf fonts/oldschool-pc-fonts/PxPlus_IBM_EGA_8x8.ttf fonts/oldschool-pc-fonts/PxPlus_IBM_VGA8.ttf fonts/oldschool-pc-fonts/PxPlus_IBM_VGA_8x16.ttf ================================================ FILE: app/qml/utils.js ================================================ /******************************************************************************* * Copyright (c) 2013-2021 "Filippo Scognamiglio" * https://github.com/Swordfish90/cool-retro-term * * This file is part of cool-retro-term. * * cool-retro-term is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . *******************************************************************************/ .pragma library function clamp(x, min, max) { if (x <= min) return min; if (x >= max) return max; return x; } function lint(a, b, t) { return (1 - t) * a + (t) * b; } function mix(c1, c2, alpha) { return Qt.rgba(c1.r * (1 - alpha) + c2.r * alpha, c1.g * (1 - alpha) + c2.g * alpha, c1.b * (1 - alpha) + c2.b * alpha, c1.a * (1 - alpha) + c2.a * alpha) } function sum(c1, c2) { let result = Qt.rgba( clamp(c1.r + c2.r, 0, 1), clamp(c1.g + c2.g, 0, 1), clamp(c1.b + c2.b, 0, 1), clamp(c1.a + c2.a, 0, 1) ); return result } function scaleColor(c1, value) { return Qt.rgba( clamp(c1.r * value, 0, 1), clamp(c1.g * value, 0, 1), clamp(c1.b * value, 0, 1), clamp(c1.a, 0, 1) ); } function smoothstep(min, max, value) { let x = Math.max(0, Math.min(1, (value - min) / (max - min))); return x * x * (3 - 2 * x); } function strToColor(s){ var r = parseInt(s.substring(1,3), 16) / 256; var g = parseInt(s.substring(3,5), 16) / 256; var b = parseInt(s.substring(5,7), 16) / 256; return Qt.rgba(r, g, b, 1.0); } /* Tokenizes a command into program and arguments, taking into account quoted * strings and backslashes. * Based on GLib's tokenizer, used by Gnome Terminal */ function tokenizeCommandLine(s){ var args = []; var currentToken = ""; var quoteChar = ""; var escaped = false; var nextToken = function() { args.push(currentToken); currentToken = ""; } var appendToCurrentToken = function(c) { currentToken += c; } for (var i = 0; i < s.length; i++) { // char followed by backslash, append literally if (escaped) { escaped = false; appendToCurrentToken(s[i]); // char inside quotes, either close or append } else if (quoteChar) { escaped = s[i] === '\\'; if (quoteChar === s[i]) { quoteChar = ""; nextToken(); } else if (!escaped) { appendToCurrentToken(s[i]); } // regular char } else { escaped = s[i] === '\\'; switch (s[i]) { case '\\': // begin escape break; case '\n': // newlines always delimits nextToken(); break; case ' ': case '\t': // delimit on new whitespace if (currentToken) { nextToken(); } break; case '\'': case '"': // begin quoted section quoteChar = s[i]; break; default: appendToCurrentToken(s[i]); } } } // ignore last token if broken quotes/backslash if (currentToken && !escaped && !quoteChar) { nextToken(); } return args; } ================================================ FILE: app/shaders/burn_in.frag ================================================ #version 440 layout(location = 0) in vec2 qt_TexCoord0; layout(location = 0) out vec4 fragColor; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float burnInLastUpdate; float burnInTime; float prevLastUpdate; }; layout(binding = 1) uniform sampler2D txt_source; layout(binding = 2) uniform sampler2D burnInSource; float rgb2grey(vec3 v) { return dot(v, vec3(0.21, 0.72, 0.04)); } void main() { vec2 coords = qt_TexCoord0; vec3 txtColor = texture(txt_source, coords).rgb; vec4 accColor = texture(burnInSource, coords); float prevMask = accColor.a; float blurDecay = clamp((burnInLastUpdate - prevLastUpdate) * burnInTime, 0.0, 1.0); blurDecay = max(0.0, blurDecay - prevMask); vec3 color = max(accColor.rgb - vec3(blurDecay), txtColor); float currMask = step(rgb2grey(color), rgb2grey(txtColor)); fragColor = vec4(color, currMask) * qt_Opacity; } ================================================ FILE: app/shaders/burn_in.vert ================================================ #version 440 layout(location = 0) in vec4 qt_Vertex; layout(location = 1) in vec2 qt_MultiTexCoord0; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float burnInLastUpdate; float burnInTime; float prevLastUpdate; }; layout(location = 0) out vec2 qt_TexCoord0; void main() { qt_TexCoord0 = qt_MultiTexCoord0; gl_Position = qt_Matrix * qt_Vertex; } ================================================ FILE: app/shaders/passthrough.vert ================================================ #version 440 layout(location = 0) in vec4 qt_Vertex; layout(location = 1) in vec2 qt_MultiTexCoord0; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float time; vec4 fontColor; vec4 backgroundColor; float shadowLength; vec2 virtualResolution; float rasterizationIntensity; int rasterizationMode; float burnInLastUpdate; float burnInTime; float burnIn; float staticNoise; float screenCurvature; float glowingLine; float chromaColor; vec2 jitterDisplacement; float ambientLight; float jitter; float horizontalSync; float horizontalSyncStrength; float flickering; vec2 scaleNoiseSize; float screen_brightness; float bloom; float rgbShift; float frameShadowCoeff; float frameShininess; vec4 frameColor; float frameSize; float prevLastUpdate; }; layout(location = 0) out vec2 qt_TexCoord0; void main() { qt_TexCoord0 = qt_MultiTexCoord0; gl_Position = qt_Matrix * qt_Vertex; } ================================================ FILE: app/shaders/terminal_dynamic.frag ================================================ #version 440 #ifndef CRT_RASTER_MODE #define CRT_RASTER_MODE 0 #endif #ifndef CRT_BURN_IN #define CRT_BURN_IN 1 #endif #ifndef CRT_DISPLAY_FRAME #define CRT_DISPLAY_FRAME 1 #endif #ifndef CRT_CHROMA #define CRT_CHROMA 1 #endif layout(location = 0) in vec2 qt_TexCoord0; layout(location = 1) in float vBrightness; layout(location = 2) in float vDistortionScale; layout(location = 3) in float vDistortionFreq; layout(location = 0) out vec4 fragColor; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float time; vec4 fontColor; vec4 backgroundColor; vec2 virtualResolution; float rasterizationIntensity; float burnInLastUpdate; float burnInTime; float burnIn; float staticNoise; float screenCurvature; float glowingLine; float chromaColor; vec2 jitterDisplacement; float jitter; float horizontalSync; float horizontalSyncStrength; float flickering; vec2 scaleNoiseSize; float frameShininess; float frameSize; float bloom; }; layout(binding = 0) uniform sampler2D noiseSource; layout(binding = 1) uniform sampler2D screenBuffer; layout(binding = 2) uniform sampler2D burnInSource; layout(binding = 3) uniform sampler2D frameSource; float min2(vec2 v) { return min(v.x, v.y); } float prod2(vec2 v) { return v.x * v.y; } float sum2(vec2 v) { return v.x + v.y; } float rgb2grey(vec3 v) { return dot(v, vec3(0.21, 0.72, 0.04)); } vec2 distortCoordinates(vec2 coords){ vec2 paddedCoords = coords * (vec2(1.0) + frameSize * 2.0) - frameSize; vec2 cc = (paddedCoords - vec2(0.5)); float dist = dot(cc, cc) * screenCurvature; return (paddedCoords + cc * (1.0 + dist) * dist); } vec3 applyRasterization(vec2 screenCoords, vec3 texel, vec2 virtualRes, float intensity) { #if CRT_RASTER_MODE == 0 || CRT_RASTER_MODE == 4 return texel; #else if (intensity <= 0.0) { return texel; } const float INTENSITY = 0.30; const float BRIGHTBOOST = 0.30; #if CRT_RASTER_MODE == 1 vec3 pixelHigh = ((1.0 + BRIGHTBOOST) - (0.2 * texel)) * texel; vec3 pixelLow = ((1.0 - INTENSITY) + (0.1 * texel)) * texel; vec2 coords = fract(screenCoords * virtualRes) * 2.0 - vec2(1.0); float mask = 1.0 - abs(coords.y); vec3 rasterizationColor = mix(pixelLow, pixelHigh, mask); return mix(texel, rasterizationColor, intensity); #elif CRT_RASTER_MODE == 2 vec3 pixelHigh = ((1.0 + BRIGHTBOOST) - (0.2 * texel)) * texel; vec3 pixelLow = ((1.0 - INTENSITY) + (0.1 * texel)) * texel; vec2 coords = fract(screenCoords * virtualRes) * 2.0 - vec2(1.0); coords = coords * coords; float mask = 1.0 - coords.x - coords.y; vec3 rasterizationColor = mix(pixelLow, pixelHigh, mask); return mix(texel, rasterizationColor, intensity); #elif CRT_RASTER_MODE == 3 const float SUBPIXELS = 3.0; vec3 offsets = vec3(3.141592654) * vec3(0.5, 0.5 - 2.0 / 3.0, 0.5 - 4.0 / 3.0); vec2 omega = vec2(3.141592654) * vec2(2.0) * virtualRes; vec2 angle = screenCoords * omega; vec3 xfactors = (SUBPIXELS + sin(angle.x + offsets)) / (SUBPIXELS + 1.0); vec3 result = texel * xfactors; vec3 pixelHigh = ((1.0 + BRIGHTBOOST) - (0.2 * result)) * result; vec3 pixelLow = ((1.0 - INTENSITY) + (0.1 * result)) * result; vec2 coords = fract(screenCoords * virtualRes) * 2.0 - vec2(1.0); float mask = 1.0 - abs(coords.y); vec3 rasterizationColor = mix(pixelLow, pixelHigh, mask); return mix(texel, rasterizationColor, intensity); #else return texel; #endif #endif } float randomPass(vec2 coords){ return fract(smoothstep(-120.0, 0.0, coords.y - (virtualResolution.y + 120.0) * fract(time * 0.15))); } vec3 convertWithChroma(vec3 inColor) { #if CRT_CHROMA == 1 float grey = rgb2grey(inColor); float denom = max(grey, 0.0001); vec3 foregroundColor = mix(fontColor.rgb, inColor * fontColor.rgb / denom, chromaColor); return mix(backgroundColor.rgb, foregroundColor, grey); #else return mix(backgroundColor.rgb, fontColor.rgb, rgb2grey(inColor)); #endif } void main() { vec2 cc = vec2(0.5) - qt_TexCoord0; float distance = length(cc); vec2 staticCoords = distortCoordinates(qt_TexCoord0); vec2 coords = qt_TexCoord0; float dst = sin((coords.y + time) * vDistortionFreq); coords.x += dst * vDistortionScale; vec4 noiseTexel = texture(noiseSource, scaleNoiseSize * coords + vec2(fract(time / 0.051), fract(time / 0.237))); vec2 txt_coords = coords + (noiseTexel.ba - vec2(0.5)) * jitterDisplacement * jitter; float color = 0.0001; color += noiseTexel.a * staticNoise * (1.0 - distance * 1.3); color += randomPass(coords * virtualResolution) * glowingLine; #if CRT_DISPLAY_FRAME == 1 vec4 frameColor = texture(frameSource, qt_TexCoord0); color *= (1.0 - frameColor.a); #endif vec3 txt_color = texture(screenBuffer, txt_coords).rgb; float bloomScale = 1.0 + max(bloom, 0.0); txt_color *= bloomScale; #if CRT_BURN_IN == 1 vec4 txt_blur = texture(burnInSource, staticCoords); float blurDecay = clamp((time - burnInLastUpdate) * burnInTime, 0.0, 1.0); vec3 burnInColor = 0.65 * (txt_blur.rgb - vec3(blurDecay)) * (1.0 - txt_blur.a); txt_color = max(txt_color, burnInColor); #endif txt_color += vec3(color); txt_color = applyRasterization(staticCoords, txt_color, virtualResolution, rasterizationIntensity); vec3 finalColor = convertWithChroma(txt_color); float brightness = mix(1.0, vBrightness, step(0.0, flickering)); finalColor *= brightness; #if CRT_DISPLAY_FRAME == 1 finalColor = mix(finalColor, frameColor.rgb, frameColor.a); #endif fragColor = vec4(finalColor, qt_Opacity); } ================================================ FILE: app/shaders/terminal_dynamic.vert ================================================ #version 440 layout(location = 0) in vec4 qt_Vertex; layout(location = 1) in vec2 qt_MultiTexCoord0; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float time; vec4 fontColor; vec4 backgroundColor; vec2 virtualResolution; float rasterizationIntensity; float burnInLastUpdate; float burnInTime; float burnIn; float staticNoise; float screenCurvature; float glowingLine; float chromaColor; vec2 jitterDisplacement; float jitter; float horizontalSync; float horizontalSyncStrength; float flickering; vec2 scaleNoiseSize; float frameShininess; float frameSize; float bloom; }; layout(binding = 0) uniform sampler2D noiseSource; layout(location = 0) out vec2 qt_TexCoord0; layout(location = 1) out float vBrightness; layout(location = 2) out float vDistortionScale; layout(location = 3) out float vDistortionFreq; void main() { qt_TexCoord0 = qt_MultiTexCoord0; vec2 coords = vec2(fract(time / 2.048), fract(time / 1048.576)); vec4 initialNoiseTexel = texture(noiseSource, coords); vBrightness = 1.0 + (initialNoiseTexel.g - 0.5) * flickering; float randval = horizontalSyncStrength - initialNoiseTexel.r; vDistortionScale = step(0.0, randval) * randval * horizontalSyncStrength * horizontalSync; vDistortionFreq = mix(4.0, 40.0, initialNoiseTexel.g) * step(0.0, horizontalSync); gl_Position = qt_Matrix * qt_Vertex; } ================================================ FILE: app/shaders/terminal_frame.frag ================================================ #version 440 layout(location = 0) in vec2 qt_TexCoord0; layout(location = 0) out vec4 fragColor; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float screenCurvature; vec4 frameColor; float frameSize; float screenRadius; vec2 viewportSize; float ambientLight; float frameShininess; }; float min2(vec2 v) { return min(v.x, v.y); } float prod2(vec2 v) { return v.x * v.y; } float rand2(vec2 v) { return fract(sin(dot(v, vec2(12.9898, 78.233))) * 43758.5453); } vec2 distortCoordinates(vec2 coords){ vec2 paddedCoords = coords * (vec2(1.0) + frameSize * 2.0) - frameSize; vec2 cc = (paddedCoords - vec2(0.5)); float dist = dot(cc, cc) * screenCurvature; return (paddedCoords + cc * (1.0 + dist) * dist); } float roundedRectSdfPixels(vec2 p, vec2 topLeft, vec2 bottomRight, float radiusPixels) { vec2 sizePixels = (bottomRight - topLeft) * viewportSize; vec2 centerPixels = (topLeft + bottomRight) * 0.5 * viewportSize; vec2 localPixels = p * viewportSize - centerPixels; vec2 halfSize = sizePixels * 0.5 - vec2(radiusPixels); vec2 d = abs(localPixels) - halfSize; return length(max(d, vec2(0.0))) + min(max(d.x, d.y), 0.0) - radiusPixels; } void main() { vec2 staticCoords = qt_TexCoord0; vec2 coords = distortCoordinates(staticCoords); float screenRadiusPixels = screenRadius; float edgeSoftPixels = 1.0; float seamWidth = max(screenRadiusPixels, 0.5) / min2(viewportSize); float e = min( smoothstep(-seamWidth, seamWidth, coords.x - coords.y), smoothstep(-seamWidth, seamWidth, coords.x - (1.0 - coords.y)) ); float s = min( smoothstep(-seamWidth, seamWidth, coords.y - coords.x), smoothstep(-seamWidth, seamWidth, coords.x - (1.0 - coords.y)) ); float w = min( smoothstep(-seamWidth, seamWidth, coords.y - coords.x), smoothstep(-seamWidth, seamWidth, (1.0 - coords.x) - coords.y) ); float n = min( smoothstep(-seamWidth, seamWidth, coords.x - coords.y), smoothstep(-seamWidth, seamWidth, (1.0 - coords.x) - coords.y) ); float distPixels = roundedRectSdfPixels(coords, vec2(0.0), vec2(1.0), screenRadiusPixels); float frameShadow = (e * 0.66 + w * 0.66 + n * 0.33 + s); frameShadow *= smoothstep(0.0, edgeSoftPixels * 5.0, distPixels); float frameAlpha = 1.0 - frameShininess * 0.4; float inScreen = smoothstep(0.0, edgeSoftPixels, -distPixels); float alpha = mix(frameAlpha, mix(0.0, 0.3, ambientLight), inScreen); float glass = clamp(ambientLight * pow(prod2(coords * (1.0 - coords.yx)) * 25.0, 0.5) * inScreen, 0.0, 1.0); vec3 frameTint = frameColor.rgb * frameShadow; float noise = rand2(staticCoords * viewportSize) - 0.5; frameTint = clamp(frameTint + vec3(noise * 0.04), 0.0, 1.0); vec3 color = mix(frameTint, vec3(glass), inScreen); fragColor = vec4(color, alpha) * qt_Opacity; } ================================================ FILE: app/shaders/terminal_frame.vert ================================================ #version 440 layout(location = 0) in vec4 qt_Vertex; layout(location = 1) in vec2 qt_MultiTexCoord0; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float screenCurvature; vec4 frameColor; float frameSize; float screenRadius; vec2 viewportSize; float ambientLight; float frameShininess; }; layout(location = 0) out vec2 qt_TexCoord0; void main() { qt_TexCoord0 = qt_MultiTexCoord0; gl_Position = qt_Matrix * qt_Vertex; } ================================================ FILE: app/shaders/terminal_static.frag ================================================ #version 440 #ifndef CRT_RGB_SHIFT #define CRT_RGB_SHIFT 1 #endif #ifndef CRT_BLOOM #define CRT_BLOOM 1 #endif #ifndef CRT_FRAME_SHININESS #define CRT_FRAME_SHININESS 1 #endif #ifndef CRT_CURVATURE #define CRT_CURVATURE 1 #endif layout(location = 0) in vec2 qt_TexCoord0; layout(location = 0) out vec4 fragColor; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float screenCurvature; float rgbShift; float frameShininess; float frameSize; float screen_brightness; float bloom; }; layout(binding = 1) uniform sampler2D source; layout(binding = 2) uniform sampler2D bloomSource; float min2(vec2 v) { return min(v.x, v.y); } float max2(vec2 v) { return max(v.x, v.y); } float rand2(vec2 v) { return fract(sin(dot(v, vec2(12.9898, 78.233))) * 43758.5453); } vec2 distortCoordinates(vec2 coords){ vec2 paddedCoords = coords * (vec2(1.0) + frameSize * 2.0) - frameSize; vec2 cc = (paddedCoords - vec2(0.5)); float dist = dot(cc, cc) * screenCurvature; return (paddedCoords + cc * (1.0 + dist) * dist); } void main() { vec2 cc = vec2(0.5) - qt_TexCoord0; float shownDraw = 1.0; float isReflection = 0.0; float isScreen = 1.0; vec2 txt_coords = qt_TexCoord0; #if CRT_CURVATURE == 1 vec2 curvatureCoords = distortCoordinates(qt_TexCoord0); shownDraw = max2(step(vec2(0.0), curvatureCoords) - step(vec2(1.0), curvatureCoords)); isScreen = min2(step(vec2(0.0), curvatureCoords) - step(vec2(1.0), curvatureCoords)); isReflection = shownDraw - isScreen; txt_coords = curvatureCoords * (-1.0 + 2.0 * step(vec2(0.0), curvatureCoords) - 2.0 * step(vec2(1.0), curvatureCoords)); #endif vec3 txt_color = texture(source, txt_coords).rgb; #if CRT_RGB_SHIFT == 1 vec2 displacement = vec2(rgbShift, 0.0); vec3 rightColor = texture(source, txt_coords + displacement).rgb; vec3 leftColor = texture(source, txt_coords - displacement).rgb; txt_color.r = leftColor.r * 0.10 + rightColor.r * 0.30 + txt_color.r * 0.60; txt_color.g = leftColor.g * 0.20 + rightColor.g * 0.20 + txt_color.g * 0.60; txt_color.b = leftColor.b * 0.30 + rightColor.b * 0.10 + txt_color.b * 0.60; #endif vec3 finalColor = txt_color * shownDraw; vec3 bloomColor = txt_color; float bloomAlpha = 0.0; #if CRT_BLOOM == 1 || CRT_FRAME_SHININESS == 1 vec4 bloomFullColor = texture(bloomSource, txt_coords); bloomColor = bloomFullColor.rgb; bloomAlpha = bloomFullColor.a; #endif #if CRT_BLOOM == 1 vec3 bloomOnScreen = bloomColor * isScreen; finalColor += clamp(bloomOnScreen * bloom * bloomAlpha, 0.0, 0.5); float bloomScale = 1.0 + max(bloom, 0.0); finalColor /= bloomScale; #endif #if CRT_FRAME_SHININESS == 1 vec3 reflectionColor = mix(bloomColor * bloomAlpha * 2.0, finalColor, frameShininess * 0.5); finalColor = mix(finalColor, reflectionColor, isReflection); #endif finalColor *= screen_brightness; float noise = rand2(qt_TexCoord0) - 0.5; finalColor = clamp(finalColor + vec3(noise * 0.025), 0.0, 1.0); fragColor = vec4(finalColor, qt_Opacity); } ================================================ FILE: app/shaders/terminal_static.vert ================================================ #version 440 layout(location = 0) in vec4 qt_Vertex; layout(location = 1) in vec2 qt_MultiTexCoord0; layout(std140, binding = 0) uniform ubuf { mat4 qt_Matrix; float qt_Opacity; float screenCurvature; float rgbShift; float frameShininess; float frameSize; float screen_brightness; float bloom; }; layout(location = 0) out vec2 qt_TexCoord0; void main() { qt_TexCoord0 = qt_MultiTexCoord0; gl_Position = qt_Matrix * qt_Vertex; } ================================================ FILE: cool-retro-term.desktop ================================================ [Desktop Entry] Comment=Use the command line the old way Exec=cool-retro-term GenericName=Terminal emulator Icon=cool-retro-term Name=Cool Retro Term Categories=System;TerminalEmulator; StartupNotify=true Terminal=false Type=Application Keywords=shell;prompt;command;commandline; Actions=NewWindow; [Desktop Action NewWindow] Name=New Window Exec=cool-retro-term ================================================ FILE: cool-retro-term.pro ================================================ TEMPLATE = subdirs CONFIG += ordered SUBDIRS += qmltermwidget SUBDIRS += app desktop.files += cool-retro-term.desktop desktop.path += /usr/share/applications INSTALLS += desktop ================================================ FILE: gpl-2.0.txt ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ================================================ FILE: gpl-3.0.txt ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: packaging/appdata/cool-retro-term.appdata.xml ================================================ cool-retro-term.desktop MIT GPL-3.0+ Cool Retro Term Terminal emulator with an old school look and feel

cool-retro-term is a terminal emulator which tries to mimic the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight.

Default amber look https://camo.githubusercontent.com/2443e662e95733ba6ae331f391f6ec036d1ee7fd/687474703a2f2f692e696d6775722e636f6d2f4e5566766e6c752e706e67 Apple II look https://camo.githubusercontent.com/44a19842d532555c7b02bf6b4b4684add9edf18c/687474703a2f2f692e696d6775722e636f6d2f4d4d6d4d3648742e706e67 https://github.com/Swordfish90/cool-retro-term cool-retro-term

First release

================================================ FILE: packaging/debian/.gitignore ================================================ /*.debhelper.log /*.substvars /cool-retro-term/ /files ================================================ FILE: packaging/debian/changelog ================================================ cool-retro-term (0.9-1) UNRELEASED; urgency=medium * Initial release. (Closes: #758238) -- Jeka Der Fri, 10 Oct 2014 19:58:29 +0200 ================================================ FILE: packaging/debian/compat ================================================ 9 ================================================ FILE: packaging/debian/control ================================================ Source: cool-retro-term Maintainer: Jeka Der Section: x11 Priority: optional Standards-Version: 3.9.6 Homepage: https://github.com/Swordfish90/cool-retro-term Vcs-Git: git://github.com/barak/cool-retro-term.git Vcs-Browser: https://github.com/barak/cool-retro-term Build-Depends: debhelper (>= 9), qmlscene, qt5-qmake, qtdeclarative5-dev, qml-module-qtquick-controls, qml-module-qtgraphicaleffects, qml-module-qtquick-dialogs, qml-module-qtquick-localstorage, qml-module-qtquick-window2 Package: cool-retro-term Architecture: any Replaces: cool-old-term Provides: x-terminal-emulator Depends: qml-module-qtquick-controls, qml-module-qtgraphicaleffects, qml-module-qtquick-dialogs, qml-module-qtquick-localstorage, qml-module-qtquick-window2, ${shlibs:Depends}, ${misc:Depends} Description: terminal emulator which mimics old screens cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. ================================================ FILE: packaging/debian/cool-retro-term.1 ================================================ .TH "COOL-RETRO-TERM" 1 "2017-11-06" .SH NAME cool\-retro\-term \- terminal emulator mimicking an old cathode display .SH SYNOPSIS \fBcool\-retro\-term\fR [\fIOPTIONS\fR] .br \fBcool\-retro\-term\fR [\fIOPTIONS\fR] -e \fICOMMAND\fR [\fIARGUMENT\fR...] .SH DESCRIPTION This manual page documents briefly the \fBcool\-retro\-term\fR command. .PP \fBcool\-retro\-term\fR is a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. .SH OPTIONS .TP \fB\-\-default\-settings\fR Run with the default settings. .TP \fB\-e\fR \fICOMMAND\fR Command to execute. This should be used as the last option. All the arguments following \fICOMMAND\fR will be passed to said command. .TP \fB\-\-fullscreen\fR Run in fullscreen mode. .TP \fB\-h\fR, \fB\-\-help\fR Print a help screen and exit. .TP \fB\-p\fR \fIPROFILE\fR, \fB\-\-profile\fR \fIPROFILE\fR Run with the given profile. .TP \fB\-T\fR \fITITLE\fR Use \fITITLE\fR as the window title. .TP \fB\-\-verbose\fR Print additional information such as profiles and settings. .TP \fB\-v\fR, \fB\-\-version\fR Print the version number and exit. .TP \fB\-\-workdir\fR \fIDIR\fR Start with \fIDIR\fR as the working directory. .SH LICENCE This program is available under the terms of the GNU General Public License, version 3 or any later version, as published by the Free Software Foundation. ================================================ FILE: packaging/debian/copyright ================================================ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: cool-retro-term Upstream-Contact: Filippo Scognamiglio Source: https://github.com/Swordfish90/cool-retro-term Files: * Copyright: 2013-2017 Filippo Scognamiglio License: GPL-3 On Debian systems, the full text of the GNU General Public License version 3 can be found in the file `/usr/share/common-licenses/GPL-3'. ================================================ FILE: packaging/debian/rules ================================================ #!/usr/bin/make -f %: dh $@ ================================================ FILE: packaging/debian/source/format ================================================ 3.0 (quilt) ================================================ FILE: packaging/debian/watch ================================================ version=4 opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%-$1.tar.gz%" \ https://github.com/Swordfish90/cool-retro-term/tags \ (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate ================================================ FILE: packaging/rpm/cool-retro-term.spec ================================================ # # spec file for package cool-retro-term # # Copyright © 2014 Markus S. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . Name: cool-retro-term Summary: Cool Retro Terminal Version: 1.0 Release: 0%{?dist} Group: System/X11/Terminals License: GPL-3.0+ URL: https://github.com/Swordfish90/cool-retro-term # For this spec file to work, the cool-retro-term sources must be located # in a directory named cool-retro-term-0.9 (with "0.9" being the version # number defined above). # If the sources are compressed in another format than .tar.xz, change the # file extension accordingly. Source0: %{name}-%{version}.tar.xz BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5Declarative) BuildRequires: pkgconfig(Qt5Gui) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: desktop-file-utils # Package names only verified with Fedora and openSUSE. # Should the packages in your distro be named dirrerently, # see http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto %if 0%{?fedora} Requires: qt5-qtbase Requires: qt5-qtbase-gui Requires: qt5-qtdeclarative Requires: qt5-qtgraphicaleffects Requires: qt5-qtquickcontrols %endif %if 0%{?suse_version} Requires: libqt5-qtquickcontrols Requires: libqt5-qtbase Requires: libQt5Gui5 Requires: libqt5-qtdeclarative Requires: libqt5-qtgraphicaleffects %endif %description cool-retro-term is a terminal emulator which tries to mimic the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. %prep %setup -q %build qmake-qt5 make %{?_smp_mflags} %install # Work around weird qmake behaviour: http://davmac.wordpress.com/2007/02/21/qts-qmake/ make INSTALL_ROOT=%{buildroot} install desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{name}.desktop %files %defattr(-,root,root,-) %doc gpl-2.0.txt gpl-3.0.txt README.md %{_bindir}/%{name} %{_libdir}/qt5/qml/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/*/* %clean rm -rf %{buildroot} %changelog * Sun Sep 7 14:03:35 UTC 2014 - kamikazow@web.de - cool-old-term has been renamed to cool-retro-term - Ported the spec file to CRT's new, way nicer build system * Fri Aug 29 20:56:20 UTC 2014 - kamikazow@web.de - Fixed: QtDeclarative-devel is required for "qmlscene" binary * Fri Aug 1 14:09:35 UTC 2014 - kamikazow@web.de - First build - cool-old-term 0.9 ================================================ FILE: scripts/build-appimage.sh ================================================ #!/usr/bin/env bash set -euo pipefail set -x REPO_ROOT="$(readlink -f "$(dirname "$(dirname "$0")")")" OLD_CWD="$(readlink -f .)" BUILD_DIR="$REPO_ROOT/build/appimage" TOOLS_DIR="$BUILD_DIR/tools" VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)" if [ -z "$VERSION" ]; then VERSION="unknown" fi if ! command -v qmake >/dev/null; then echo "qmake not found in PATH." >&2 exit 1 fi QTDIR="$(qmake -query QT_INSTALL_PREFIX)" QT_INSTALL_QML="$(qmake -query QT_INSTALL_QML)" APPDIR="$BUILD_DIR/AppDir" mkdir -p "$BUILD_DIR" rm -rf "$APPDIR" pushd "$BUILD_DIR" qmake "$REPO_ROOT/cool-retro-term.pro" make -j"$(nproc)" # Install targets from subprojects (the top-level install only installs the desktop file). make -C app install INSTALL_ROOT="$APPDIR" make -C qmltermwidget install INSTALL_ROOT="$APPDIR" make install INSTALL_ROOT="$APPDIR" popd # Relocate QMLTermWidget into the standard AppDir QML import path. QML_ROOT="$APPDIR$QT_INSTALL_QML" if [ -d "$QML_ROOT" ]; then mkdir -p "$APPDIR/usr/qml" rsync -a "$QML_ROOT/" "$APPDIR/usr/qml/" rm -rf "$QML_ROOT" QML_PARENT="$(dirname "$QML_ROOT")" while [ "$QML_PARENT" != "$APPDIR" ] && rmdir "$QML_PARENT" 2>/dev/null; do QML_PARENT="$(dirname "$QML_PARENT")" done fi # Build AppImage using linuxdeploy and linuxdeploy-plugin-qt. mkdir -p "$TOOLS_DIR" LINUXDEPLOY="$TOOLS_DIR/linuxdeploy-x86_64.AppImage" LINUXDEPLOY_QT="$TOOLS_DIR/linuxdeploy-plugin-qt-x86_64.AppImage" if [ ! -x "$LINUXDEPLOY" ]; then wget -c -O "$LINUXDEPLOY" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod +x "$LINUXDEPLOY" fi if [ ! -x "$LINUXDEPLOY_QT" ]; then wget -c -O "$LINUXDEPLOY_QT" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage chmod +x "$LINUXDEPLOY_QT" fi export QML_SOURCES_PATHS="$REPO_ROOT/app" pushd "$BUILD_DIR" export EXTRA_PLATFORM_PLUGINS="libqwayland.so;" export EXTRA_QT_MODULES="sql;waylandcompositor;waylandclient" export DEPLOY_PLATFORM_THEMES=true export LINUXDEPLOY_EXCLUDED_LIBRARIES="libmysqlclient.so;libqsqlmimer.so;libqsqlmysql.so;libqsqlodbc.so;libqsqlpsql.so;libqsqloci.so;libqsqlibase.so" "$LINUXDEPLOY" \ --appdir "$APPDIR" \ -e "$APPDIR/usr/bin/cool-retro-term" \ -i "$REPO_ROOT/app/icons/256x256/cool-retro-term.png" \ -d "$REPO_ROOT/cool-retro-term.desktop" \ --plugin qt \ --output appimage APPIMAGE_PATH="$(ls -1 ./*.AppImage | head -n 1)" APPIMAGE_OUT="cool-retro-term-${VERSION}.AppImage" mv "$APPIMAGE_PATH" "$OLD_CWD/$APPIMAGE_OUT" popd ================================================ FILE: scripts/build-dmg.sh ================================================ #!/usr/bin/env bash set -euo pipefail set -x REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" OLD_CWD="$(pwd -P)" BUILD_DIR="$REPO_ROOT/build/dmg" APP="cool-retro-term.app" QML_DIR="$REPO_ROOT/app/qml" JOBS="${JOBS:-$(sysctl -n hw.ncpu 2>/dev/null || echo 4)}" VERSION="$(git -C "$REPO_ROOT" describe --tags --always --dirty=-dirty 2>/dev/null || true)" if [ -z "$VERSION" ]; then VERSION="unknown" fi if ! command -v qmake >/dev/null; then echo "qmake not found in PATH." >&2 exit 1 fi QT_DIR="${QT_DIR:-$(qmake -query QT_INSTALL_PREFIX)}" QT_BIN="${QT_DIR%/}/bin" mkdir -p "$BUILD_DIR" rm -f "$BUILD_DIR/${APP%.app}.dmg" pushd "$BUILD_DIR" "$QT_BIN/qmake" CONFIG+=release "$REPO_ROOT/cool-retro-term.pro" make -j"$JOBS" PLUGIN_DST="$APP/Contents/PlugIns/qmltermwidget" rm -rf "$PLUGIN_DST" mkdir -p "$APP/Contents/PlugIns" cp -R qmltermwidget/QMLTermWidget "$PLUGIN_DST" export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns" "$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR" rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true # Remove stale signatures and ad-hoc sign so Gatekeeper doesn't report corruption. codesign --remove-signature "$APP" 2>/dev/null || true rm -rf "$APP/Contents/_CodeSignature" codesign --force --deep --sign - "$APP" DMG_OUT="${APP%.app}-${VERSION}.dmg" hdiutil create -volname "${APP%.app}" -srcfolder "$APP" -ov -format UDZO "$DMG_OUT" mv "$BUILD_DIR/$DMG_OUT" "$OLD_CWD/$DMG_OUT" popd ================================================ FILE: scripts/list_glyph_counts.py ================================================ #!/usr/bin/env python3 """ Print glyph counts for all font files under app/qml/fonts. Requires fontTools (already available in this environment). """ from pathlib import Path from fontTools.ttLib import TTFont def count_glyphs(font_path: Path) -> int: """Return the number of glyphs in the font.""" with TTFont(str(font_path), lazy=False, fontNumber=0) as font: return len(font.getGlyphOrder()) def main() -> None: fonts_root = Path(__file__).resolve().parents[1] / "app" / "qml" / "fonts" font_files = sorted( p for p in fonts_root.rglob("*") if p.suffix.lower() in {".ttf", ".otf", ".otb"} ) if not font_files: print(f"No font files found under {fonts_root}") return for font_path in font_files: rel = font_path.relative_to(fonts_root.parent.parent) try: count = count_glyphs(font_path) print(f"{rel}: {count} glyphs") except Exception as exc: # noqa: BLE001 print(f"{rel}: error reading font ({exc})") if __name__ == "__main__": main() ================================================ FILE: snap/snapcraft.yaml ================================================ name: cool-retro-term # check to see if it's available version: '1.1.1' # this is freakin' awesome summary: cool-retro-term is a cool and retro terminal emulator. # 79 char long summary description: | cool-retro-term is a terminal emulator which mimics the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight. grade: stable # must be 'stable' to release into candidate/stable channels confinement: classic # use 'strict' once you have the right plugs base: core18 apps: cool-retro-term: command: bin/desktop-launch $SNAP/usr/bin/cool-retro-term desktop: usr/share/applications/cool-retro-term.desktop environment: QML2_IMPORT_PATH: $SNAP/usr/lib/x86_64-linux-gnu/qt5/qml parts: desktop-qt5: source: https://github.com/ubuntu/snapcraft-desktop-helpers.git source-subdir: qt plugin: make make-parameters: ["FLAVOR=qt5"] build-packages: - build-essential - qtbase5-dev - dpkg-dev stage-packages: - libxkbcommon0 - ttf-ubuntu-font-family - dmz-cursor-theme - light-themes - adwaita-icon-theme - gnome-themes-standard - shared-mime-info - libqt5gui5 - libgdk-pixbuf2.0-0 - libqt5svg5 # for loading icon themes which are svg - try: [appmenu-qt5] # not available on core18 - locales-all - xdg-user-dirs - fcitx-frontend-qt5 my-part: source: https://github.com/Swordfish90/cool-retro-term source-type: git plugin: qmake # See 'snapcraft plugins' qt-version: qt5 after: [desktop-qt5] build-packages: - build-essential - qmlscene - qt5-qmake - qt5-default - qtdeclarative5-dev stage-packages: - qmlscene - qml-module-qtquick-controls - qml-module-qtquick2 - qml-module-qtgraphicaleffects - qml-module-qtquick-dialogs - qml-module-qtquick-localstorage - qml-module-qtquick-window2 - libgl1-mesa-dev - qtdeclarative5-dev-tools - qml-module-qtquick-extras - qml-module-qt-labs-settings - qml-module-qt-labs-folderlistmodel