Python script that utilizes the pywebview
library to which gives the user the ability to manage Terminal profiles using drag-and-drop
style, a
hacky fix for issue #8914
.
The script "intelligently" reads the settings file of the Terminal app to retrieve the existing profiles and allows the user to reorder them. The modified profiles are then saved back to the settings file. Since terminal watches this file, it will reload the profiles automagically!
- Drag and drop profiles to reorder them, and save the new order to the settings file.
- Intelligently read settings from
[...]AppData/Local[...]/settings.json
folder irrespective of user name or depend on any static paths. - Color theme matched to Windows Terminal dark mode.
- Edit/extend logic using simple Python code and change GUI using HTML and CSS.
- jQuery, jQuery-UI and Bootstrap 5 used for GUI.
- Hidden profiles explicitly dimmed.
Before running the script, you will be required to:
- Install Python 3.10 or higher (lower versions may work, you can try and report) 3.9 works as reported by @bamboo
- While the program is self sufficient to install dependencies, you can install them manually using
pip install -r requirements.txt
in the project directory. Please note Dotnet is shipped with many applications, you may already have it installed. so just try running the script first. winget
package manager for installing dotnet on the fly. If you don't havewinget
get it from here, else you can directly install official dotnet from here (skipping winget).
To use the PowerShell Manager script, follow these steps:
- Try running
launcher.pyw
if you have completed the setup else runlauncher.cmd
which launches in terminal and attempts installing dependencies, pressy
to install. - Now you can try double clicking
launcher.pyw
. - The app will now open in a mini window (like the intro image of this repo) displaying the profiles in the same order as your previous settings.
- Reorder the profiles by dragging and dropping them, just like you would with browser tabs.
- Click the "Save" button to save the new profile order to the settings file. And changes will be reflected instantly!
- Use
install-in-terminal.py
to install it right in terminal!
The Profile Manager script includes the following configuration options:
width
andheight
: Set the width and height of the window displayed by thewebview
library.debug
: Set to True to enable debug mode forwebview
.- Styles have been kept similar to Windows Terminal, also you can change the styles in the
assets/styles.css
file.
- Double click to launch profile
- Add a "New" button to create a new profile
- Show/Hide Toggle button
- Delete Profile button
- Add a "Rename"/"edit" button to for seamless experience.
- Add custom icons from flaticons or other vector icons site, using URL or local file path.
pythonnet
has some strange issue, when i tried to rip it to exe file usingpy2exe
, it was not working, and usingpyinstaller
had partial success. if you know any fixes, please let me know, or send a PR addressing this issue.- Since Terminal is a windows only app, this script is also windows only. however the project can be extended with a little effort to support other terminals like tabby, etc.
- Be careful if you previously opened the settings file in any editor, it might be in use, so close it before running the script. and also avoid creating duplicate profiles.