1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2026-02-08 00:32:27 +00:00

6 Commits

Author SHA1 Message Date
Filippo Scognamiglio
77434e463e Fix github workflows. 2026-01-19 01:12:56 +01:00
Filippo Scognamiglio
6bcb54114d Update the readme to mention Qt6 instead of Qt5. 2026-01-19 00:50:13 +01:00
Filippo Scognamiglio
09f813a7e0 Fix terminal size not displayed when resizing. 2026-01-19 00:13:45 +01:00
Filippo Scognamiglio
a6a7768e42 Add version to build packages. 2026-01-19 00:13:15 +01:00
Filippo Scognamiglio
33878dae24 Bump QMLTermWidget version to 2.0. 2026-01-17 22:15:18 +01:00
Filippo Scognamiglio
0313a00b4f Move showMenuBar toggle inside advanced settings. 2026-01-17 22:09:29 +01:00
14 changed files with 52 additions and 54 deletions

View File

@@ -11,8 +11,13 @@ jobs:
build-appimage:
name: Build (Linux, AppImage)
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build deps
run: |
@@ -24,7 +29,7 @@ jobs:
with:
version: 6.10.0
dir: ..
modules: qtwayland qtshadertools
modules: qtshadertools
setup-python: false
cache: true

View File

@@ -11,15 +11,21 @@ jobs:
build-dmg:
name: Build (macOS, DMG)
runs-on: macos-14
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.10.*
modules: qtshadertools
setup-python: false
setup-python: true
python-version: '3.11'
cache: true
- name: Build DMG

View File

@@ -10,7 +10,7 @@ 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 Qt5. It's suggested that you stick to the latest LTS version.
This terminal emulator works under Linux and macOS and requires Qt6.
Settings such as colors, fonts, and effects can be accessed via context menu.

View File

