mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2026-02-27 05:33:24 +00:00
Compare commits
5 Commits
fix/action
...
rolling
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d9dd54db6 | ||
|
|
0269a333b1 | ||
|
|
fe92fa7330 | ||
|
|
eba69d3a54 | ||
|
|
403bb11e7e |
55
.github/workflows/build-appimage.yml
vendored
55
.github/workflows/build-appimage.yml
vendored
@@ -1,55 +0,0 @@
|
||||
name: Build AppImage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-appimage:
|
||||
name: Build (Linux, AppImage)
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
attestations: write
|
||||
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: Attestation
|
||||
uses: actions/attest-build-provenance@v1
|
||||
with:
|
||||
subject-path: ./release/*
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cool-retro-term-appimage
|
||||
path: ./release/*
|
||||
51
.github/workflows/build-dmg.yml
vendored
51
.github/workflows/build-dmg.yml
vendored
@@ -1,51 +0,0 @@
|
||||
name: Build DMG
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-dmg:
|
||||
name: Build (macOS, DMG)
|
||||
runs-on: macos-14
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
attestations: write
|
||||
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: Attestation
|
||||
uses: actions/attest-build-provenance@v1
|
||||
with:
|
||||
subject-path: ./release/*
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cool-retro-term-dmg
|
||||
path: ./release/*
|
||||
129
.github/workflows/release.yml
vendored
Normal file
129
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
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/*
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <QQmlContext>
|
||||
#include <QStringList>
|
||||
|
||||
#include <QDir>
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QIcon>
|
||||
#include <QQuickStyle>
|
||||
@@ -125,7 +127,7 @@ int main(int argc, char *argv[])
|
||||
engine.rootContext()->setContextProperty("defaultCmd", command);
|
||||
engine.rootContext()->setContextProperty("defaultCmdArgs", commandArgs);
|
||||
|
||||
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", "$HOME"));
|
||||
engine.rootContext()->setContextProperty("workdir", getNamedArgument(args, "--workdir", QDir::currentPath()));
|
||||
engine.rootContext()->setContextProperty("fileIO", &fileIO);
|
||||
|
||||
// Manage import paths for Linux and OSX.
|
||||
|
||||
@@ -40,6 +40,7 @@ Item{
|
||||
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
|
||||
@@ -49,14 +50,18 @@ Item{
|
||||
target: copyAction
|
||||
|
||||
onTriggered: {
|
||||
kterminal.copyClipboard()
|
||||
if (terminalContainer.isActive) {
|
||||
kterminal.copyClipboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: pasteAction
|
||||
|
||||
onTriggered: {
|
||||
kterminal.pasteClipboard()
|
||||
if (terminalContainer.isActive) {
|
||||
kterminal.pasteClipboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ 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
|
||||
@@ -44,6 +45,7 @@ ShaderTerminal {
|
||||
PreprocessedTerminal {
|
||||
id: terminal
|
||||
anchors.fill: parent
|
||||
isActive: mainShader.isActive
|
||||
onSessionFinished: mainShader.sessionFinished()
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ Item {
|
||||
model: tabsModel
|
||||
TerminalContainer {
|
||||
property bool shouldHaveFocus: terminalWindow.active && StackLayout.isCurrentItem
|
||||
isActive: StackLayout.isCurrentItem
|
||||
onShouldHaveFocusChanged: {
|
||||
if (shouldHaveFocus) {
|
||||
activate()
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*******************************************************************************/
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Window 2.1
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
|
||||
import "menus"
|
||||
|
||||
@@ -114,9 +114,60 @@ ApplicationWindow {
|
||||
Action {
|
||||
id: newTabAction
|
||||
text: qsTr("New Tab")
|
||||
shortcut: appSettings.isMacOS ? StandardKey.AddTab : "Ctrl+Shift+T"
|
||||
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
|
||||
|
||||
@@ -28,6 +28,7 @@ MenuBar {
|
||||
title: qsTr("File")
|
||||
MenuItem { action: newWindowAction }
|
||||
MenuItem { action: newTabAction }
|
||||
MenuItem { action: closeTabAction }
|
||||
MenuSeparator { }
|
||||
MenuItem { action: quitAction }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user