terminus-persistence
Automatic state persistence for Sublime Text Terminus plugin
Details
Installs
- Total 2K
- Win 1K
- Mac 297
- Linux 358
| Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 8 | 7 | 7 | 5 | 11 | 4 | 10 | 4 | 7 | 3 | 3 | 6 | 8 | 4 | 6 | 10 | 7 | 12 | 11 | 12 | 13 | 9 | 7 | 4 | 3 | 11 | 9 | 11 | 12 | 10 | 6 | 8 | 9 | 6 | 5 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 9 |
| Mac | 7 | 4 | 4 | 1 | 3 | 0 | 0 | 0 | 0 | 2 | 1 | 1 | 3 | 3 | 3 | 0 | 0 | 3 | 2 | 2 | 4 | 1 | 2 | 5 | 2 | 2 | 1 | 1 | 1 | 0 | 2 | 5 | 3 | 5 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 3 |
| Linux | 2 | 3 | 2 | 5 | 2 | 1 | 5 | 0 | 4 | 2 | 2 | 2 | 3 | 1 | 0 | 2 | 3 | 3 | 1 | 1 | 4 | 2 | 1 | 5 | 6 | 2 | 0 | 0 | 4 | 3 | 2 | 5 | 4 | 3 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
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