Close windows shortcut

Hi all,

is the keyboard shortcut to close windows configurable?

Using Preferences → Shortcuts I can only assign commands to shortcuts,
is there a command to close the currently focused window?

Cheers

Try “Alt+Q”, that should be the default shortcut for closing windows iirc

ALT+W - Closes the active window.

https://www.haiku-os.org/docs/userguide/en/keyboard-shortcuts.html

1 Like

It is not. You can use the win/lin / Haiku switch in keymaps to use ctrl-w instead of alt-w but other than that there is no configuration.

I just added a --close command line option to my WindowTailor application. This will allow you to create a shortcut that runs /path/to/WindowTailor --close as the command. Unfortunately, I’m not planning on doing a new release of the application right now, so you’d have to check out the project and build it from source.

3 Likes

Cool!

Thank you
Cheers

very nice, I used to do something similar with bash scripting, as you can immagine, much sloooower than using your tool, in combination with a custom input filter I can zoom, close, minimize, and resize with simple gestures; I’m missing some features from mine script, but I’m very happy with your app, thank you a lot

1 Like

Really nice app.

Any help needed to have a recipe on HaikuPorts ?

It should be possible by using “hey” message sending command line program instead of implementing custom command line argument. You can send quit message to application with specific MIME signature for example.

No, it is not. Also it is implemented in different ways in different applications, so there are no central place to change close window shortcut. Some application use default shortcut handling, some use menu item shortcut, some use their own logic such as Qt/GTK.

I am targeting a specific window with the quit message and not the entire app. In addition, there is no fast way for determining the active window from a command line using hey.

WindowTailor in action

2 Likes

The video is marked private and can’t be watched :frowning:

1 Like

Ops, it should be solved now

Sorry, I didn’t notice your message when I was reading through the posts. The app is already in HaikuDepot but I wasn’t planning on updating it just yet. I have had some other command line options ready to go for a while but haven’t pushed them to the repository(currently called --resizeto and --moveto, but I may shorten them by removing to). After that I will probably do a new release for HaikuDepot users.

1 Like

Indeed it’s available, maybe I was not looking in the correct tab:)

:100: if you accept feature requests, it would be nice to have --workspaces option to accept up/right/left/down ARGS, so a window could be moved to an adjacent workspace

I have added the feature. The --moveworkspace command takes either a columns,rows argument to offset the workspace a certain amount, or left, right, up, down aliases. So, --moveworkspace left is the same as --moveworkspace -1,0 and --moveworkspace down is the same as --moveworkspace 0,1, and so on… I haven’t totally decided if I want to keep --moveworkspace as the command name though.

1 Like

Then you can name it :

as ws_teleport or simply teleport
:cowboy_hat_face:

1 Like