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

Conditional statements #52

Open
alba4k opened this issue Aug 18, 2024 · 2 comments
Open

Conditional statements #52

alba4k opened this issue Aug 18, 2024 · 2 comments

Comments

@alba4k
Copy link

alba4k commented Aug 18, 2024

I know that this might be behind the scope of hyprlang is supposed to be, but:

Would it be possible to get some sort of branching in hyprlang itself? As an example

# hyprlang if hyprctl monitors | grep DP-5
monitor = eDP-1, disabled
# hyprlang else
monitor = eDP-1, 1920x1200@60, 0x0, 1
# hyprlang endif

where the condition is simply sh -c "whatever the command is" returning 0.

Of course, this could be partially handled by scripts. Using scripts, however, is never as effective.
I'm not sure how the delay could be handled.

@vaxerski
Copy link
Member

idk if this is a good idea

@alba4k
Copy link
Author

alba4k commented Aug 18, 2024

Could certainly be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants