Skip to content

TysonCoding/acode-plugin-terminaleX

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AcodeX - Terminal Emulator

Warning This plugin requires the acodex-server NodeJS package to be installed and running on Termux.

AcodeX is a powerful plugin for Acode that enhances your coding productivity by adding in-app Termux terminal integration. With AcodeX, you can execute terminal commands directly from within the Acode app, eliminating the need to switch between apps for coding and terminal access.

Note When starting a new terminal, be sure to adjust the terminal panel according to your screen. You can drag it to your desired position, and it will automatically adjust the columns and rows according to your screen size.

Buy Me A Coffee

Buy Me a Coffee at ko-fi.com

Support this project with your small contribution - Click Me πŸ’—

Update v3.0.0 & v3.0.1

  • fixed #38 in v3.0.1

  • no need to update the acodeX-server

  • updated xtermjs and its addons

  • added a fontWeight option in plugin settings

  • added a cursorInactiveStyle option in plugin settings

  • internal changes and improvement

  • fixed transparent terminal Bug

  • fixed resizing issue

  • fixed minimising and maximising issue

  • added a setting to change show terminal button/maximise button size from plugin settings

  • fixed settings page issue

  • now no any need of restarting terminal after changing its settings (except: transparency option and scroll option)

  • added some additional keybindings for terminal for easy usability(read Additional Keybindings section in description for more)


For previous change logs/updates, visit: Change Log

πŸ’₯ Features

  • User-Friendly Terminal: AcodeX provides a seamless terminal experience within Acode. You can open the terminal panel with a simple Ctrl+K shortcut or by searching for "Open Terminal" in the command palette.

  • Enhanced Productivity: With AcodeX, developers can save time by executing commands directly within Acode, eliminating the need to switch between multiple applications.

  • Customizable Terminal Panel: The terminal panel in AcodeX is fully customizable. You can easily move, resize, minimize, or maximize it to suit your workflow.

  • Intuitive Interface: AcodeX offers an intuitive and user-friendly interface suitable for developers of all skill levels.

  • Tailored to Your Preferences: Customize the AcodeX terminal to match your personal preferences, making it your own.

  • Efficient Session Management: Create and manage multiple sessions efficiently, minimizing resource consumption and power usage.

  • Background Persistence: AcodeX ensures that your terminal session stays active even if you close Acode. When you reopen Acode, you can continue seamlessly without interruption.

  • Easy Directory Navigation: Navigate to any folder with a simple button click, simplifying directory changes.

  • Beautiful Themes: AcodeX comes with a selection of stunning themes (10+) to personalize your coding environment.

  • Transparency Options: Customize the terminal panel's transparency to your liking, adding a touch of visual elegance to your workspace.

  • Nerd Fonts Support: Preloaded with a collection of Nerd Fonts and the ability to load your own custom fonts, ensuring your terminal looks and feels the way you want.

  • Keyboard Shortcuts: Perform mouse-like tasks using keyboard shortcuts, streamlining your workflow and boosting efficiency.

  • Extensible: AcodeX is highly pluggable, allowing other plugins to harness its API for creating innovative extensions and enhancing functionality.

Prerequisites

To use AcodeX, you need to have the Termux app installed on your Android device. However, you don't need to switch between apps to use the terminal, as AcodeX offers a convenient way to access the terminal directly within the Acode app with the help of Termux.

Installation

  1. Install the plugin in the Acode App from Acode > Settings > Plugins > AcodeX.

  2. Install the server in Termux using the following command:

curl -sL https://raw.githubusercontent.com/bajrangCoder/acode-plugin-acodex/main/installServer.sh | bash

or

pkg update && pkg upgrade -y pkg install python nodejs -y npm i -g acodex-server

Basically just install python & nodejs and then just install acodex-server npm package globally

Note: You can uninstall python after successful installation of acodex-server

How to Use

Tutorial link: https://youtu.be/sXlIhrbpjyw

  • Start the server in Termux using: acodeX-server.
  • To use AcodeX, press Ctrl+K or search for "Open Terminal" in the command palette (press Ctrl+Shift+P to open the command palette).
  • Enter the port number, and the terminal will start.
  • Plus + icon to create new session
  • Use the minus icon button to hide the terminal while coding and the terminal button to show it.
  • You can also drag the terminal panel around by clicking and dragging through the terminal header area.
  • The βœ— button is for closing the terminal.
  • The folder icon button on the terminal header is for navigating to opened files (in the editor) directory.

API Docs

const termController = acode.require("acodex");

Methods:

  1. .execute(command): Execute the given command in the terminal.
  2. .isMinimized(): Check if the terminal is minimized.
  3. .isTerminalOpened(): Check if the terminal is opened.
  4. .maximizeTerminal(): Maximize the terminal if it's minimized.
  5. .openTerminal(termContainerHeight, port): Open a new terminal (both termContainerHeight and port are optional).
  6. .createSession(): creates a sessionif terminal is opened
  7. .closeTerminal(): Close the opened terminal.
  8. .convertAcodeUriToTermReadable(path): Convert Acode file URI to an actual path.
  9. .addTheme(themeName: string, colorSchema: IXtermTheme): Add a new theme to AcodeX's theme list.
  10. .applyTheme(themeName: string): Apply the given theme to the terminal.

