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 | |
| parent | 24f4cbc1ddc4c540b6d69c1cd9d66d60b06ccec1 (diff) | |
| download | dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.tar.gz dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.tar.bz2 dotfiles-7a24b71373f915fb95bdc1868b7a839dee3a6523.zip | |
hypr: laptop docking
| -rw-r--r-- | .config/hypr/conf/keybinds.conf | 2 | ||||
| -rwxr-xr-x | .config/hypr/scripts/switch.sh | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/.config/hypr/conf/keybinds.conf b/.config/hypr/conf/keybinds.conf index e1d9695..b192c5d 100644 --- a/.config/hypr/conf/keybinds.conf +++ b/.config/hypr/conf/keybinds.conf | |||
| @@ -92,3 +92,5 @@ bind = $mainMod SHIFT, code:58, movetoworkspace, name:music | |||
| 92 | # Move/resize windows with mainMod + LMB/RMB and dragging | 92 | # Move/resize windows with mainMod + LMB/RMB and dragging |
| 93 | bindm = $mainMod, mouse:272, movewindow | 93 | bindm = $mainMod, mouse:272, movewindow |
| 94 | bindm = $mainMod, mouse:273, resizewindow | 94 | bindm = $mainMod, mouse:273, resizewindow |
| 95 | |||
| 96 | bindl=,switch:Lid Switch, exec, ~/.config/hypr/scripts/switch.sh | ||
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 | ||
