diff options
author | Yigit Sever | 2024-10-10 10:11:35 +0200 |
---|---|---|
committer | Yigit Sever | 2024-10-10 10:11:35 +0200 |
commit | 7a24b71373f915fb95bdc1868b7a839dee3a6523 (patch) | |
tree | 3fb1dd310e4603a58156f7836c92863db226d353 /.config/hypr/scripts/switch.sh | |
parent | 24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1 (diff) | |
download | dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.tar.gz dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.tar.bz2 dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.zip |
hypr: laptop docking
Diffstat (limited to '.config/hypr/scripts/switch.sh')
-rwxr-xr-x | .config/hypr/scripts/switch.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/hypr/scripts/switch.sh b/.config/hypr/scripts/switch.sh new file mode 100755 index 0000000..81ae9e8 --- /dev/null +++ b/.config/hypr/scripts/switch.sh | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | # https://github.com/hyprwm/Hyprland/issues/1754#issue-1618824532 | ||
3 | |||
4 | if grep open /proc/acpi/button/lid/LID0/state; then | ||
5 | hyprctl keyword monitor "eDP-1,highres,auto,1" | ||
6 | else | ||
7 | if [[ `hyprctl monitors | grep "Monitor" | wc -l` != 1 ]]; then | ||
8 | hyprctl keyword monitor "eDP-1, disable" | ||
9 | fi | ||
10 | fi | ||