Skip to content
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

Feature Request: A way to toggle back and forth layouts #77

Closed
thiswillbeyourgithub opened this issue Oct 27, 2024 · 2 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@thiswillbeyourgithub
Copy link

thiswillbeyourgithub commented Oct 27, 2024

Hi,

As requested here, I'm looking for a feature and not quite sure how to proceed in cortile.

Basically I'm coming from the i3wm world and got used to a feature called "auto_back_and_forth" which simply means that doing twice a shortcut brings you back to the previous state.

Specifically I'm after a way so that the shortcut to maximize/fullscreen an app, when pressed a second time, would go back to the previous layout (= unmaximize / exit fullscreen).

Edit: rereading the owner's comment it appears clear that this can probably simply done with a simple script so if you could just tell me that specific commands I should familiarize myself with to do it I can probably manage without taking too much of your time

@leukipp leukipp self-assigned this Oct 28, 2024
@leukipp leukipp added the enhancement New feature or request label Oct 28, 2024
@leukipp
Copy link
Owner

leukipp commented Oct 28, 2024

I will think about, on how to add this directly into cortile.

In the meantime, I added a cortile-addons example that toggles between maximized and the previous layout when cortile is enabled and <ctrl> + <alt> + <j> is pressed:
https://github.com/leukipp/cortile-addons/blob/main/examples/toggle_layout_with_keybindings.py

If you have problems getting the script to run or adapting it to your needs, just create a new issue in the cortile-addons repository.

@leukipp
Copy link
Owner

leukipp commented Nov 2, 2024

You can now use #78, with only two layouts defined in the cycler. If you need extended custom logic, feel free to have a look into the example addon scripts.

@leukipp leukipp closed this as completed Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants