Created
July 27, 2025 16:26
-
-
Save theissn/d4cbb99d6159fddd65e1a5e5ad51c492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bindl=,switch:off:Lid Switch,exec,~/.local/bin/lid open | |
| bindl=,switch:on:Lid Switch,exec,~/.local/bin/lid close |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| monitors="$(hyprctl monitors)" | |
| if echo "$monitors" | grep -qE '^Monitor DP-[0-9]+'; then | |
| case "$1" in | |
| open) | |
| hyprctl keyword monitor "eDP-1,1920x1200,2560x0,1" | |
| ;; | |
| close) | |
| hyprctl keyword monitor "eDP-1,disable" | |
| ;; | |
| *) | |
| echo "Usage: $0 {open|close}" | |
| exit 1 | |
| ;; | |
| esac | |
| else | |
| if [[ $1 == "open" ]]; then | |
| hyprctl keyword monitor "eDP-1,1920x1200,0x0,1" | |
| fi | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment