terminus-persistence
Automatic state persistence for Sublime Text Terminus plugin
Details
Installs
- Total 918
- Win 565
- Mac 158
- Linux 195
| Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 6 | 6 | 9 | 11 | 8 | 8 | 10 | 11 | 5 | 10 | 13 | 11 | 10 | 8 | 7 | 14 | 11 | 16 | 11 | 10 | 8 | 10 | 9 | 14 | 48 | 58 | 67 | 55 | 46 | 51 | 40 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 3 | 4 | 2 | 3 | 2 | 1 | 0 | 3 | 0 | 2 | 5 | 3 | 2 | 2 | 1 | 2 | 4 | 4 | 1 | 5 | 0 | 3 | 4 | 14 | 26 | 26 | 16 | 9 | 12 | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 3 | 4 | 5 | 3 | 4 | 4 | 1 | 1 | 3 | 1 | 2 | 5 | 4 | 1 | 1 | 3 | 3 | 2 | 3 | 3 | 4 | 4 | 3 | 16 | 25 | 23 | 22 | 20 | 26 | 15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
terminus-persistence
A minimal Sublime Text plugin that remembers whether your Terminus panel was open between sessions and automatically restores it.
Features
- Automatic State Persistence: Remembers if Terminus was open when you closed Sublime Text
- Seamless Restoration: Automatically reopens Terminus on startup if it was previously open
- Convenient Menu Integration: Quick access to Terminus controls via View menu
- Configurable: Toggle persistence on/off as needed
Requirements
- Sublime Text 3 or 4
- Terminus plugin installed
Installation
Via Package Control
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Select “Package Control: Install Package”
- Search for “terminus-persistence”
- Press Enter to install
Usage
Automatic Behavior
Once installed, the plugin works automatically:
- Open Terminus panel (via
Alt+\or Terminus commands) - Close Sublime Text
- Reopen Sublime Text
- Terminus panel will automatically reopen
Menu Commands
Access via View → Terminus:
- Toggle Persistence: Enables or disables automatic persistence (shows checkmark when enabled)
Command Palette
All commands are available via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- terminus-persistence: Toggle Persistence - Enable or disable persistence
- Preferences: terminus-persistence Settings - Open settings in split view
Configuration
Settings can be accessed via:
- Menu: Preferences → Package Settings → terminus-persistence → Settings
- Command Palette: Preferences: terminus-persistence Settings
Default settings:
{
// Enable or disable automatic persistence of Terminus panel state
"persistence_enabled": true
}
How It Works
- On Close: When you close a Sublime Text window, the plugin checks if a Terminus panel is visible
- State Storage: The visibility state is saved to a JSON file in your User directory
- On Startup: When Sublime Text loads, the plugin waits 1 second (to ensure Terminus is loaded) then restores the panel state
- Configurable: Persistence can be toggled on/off via the View menu
Files Created
The plugin creates the following files in your Sublime Text User directory (Packages/User/):
terminus_persistence_state.json: Stores the panel visibility state between sessions- Contains:
terminus_was_visible(boolean) andterminus_panel_name(string or null) - This file is automatically created and updated when you close Sublime Text
- Safe to delete - will be recreated on next close
- Contains:
Troubleshooting
Terminus doesn't reopen on startup
- Make sure Terminus plugin is installed and enabled
- Check that persistence is enabled: View → Terminus → Toggle Persistence (should show checkmark)
- Try increasing the delay in
plugin_loaded()if Terminus loads slowly
Menu items don't appear
- Ensure the folder is named exactly
terminus-persistence - Restart Sublime Text
- Check Console for errors (View → Show Console)
Development
Project Structure
terminus-persistence/
├── terminus_persistence.py # Main plugin code
├── terminus-persistence.sublime-settings # Default settings
├── terminus-persistence.sublime-commands # Command palette entries
├── Main.sublime-menu # Menu integration
├── messages.json # Installation message config
├── messages/
│ └── install.txt # Post-install message
└── README.md # This file
Testing
- Enable Sublime Text console: View → Show Console
- Open Terminus panel
- Close and reopen Sublime Text
- Check console for any errors
- Verify Terminus reopens automatically
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
MIT License - See LICENSE file for details
Author
Gabriel Lody
Acknowledgments
- Terminus by randy3k - The excellent terminal emulator this plugin extends
- Sublime Text community
Changelog
0.1.1
- Add Command Palette support
- Add settings menu with split view (edit_settings)
- Add .gitattributes for clean package distribution
- Remove obsolete state data from settings file
- Update documentation
0.1.0 (Initial Release)
- Basic persistence functionality
- View menu integration
- Toggle persistence on/off
- Automatic state restoration