@@ -22,12 +22,12 @@ import QtQuick 2.2
import QtQuick.Controls 2.0
import QtQml
import QMLTermWidget 1.0
import QMLTermWidget 2.0
import "menus"
import "utils.js" as Utils
Item{
Item {
id: preprocessedTerminal
signal sessionFinished()

View File

@@ -28,7 +28,7 @@ ColumnLayout {
GroupBox {
Layout.fillWidth: true
Layout.fillHeight: true
title: qsTr("Command")
title: qsTr("Miscellaneous")
padding: appSettings.defaultMargin
ColumnLayout {
@@ -39,12 +39,6 @@ ColumnLayout {
checked: appSettings.useCustomCommand
onCheckedChanged: appSettings.useCustomCommand = checked
}
// Workaround for QTBUG-31627 for pre 5.3.0
Binding {
target: useCustomCommand
property: "checked"
value: appSettings.useCustomCommand
}
TextField {
id: customCommand
Layout.fillWidth: true
@@ -59,26 +53,18 @@ ColumnLayout {
Component.onCompleted: settings_window.closing.connect(
saveSetting)
}
}
}
GroupBox {
title: qsTr("Cursor")
Layout.fillWidth: true
Layout.fillHeight: true
padding: appSettings.defaultMargin
ColumnLayout {
anchors.fill: parent
CheckBox {
id: blinkingCursor
text: qsTr("Blinking Cursor")
checked: appSettings.blinkingCursor
onCheckedChanged: appSettings.blinkingCursor = checked
}
Binding {
target: blinkingCursor
property: "checked"
value: appSettings.blinkingCursor
CheckBox {
id: showMenubar
text: qsTr("Show Menubar")
enabled: !appSettings.isMacOS
checked: appSettings.showMenubar
onCheckedChanged: appSettings.showMenubar = checked
}
}
}

View File

@@ -21,15 +21,13 @@ import QtQuick 2.2
Rectangle {
property size terminalSize
property real topOpacity: 0.6
property real topOpacity: 0.5
width: textSize.width * 2
height: textSize.height * 2
radius: 5
border.width: 2
border.color: "white"
color: "black"
opacity: sizetimer.running ? 0.6 : 0.0
opacity: sizetimer.running ? 0.5 : 0.0
Behavior on opacity {
NumberAnimation {

View File

@@ -20,16 +20,16 @@
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"
readonly property size terminalSize: stack.currentItem ? stack.currentItem.terminalSize : Qt.size(0, 0)
property alias currentIndex: tabBar.currentIndex
readonly property int count: tabsModel.count
property var hostWindow
property size terminalSize: Qt.size(0, 0)
function normalizeTitle(rawTitle) {
if (rawTitle === undefined || rawTitle === null) {
@@ -45,7 +45,7 @@ Item {
function closeTab(index) {
if (tabsModel.count <= 1) {
hostWindow.close()
terminalWindow.close()
return
}
@@ -132,10 +132,20 @@ Item {
TerminalContainer {
id: terminalContainer
hasFocus: terminalWindow.active && StackLayout.isCurrentItem
onTerminalSizeChanged: updateTerminalSize()
onTitleChanged: tabsModel.setProperty(index, "title", normalizeTitle(title))
Layout.fillWidth: true
Layout.fillHeight: true
onSessionFinished: tabsRoot.closeTab(index)
function updateTerminalSize() {
// Every tab will have the same size so we can simply take the first one.
if (index == 0) {
tabsRoot.terminalSize = terminalSize
}
}
}
}
}

View File

@@ -73,7 +73,6 @@ ApplicationWindow {
id: terminalTabs
width: parent.width
height: (parent.height + Math.abs(y))
hostWindow: terminalWindow
}
Loader {
anchors.centerIn: parent

View File

@@ -52,15 +52,6 @@ QtObject {
sourceComponent: OSXMenu { }
}
property Action showMenubarAction: Action {
text: qsTr("Show Menubar")
enabled: !appSettings.isMacOS
shortcut: "Ctrl+Shift+M"
checkable: true
checked: appSettings.showMenubar
onTriggered: appSettings.showMenubar = !appSettings.showMenubar
}
property Action fullscreenAction: Action {
text: qsTr("Fullscreen")
enabled: !appSettings.isMacOS

View File

@@ -64,10 +64,6 @@ Menu {
action: fullscreenAction
visible: fullscreenAction.enabled
}
MenuItem {
action: showMenubarAction
visible: showMenubarAction.enabled
}
MenuItem {
action: zoomInAction
}

View File

@@ -56,10 +56,6 @@ MenuBar {
action: fullscreenAction
visible: fullscreenAction.enabled
}
MenuItem {
action: showMenubarAction
visible: showMenubarAction.enabled
}
MenuItem {
action: zoomInAction
}

View File

@@ -6,6 +6,10 @@ 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
@@ -73,5 +77,7 @@ export LINUXDEPLOY_EXCLUDED_LIBRARIES="libmysqlclient.so;libqsqlmimer.so;libqsql
--plugin qt \
--output appimage
mv ./*.AppImage "$OLD_CWD"
APPIMAGE_PATH="$(ls -1 ./*.AppImage | head -n 1)"
APPIMAGE_OUT="cool-retro-term-${VERSION}.AppImage"
mv "$APPIMAGE_PATH" "$OLD_CWD/$APPIMAGE_OUT"
popd

View File

@@ -8,6 +8,10 @@ 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
@@ -32,5 +36,6 @@ export QML_IMPORT_PATH="$PWD/$APP/Contents/PlugIns"
"$QT_BIN/macdeployqt" "$APP" -qmldir="$QML_DIR" -dmg
rm -f "$APP/Contents/PlugIns/sqldrivers/"libqsql{odbc,psql,mimer}.dylib 2>/dev/null || true
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/"
DMG_OUT="${APP%.app}-${VERSION}.dmg"
mv "$BUILD_DIR/${APP%.app}.dmg" "$OLD_CWD/$DMG_OUT"
popd