Breaking Change
Please see the migration guide below. The version 0.8.0 is a generational update that rebases otter-launcher to ratatui. Previously, otter used rustyline as its backend for simplicity, but once I started modifying rustyline's source code for more functionalities, I knew a new framework was needed. This came with changes in both otter's capabilities and philosophy:
New Capabilities
- Stable TUI frames provided by ratatui
- Stable image presentation through ratatui-image
- Resizing window no longer breaks layout
- Mouse clickable selection menu
- Setting color without ANSI codes ("yellow" instead of "\u001b[33m")
- Streamlined config options (to be simple)
- Multi-line editing (shift+enter to change line, or 'o' and 'O' in vi-mode)
- Vi-mode acces to system clipboard ("p")
- More modifiers to use, eg. alt/shift/control+enter for different functions
New Philosophy
I used to prioritize otter's hackability, thus seeing configurables sprawling, with all the ANSI codes adding perplexity. Excessive options also make it brittle to config changes. The new version prioritizes practicality over customizability. It has limited the number of options in order to strengthen reliability, especially when things involve terminal graphics.
This redesign allows using the program with different skill levels. Some can set the header color to simply "blue", while others write "\x1b[34m>\x1b[0m$USER@$(echo $HOSTNAME)". The config has become much easier to read and understand in general.
Config Migration
The new config structure is like: [general], [interface], [image], [modules].
The [modules] part works exactly the same as the old version. This means simply deleting the [general], [interface], and [overlay] parts will give you a functional config with the default layout, and then you can style it from scratch by configuring the [general], [interface], and [image] parts.
Those options look largely the same as the old ones, reduced in quantity (ridding of non-practical ones), and you'll find them very easy to understand. Major options like interface.header work the same as the old ones. Check README to see all the available configurables.
Lastly, interface.header_cmd has been removed because there's a better way for image rendering now. If you do need it, use a wrapper script or something like "echo 'this is a header'; otter-launcher", or set interface.header with "$(echo 'this is a header')".