Conversation
svenstaro
left a comment
There was a problem hiding this comment.
Clean and simple, I like it! Great feature, too! I'd like for the keys to be customizable the way you already mentioned. Please also document this stuff in the README and write a small blip for the CHANGELOG. :)
Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
|
This should cover most of your comments, in particular, merging the logic of the window selection and command selection better. Now we add the command character to the Maybe |
|
I've added configuration options for The README and CHANGELOG are also updated :) |
|
Hi, is there anything else I should do? I'm not too familiar with open source stuff? |
Implementation of #179 allowing for more complex actions a window, by giving a command key before selecting the window.
Currently, this adds
xto kill the window andqto toggle floating, although this can be extended to much more complex functions. A full screen command and a split and launch [x] seem like good next candidates.The main points:
We add a
WindowCommandEnum, defining the commands throughWindowCommand.send_to_window(). If the user gives a key in thekey : WindowCommandHashMapwindow_cmd_mapthen we select that command, otherwise we default toWindowCommand::Focus.The command keys are currently hard-coded, but if you're happy with the implementation, I'll add something to the command line args.
--kill-window-char [x]and--focus-window-char [x]are pretty verbose, but seem to be the simplest way of allowing the user to configure the keys?The Emacs packages used as reference silently ignores any keys used for commands, if they are also present in the
hint_chars, however, I've decided to make this explicitly return an error, which seems more in line with Rust.Happy for any other feedback!