Leftwm: Add Binding Modes

Created on 6 May 2021  路  7Comments  路  Source: leftwm/leftwm

Per #317, LeftWM might consider adding "Binding Modes" to the keybinds section.
Most likely the current structure:

[global]
|    [[keybind]]

Could be made into

[global]
[bindings]
|    [[keybind]]

An alternative might be to do the following:

modes = [0, 1, 2] #alternatively, ["0", "1", "2"]
[[keybind]]
command = "Execute"
value = "rofi -show drun -theme ~/.config/leftwm/themes/current/rofi/rofi.rasi"
modifier = ["modkey"]
key = "e"
modes = [0, 2] #alternatively ["0","2"]

Thoughts?

Most helpful comment

+1

All 7 comments

+1

I think the last implementation would be better, as it is easier for the user to easlily add and remove a binding to a mode.

I like this idea a lot.

Iirc in I3 this bind-mode brings with it a little notification on the status bar to list the current bindings, would we want to such a thing as well?
The thing is, this would either bring further dependencies (like dunst if we want to use actual notifications for this) or we need leftwm to create it's own (dock?) windows, which would bring also a bunch of new crates and code I guess.
This in turn brings us close to the edge of the "do one thing" paradigm, imo, so we also might consider going the route of leftwm-theme and make this a standalone-tool in the leftwm-eco-system.

Another consideration: how far could leftwm-command and sxhkd bring us in this effort?

Just wanted to point a few alternatives routes so we have something to choose from :grin:

I agree with the CONSIDERATION of splitting out the keybindings part into its own program, if we make it bigger. This would stick to the do one thing and do it well, and may help with maintaining the two systems as they wont be overly interlinked. We would need to make the external commands more expansive, but this would have a knock on effect of better usablity of external keybinding utilities.

Whether we separate out the keybinding module or not, I think while we are making changes to the keybindings it would be amazing to add a page that displays all of the users keybindings (or outputs to stdout for the user to manipulate) like is available in awesomewm.

Whether we separate out the keybinding module or not, I think while we are making changes to the keybindings it would be amazing to add a page that displays all of the users keybindings (or outputs to stdout for the user to manipulate) like is available in awesomewm.

So basically a flag for leftwm-check to list all bound commands?
Or an option for leftwm-command to list all bindable commands?

Btw: a man page would be really nice as well.

I like this idea a lot.

Iirc in I3 this bind-mode brings with it a little notification on the status bar to list the current bindings, would we want to such a thing as well?
The thing is, this would either bring further dependencies (like dunst if we want to use actual notifications for this) or we need leftwm to create it's own (dock?) windows, which would bring also a bunch of new crates and code I guess.
This in turn brings us close to the edge of the "do one thing" paradigm, imo, so we also might consider going the route of leftwm-theme and make this a standalone-tool in the leftwm-eco-system.

Another consideration: how far could leftwm-command and sxhkd bring us in this effort?

Just wanted to point a few alternatives routes so we have something to choose from grin

For the notification, i3 doesn't send a system notification which dunst will announce when you switch binding modes.The i3 polybar module does show text of the name of the binding mode that you are in though.

i3 binding mode config example:
image

Polybar message when in binding mode:
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

b4skyx picture b4skyx  路  7Comments

carrascomj picture carrascomj  路  3Comments

JwanKhalaf picture JwanKhalaf  路  3Comments

rigoletto-freebsd picture rigoletto-freebsd  路  8Comments

Haruno19 picture Haruno19  路  7Comments