Example of addTheme & applyTheme:

const acodex = acode.require("acodex"); const themeName = "Test"; // name of theme const colorSchema = { // Theme colors here, you can find colors in themes.js } // Add theme acodex.addTheme(themeName, colorSchema); // Apply theme  acodex.applyTheme(themeName);

Custom Fonts

Custom fonts are provided to load any other external fonts

To load a custom font:

  1. Download the font files(Note: Download nerd font file in case if you are loading for termux theme).
  2. Create a css file anywhere in the internal storage.
  3. Write CSS code to load font files using relative URLs in the CSS, for example:
@font-face { font-family: "MesloLGS NF Regular"; src: url("./MesloLGS NF Regular.ttf") format("truetype"); font-weight: normal; font-style: normal; }
  1. Open AcodeX Settings page and find the option "Custom Font StyleSheet".
  2. Select your CSS file created in step 3.
  3. Enter the font name in the Font Family option.
  4. Restart the terminal.

Additional Terminal Keybindings

AcodeX provides some additional Keybindings for easy usability of terminal features.

Note: These keybindings will only work if you will use these inside terminal only.

Following are the supported Keybindings :

  • Ctrl+N : opens a new terminal session
  • Ctrl+W : close opened terminal session
  • Ctrl+V : paste something from clipboard inside your terminal
  • Ctrl+Left Arrow : open previous session corresponding to current one like if current one is session 2 then it will open session 1(if exists)
  • Ctrl+Right Arrow : open next session corresponding to current one like if current one is session 2 then it will open session 2(if exists)
  • Ctrl+1 : opens session 1
  • Ctrl+2 : opens session 2 if exists
  • Ctrl+3 : opens session 3 if exists
  • Ctrl+4 : opens session 4 if exists
  • Ctrl+5 : opens session 5 if exists

Acknowledgments

AcodeX is made possible by the use of:

Authors

πŸš€ Feature Requests

We welcome your suggestions for enhancing AcodeX. If you have an idea for a new feature or improvement, please consider opening a feature request on our GitHub Issues page. Be sure to provide detailed information about the feature you'd like to see, along with any use cases or scenarios that could benefit from it.

🐞 Bug Reports

If you encounter any issues or unexpected behavior while using AcodeX, please help us by reporting the problem. To report a bug, visit our GitHub Issues page and create a new issue. Please include the following information in your bug report:

  • A clear and concise description of the issue.
  • Steps to reproduce the problem.
  • Information about your environment, including your operating system and AcodeX version.
  • Screenshots or error messages, if applicable.

πŸš€ Contribute to AcodeX

Your contributions are highly appreciated and welcome! You can contribute to the AcodeX Plugin in various ways:

πŸ‘¨β€πŸ’» Contribute Code

  1. Fork the Repository: Start by forking the AcodeX Plugin repository

  2. Create an Issue: If you plan to add new features or fix a bug, it's a good practice to create an issue first. Describe the problem or feature you want to work on. This allows for discussion and collaboration with the maintainers.

  3. Make Changes: After forking the repo, create a new branch, and start working on your changes.

  4. Open a Pull Request: Once your changes are ready, open a pull request (PR) on the original repository. Reference the issue you created if relevant.

  5. Code Review: Your PR will be reviewed by the maintainers, and feedback may be provided. Be prepared to make adjustments if needed.

  6. Merge: Once your PR is approved, it will be merged into the main branch. Congratulations, your contribution is now part of AcodeX Plugin!

Steps to setup AcodeX locally

  1. Fork it and Clone the repo
git clone https://github.com/bajrangCoder/acode-plugin-acodex.git
  1. navigate to acodex directory and install the dependency
pnpm install
  1. For building the plugin zip
pnpm build

Warning You will need acodex-server NodeJS package to be installed and running on Termux to test the plugin.

πŸ’° Contribute Financially

You can also support the development of AcodeX Plugin by making a financial contribution. Donations help in maintenance and further development.

Buy Me A Coffee

Buy Me a Coffee at ko-fi.com

⭐ Star on GitHub

If you find AcodeX Plugin useful, consider giving it a star on GitHub. It's a simple way to show your appreciation and help others discover the project. and You can review AcodeX on https://acode.app

Your contributions, whether through code, financial support, or a simple star, make AcodeX Plugin better for the entire community. Thank you for your support!

License

MIT

❀️❀️ Thanks for using AcodeX ❀️❀️

About

TerminaleX is a plugin for the Acode app that adds terminal support, making coding more productive and efficient.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.5%
  • SCSS 7.0%
  • Shell 0.5%