Skip to content

docs(binds): persistence warning for hyprctl#1218

Open
sand4rt wants to merge 1 commit intohyprwm:mainfrom
sand4rt:patch-3
Open

docs(binds): persistence warning for hyprctl#1218
sand4rt wants to merge 1 commit intohyprwm:mainfrom
sand4rt:patch-3

Conversation

@sand4rt
Copy link
Copy Markdown
Contributor

@sand4rt sand4rt commented Sep 7, 2025

{{< callout type=warning >}}

Reloading the config removes `hyprctl keyword` commands set in the switches. To make them persistent, add:
`exec = sh -c 'if [ $(hyprctl monitors | grep -c "Monitor") -gt 1 ]; then hyprctl keyword monitor "eDP-1, disable"; fi'`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in a codeblock (```ini)

Copy link
Copy Markdown
Contributor Author

@sand4rt sand4rt Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vaxerski proposed this solution instead of the exec: hyprwm/Hyprland#11583 (reply in thread):

i have to try it out first:

# settings.conf
$ENABLE_LAPTOP = 1
$ENABLE_DESKTOP =
# hyprland.conf
source = ./settings.conf

# hyprlang if ENABLE_LAPTOP
monitor = eDP-1, ....
# hyprlang endif

# hyprlang if !ENABLE_LAPTOP
monitor = eDP-1, disable
# hyprlang endif

# ... other monitors similarly

then you can have a watcher script / toggle / whatever that writes to settings.conf. These changes will be dynamically picked up

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

Successfully merging this pull request may close these issues.

2 participants