Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0334417
feat: terminal frontend
bajrangCoder Jul 8, 2025
39b1734
feat: image, ligature support and multiple fixes
bajrangCoder Jul 8, 2025
58a6cbb
feat: use acode quicktools search for terminal
bajrangCoder Jul 8, 2025
d9f292d
fix: resize issue
bajrangCoder Jul 8, 2025
4c65dd2
feat: install and setup terminal automatically for first time
bajrangCoder Jul 8, 2025
09d963b
feat: keybindings for copy and paste
bajrangCoder Jul 8, 2025
1b0a5e1
terminal backup-restore
RohitKushvaha01 Jul 9, 2025
fe9d32a
improve the installation of terminal
bajrangCoder Jul 9, 2025
1880da5
fix: app keybindings to work in terminal tabs
bajrangCoder Jul 9, 2025
a4830d7
feat: add ctrl-c keybindings to terminate program
bajrangCoder Jul 9, 2025
b4a80c7
improved color schemes and added more
bajrangCoder Jul 9, 2025
d316f88
fix: settings order
bajrangCoder Jul 9, 2025
10cd3b0
feat: add terminal icon
bajrangCoder Jul 9, 2025
bb9075e
feat: add translations strings for terminal related stuffs
bajrangCoder Jul 10, 2025
fcbb923
feat: add `Ctrl-Backtick` keybindings and option in cmd palette
bajrangCoder Jul 10, 2025
e1a2703
feat: implement xterm touch selection with menu, fix resize issue
bajrangCoder Jul 11, 2025
998b6f7
fix. backup-restore + added docs
RohitKushvaha01 Jul 12, 2025
05d3268
fix: handle shift when taping over it
bajrangCoder Jul 12, 2025
ba3d542
fix: added figer offset to clearly view the line while selection drag…
bajrangCoder Jul 12, 2025
8b39291
fix: keybindings issue in terminal(nano)
bajrangCoder Jul 12, 2025
d010a98
feat: add backup and restore option on terminal settings page
bajrangCoder Jul 12, 2025
0d49ec3
feat: add zoom in/out with gesture + keybindings
bajrangCoder Jul 12, 2025
1ed9c51
feat: Auto-select word on starting touch selection(if available)
bajrangCoder Jul 12, 2025
ef28fbe
fix. main thread freeze when using executor
RohitKushvaha01 Jul 13, 2025
a00ed69
fix. backup-restore
RohitKushvaha01 Jul 13, 2025
a6e0f50
format
RohitKushvaha01 Jul 13, 2025
96da7cd
downgrade cordova version
RohitKushvaha01 Jul 13, 2025
b6b39ed
fix: weird selection behaviour in case of keyboard focus/blur
bajrangCoder Jul 14, 2025
d852c8c
feat: show loader when backup/restore
bajrangCoder Jul 14, 2025
3454680
use latest axs instead of specific version
bajrangCoder Jul 14, 2025
574d56d
feat: handle process exit
bajrangCoder Jul 14, 2025
f1f3fea
fix
bajrangCoder Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 84 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"cordova-plugin-websocket": {},
"cordova-plugin-buildinfo": {},
"com.foxdebug.acode.rk.exec.proot": {},
"cordova-plugin-system": {},
"com.foxdebug.acode.rk.exec.terminal": {}
},
Expand Down Expand Up @@ -63,8 +64,9 @@
"@types/url-parse": "^1.4.11",
"autoprefixer": "^10.4.19",
"babel-loader": "^9.1.3",
"com.foxdebug.acode.rk.exec.proot": "file:src/plugins/proot",
"com.foxdebug.acode.rk.exec.terminal": "file:src/plugins/terminal",
"cordova-android": "13.0.0",
"cordova-android": "^13.0.0",
"cordova-clipboard": "^1.3.0",
"cordova-plugin-advanced-http": "^3.3.1",
"cordova-plugin-browser": "file:src/plugins/browser",
Expand Down Expand Up @@ -95,6 +97,14 @@
"dependencies": {
"@deadlyjack/ajax": "^1.2.6",
"@ungap/custom-elements": "^1.3.0",
"@xterm/addon-attach": "^0.11.0",
"@xterm/addon-fit": "^0.10.0",
"@xterm/addon-image": "^0.8.0",
"@xterm/addon-search": "^0.15.0",
"@xterm/addon-unicode11": "^0.8.0",
"@xterm/addon-web-links": "^0.11.0",
"@xterm/addon-webgl": "^0.18.0",
"@xterm/xterm": "^5.5.0",
"autosize": "^6.0.1",
"cordova": "12.0.0",
"core-js": "^3.37.1",
Expand Down
8 changes: 8 additions & 0 deletions src/ace/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,14 @@ const commands = [
},
readOnly: true,
},
{
name: "openTerminal",
description: "Open Terminal",
exec() {
acode.exec("new-terminal");
},
readOnly: true,
},
];

export function setCommands(editor) {
Expand Down
22 changes: 22 additions & 0 deletions src/components/terminal/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Terminal Components Export
*/

import TerminalComponent from "./terminal";
import { DEFAULT_TERMINAL_SETTINGS } from "./terminalDefaults";
import TerminalManager from "./terminalManager";
import TerminalThemeManager from "./terminalThemeManager";

export {
TerminalComponent,
TerminalManager,
TerminalThemeManager,
DEFAULT_TERMINAL_SETTINGS,
};

export default {
TerminalComponent,
TerminalManager,
TerminalThemeManager,
DEFAULT_TERMINAL_SETTINGS,
};
102 changes: 102 additions & 0 deletions src/components/terminal/ligatures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// pretty basic ligature implementation for webview
export default class LigaturesAddon {
constructor(options = {}) {
// fallback ligatures if a font does not support ligatures natively
this._fallbackLigatures =
options.fallbackLigatures ||
[
"<--",
"<---",
"<<-",
"<-",
"->",
"->>",
"-->",
"--->",
"<==",
"<===",
"<<=",
"<=",
"=>",
"=>>",
"==>",
"===>",
">=",
">>=",
"<->",
"<-->",
"<--->",
"<---->",
"<=>",
"<==>",
"<===>",
"<====>",
"<~~",
"<~",
"~>",
"~~>",
"::",
":::",
"==",
"!=",
"===",
"!==",
":=",
":-",
":+",
"<*",
"<*>",
"*>",
"<|",
"<|>",
"|>",
"+:",
"-:",
"=:",
":>",
"++",
"+++",
"<!--",
"<!---",
"<***>",
].sort((a, b) => b.length - a.length);
this._characterJoinerId = undefined;
this._terminal = undefined;
}

activate(terminal) {
this._terminal = terminal;
this._characterJoinerId = terminal.registerCharacterJoiner(
this._joinCharacters.bind(this),
);
terminal.element.style.fontFeatureSettings = `"liga" on, "calt" on`;
}

dispose() {
if (this._characterJoinerId !== undefined) {
this._terminal?.deregisterCharacterJoiner(this._characterJoinerId);
this._characterJoinerId = undefined;
}
if (this._terminal?.element) {
this._terminal.element.style.fontFeatureSettings = "";
}
}

_joinCharacters(text) {
return this._findLigatureRanges(text, this._fallbackLigatures);
}

_findLigatureRanges(text, ligatures) {
const ranges = [];
for (let i = 0; i < text.length; i++) {
for (const ligature of ligatures) {
if (text.startsWith(ligature, i)) {
ranges.push([i, i + ligature.length]);
i += ligature.length - 1;
break;
}
}
}
return ranges;
}
}
Loading