-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window functions #180
base: master
Are you sure you want to change the base?
Window functions #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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
x
to kill the window andq
to 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
WindowCommand
Enum, defining the commands throughWindowCommand.send_to_window()
. If the user gives a key in thekey : WindowCommand
HashMapwindow_cmd_map
then 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!