hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.64k stars 903 forks source link

Bindl does not execute when lid is open #7055

Closed djelenc closed 3 months ago

djelenc commented 3 months ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit a0d15a0b7b066cbb1b08ac54cf882c2c55467e4a (). Date: 2024-07-25 Tag: , commits: a0d15a0b7b066cbb1b08ac54cf882c2c55467e4a flags: (if any) System Information: System name: Linux Node name: idea Release: 6.10.0 Version: #1-NixOS SMP PREEMPT_DYNAMIC Sun Jul 14 22:43:32 UTC 2024 GPU information: 64:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c7) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.11.20240721.68c9ed8" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.11 (Vicuna)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.11 (Vicuna)" VERSION_CODENAME=vicuna VERSION_ID="24.11" plugins: ======Config-Start====== Config File: /home/david/.config/hypr/hyprland.conf: Read Succeeded exec-once = /nix/store/wbqwrp6gpf31acmdchik5lsj8zdw2z24-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target $mainMod=SUPER animations { bezier=myBezier, 0.05, 0.9, 0.1, 1.05 animation=windows, 1, 7, myBezier animation=windowsOut, 1, 7, default, popin 80% animation=border, 1, 10, default animation=borderangle, 1, 8, default animation=fade, 1, 7, default animation=workspaces, 1, 2, default, slidevert enabled=yes } decoration { blur { enabled=true passes=1 size=3 } col.shadow=rgba(1d202199) drop_shadow=yes rounding=8 shadow_range=4 shadow_render_power=3 } dwindle { preserve_split=yes pseudotile=yes } general { allow_tearing=false border_size=2 col.active_border=rgb(83a598) col.inactive_border=rgb(665c54) gaps_in=4 gaps_out=4 layout=dwindle } gestures { workspace_swipe=on } group { groupbar { col.active=rgb(83a598) col.inactive=rgb(665c54) text_color=rgb(d5c4a1) } col.border_active=rgb(83a598) col.border_inactive=rgb(665c54) col.border_locked_active=rgb(8ec07c) } input { touchpad { natural_scroll=no } follow_mouse=2 kb_layout=us,si kb_options=grp:win_space_toggle numlock_by_default=true repeat_delay=300 repeat_rate=50 sensitivity=0 } misc { background_color=rgb(1d2021) disable_hyprland_logo=true force_default_wallpaper=0 } xwayland { force_zero_scaling=true } bind=$mainMod, T, exec, alacritty bind=$mainMod, Q, killactive, bind=$mainMod, M, fullscreen, 1 bind=$mainMod SHIFT, Q, exit, bind=$mainMod, F, exec, nautilus bind=$mainMod, G, togglefloating, bind=$mainMod, O, togglesplit, # dwindle bind=$mainMod, h, movefocus, l bind=$mainMod, l, movefocus, r bind=$mainMod, k, movefocus, u bind=$mainMod, j, movefocus, d bind=$mainMod CONTROL, j, workspace, +1 bind=$mainMod CONTROL, k, workspace, -1 bind=$mainMod SHIFT, j, movetoworkspace, +1 bind=$mainMod SHIFT, k, movetoworkspace, -1 bind=$mainMod SHIFT, h, movewindow, l bind=$mainMod SHIFT, l, movewindow, r bind=LALT,Tab,cyclenext, bind=LALT,Tab,bringactivetotop, bind=, xf86audiomute, exec, swayosd-client --output-volume mute-toggle bind=, xf86audiomicmute, exec, swayosd-client --input-volume mute-toggle bind=$mainMod, escape, exec, swaylock binde=, xf86audioraisevolume, exec, swayosd-client --output-volume raise binde=, xf86audiolowervolume, exec, swayosd-client --output-volume lower binde=, xf86monbrightnessup, exec, swayosd-client --brightness raise binde=, xf86monbrightnessdown, exec, swayosd-client --brightness lower bindl=,switch:off:Lid Switch, exec, swaylock bindm=$mainMod, mouse:272, movewindow bindm=$mainMod, mouse:273, resizewindow bindr=$mainMod, SUPER_L, exec, pkill fuzzel || fuzzel env=XCURSOR_SIZE,64 env=GDK_SCALE,1.25 exec-once=/nix/store/zxk8b9044vi44pbc2099c2s89rp5dcr7-waybar-0.10.4/bin/waybar exec-once=/nix/store/8l6brs42v31i96fbw27xzvd43dzm1f0k-wlsunset-0.4.0/bin/wlsunset -l 46 -L 14.5 exec-once=/nix/store/jsv79icwlajx0la8r0dz4pm3yhrn8jsq-network-manager-applet-1.36.0/bin/nm-applet --indicator exec-once=/nix/store/niajl3flzzw766ldxavsvy2irvk4ygk8-blueman-2.4.2/bin/blueman-applet exec-once=/nix/store/fwhzkkjkdhn0rkyfzbbf32zp5vhmsih3-nextcloud-client-3.13.2/bin/nextcloud monitor=,preferred,auto,1.25 windowrulev2=float,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2=float,class:^(pavucontrol)$ windowrulev2=float,class:^(com.nextcloud.desktopclient.nextcloud)$ windowrulev2=float,class:(blueman) windowrulev2=float,class:^(org.keepassxc.KeePassXC)$ windowrulev2=float,initialTitle:(All Files) windowrulev2=move 45% 2.9%,class:^(gsimplecal)$ ======Config-End======== ```

Description

After the lid is open and computer resumes from sleep the call to swaylock is not executed. This is the line in the config that worked before AQ.

bindl=,switch:off:Lid Switch, exec, swaylock

How to reproduce

Use the provided configuration, close the lid so the computer goes on standby, and reopen the lid. The command swaylock is not run.

Crash reports, logs, images, videos

No response

vaxerski commented 3 months ago

do other commands work or is it just swaylock

MOIS3Y commented 3 months ago

@vaxerski Now I'm faced with the same problem, the trigger to open the lid switch:off is simply ignored. The same goes for a switch trigger. It is possible that this is a problem with the device itself, but previously with exactly the same configuration everything worked on this commit

I realized that the trigger is ignored simply by running stub scripts

lid-close.sh

#!/usr/bin/env bash
echo "LID CLOSE..." >> /tmp/switch.log

lid-open,sh

#!/usr/bin/env bash
echo "LID OPEN..." >> /tmp/switch.log

~/.config/hypr/hyprland.conf

bind=,switch:on:Lid Switch,exec,/home/stepan/lid-close.sh
bind=,switch:off:Lid Switch,exec,/home/stepan/lid-open.sh

After that:

tail -f /tmp/switch.log

Сlose the lid and see LID CLOSE..., open it, nothing. You can swap them or pass any of them to:

bind=,switch:Lid Switch,exec,/home/stepan/lid-open.sh

The result will not change, only the lid closing trigger will work.

System/Version info ```sh Hyprland, built from branch at commit bc86afea7e177a7ad4335737417fc0e468698dc4 (). Date: 2024-07-27 Tag: , commits: bc86afea7e177a7ad4335737417fc0e468698dc4 flags: (if any) System Information: System name: Linux Node name: laptop Release: 6.6.41 Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu Jul 18 11:21:27 UTC 2024 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation WhiskeyLake-U GT2 [UHD Graphics 620] [8086:3ea0] (rev 02) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.11.20240719.1d9c2c9" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.11 (Vicuna)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.11 (Vicuna)" VERSION_CODENAME=vicuna VERSION_ID="24.11" plugins: hyprsplit by shezdy ver 1.0 ======Config-Start====== Config File: /home/stepan/.config/hypr/hyprland.conf: Read Succeeded exec-once = /nix/store/wbqwrp6gpf31acmdchik5lsj8zdw2z24-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target plugin=/nix/store/8fb4mp0n0jd5a5sjc4m06ywdjv0a810f-hyprsplit-0.1/lib/libhyprsplit.so $browser=/nix/store/ym3p8b8xlfycpv6888gi40kfjhqanqkk-firefox-128.0/bin/firefox $filemanager=/nix/store/yg5pafyvv4bij1y67bni2bi57ldzb7fl-nautilus-46.2/bin/nautilus $launcher=/nix/store/wc0vs8awsklwy1fgxf1ia46dz4ni4va3-hyprland-launcher-toggle.sh $lockscreen=/nix/store/dwqn3mjs6m8hhg3n8nli1clw4mxzvimj-hyprlock-0.4.1+date=2024-07-24_cf0e975/bin/hyprlock $mod=SUPER $screenshot=/nix/store/13il6jxc8aflra2bjnsgbz3312gb065r-hyprland-screenshot.sh $spare-terminal=/nix/store/y9x1daj65saz1f3ilgb85pndlgnvgxq9-wezterm-20240203-110809-5046fc22/bin/wezterm $terminal=/nix/store/32lws8716yr21zkdk5m64wng382sxa0d-kitty-0.35.2/bin/kitty $visual-text-editor=/nix/store/y7kwc3ccy5mgwbvcf28mblrmrd1vn1im-vscode-1.91.1/bin/code decoration { blur { enabled=true ignore_opacity=true new_optimizations=true passes=2 size=16 xray=false } rounding=6 } general { border_size=1 col.active_border=rgba(89b4faff) rgba(cba6f7ff) 60deg col.inactive_border=rgba(11111bff) gaps_in=4 gaps_out=8 no_border_on_floating=false resize_on_border=true } gestures { workspace_swipe=true workspace_swipe_fingers=3 } input { touchpad { disable_while_typing=true natural_scroll=true tap-to-click=true } follow_mouse=1 kb_layout=us,ru kb_model=pc104 kb_options=grp:alt_shift_toggle numlock_by_default=true } misc { disable_hyprland_logo=true swallow_regex=^(Alacritty|kitty|org.wezfurlong.wezterm)$ vrr=1 } xwayland { force_zero_scaling=true } bind=CTRL ALT, L, exec, $lockscreen bind=$mod, w, killactive bind=$mod, TAB, togglefloating bind=$mod SHIFT, TAB, fullscreen bind=$mod, h, movefocus, l bind=$mod, j, movefocus, d bind=$mod, k, movefocus, u bind=$mod, l, movefocus, r bind=$mod, u, focusurgentorlast bind=$mod, space, cyclenext bind=$mod SHIFT, h, movewindow, l bind=$mod SHIFT, j, movewindow, d bind=$mod SHIFT, k, movewindow, u bind=$mod SHIFT, l, movewindow, r bind=$mod CTRL, h, resizeactive, -20 0 bind=$mod CTRL, j, resizeactive, 0 20 bind=$mod CTRL, k, resizeactive, 0 -20 bind=$mod CTRL, l, resizeactive, 20 0 bind=$mod, G, split:grabroguewindows bind=$mod, RETURN, exec, $terminal bind=$mod, t, exec, $spare-terminal bind=$mod, m, exec, $launcher bind=$mod, b, exec, $browser bind=$mod, f, exec, $filemanager bind=$mod, v, exec, $visual-text-editor bind=, Print, exec, $screenshot bind=$mod, mouse_down, workspace, e+1 bind=$mod, mouse_up, workspace, e-1 bind=,XF86MonBrightnessUp, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/lightctl up bind=,XF86MonBrightnessDown, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/lightctl down bind=,XF86AudioRaiseVolume, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/volumectl -u up & /nix/store/nnq81k0gscki7hbx9ydbsd785qnxmv5k-pulseaudio-17.0/bin/paplay /nix/store/4jj2s78d3ppwl4yj1vc4pq0ci259qf0x-assets4nix-0.1.0/share/sounds/system/all-eyes-on-me.mp3 bind=,XF86AudioLowerVolume, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/volumectl -u down & /nix/store/nnq81k0gscki7hbx9ydbsd785qnxmv5k-pulseaudio-17.0/bin/paplay /nix/store/4jj2s78d3ppwl4yj1vc4pq0ci259qf0x-assets4nix-0.1.0/share/sounds/system/all-eyes-on-me.mp3 bind=,XF86AudioMute, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/volumectl toggle-mute & /nix/store/nnq81k0gscki7hbx9ydbsd785qnxmv5k-pulseaudio-17.0/bin/paplay /nix/store/4jj2s78d3ppwl4yj1vc4pq0ci259qf0x-assets4nix-0.1.0/share/sounds/system/sly.mp3 bind=,XF86AudioMicMute, exec, /nix/store/y2q2gb0973b800rc4rdw8amx2a3nq90v-avizo-1.3/bin/volumectl -m toggle-mute & /nix/store/nnq81k0gscki7hbx9ydbsd785qnxmv5k-pulseaudio-17.0/bin/paplay /nix/store/4jj2s78d3ppwl4yj1vc4pq0ci259qf0x-assets4nix-0.1.0/share/sounds/system/sly.mp3 bind=,switch:Lid Switch,exec,/home/stepan/lid-open.sh # bind=,switch:on:Lid Switch,exec,/home/stepan/lid-close.sh # bind=,switch:off:Lid Switch,exec,/home/stepan/lid-open.sh bind=$mod, 1, split:workspace, 1 bind=$mod SHIFT, 1, split:movetoworkspace, 1 bind=$mod, 2, split:workspace, 2 bind=$mod SHIFT, 2, split:movetoworkspace, 2 bind=$mod, 3, split:workspace, 3 bind=$mod SHIFT, 3, split:movetoworkspace, 3 bind=$mod, 4, split:workspace, 4 bind=$mod SHIFT, 4, split:movetoworkspace, 4 bind=$mod, 5, split:workspace, 5 bind=$mod SHIFT, 5, split:movetoworkspace, 5 bind=$mod, 6, split:workspace, 6 bind=$mod SHIFT, 6, split:movetoworkspace, 6 bind=$mod, 7, split:workspace, 7 bind=$mod SHIFT, 7, split:movetoworkspace, 7 bind=$mod, 8, split:workspace, 8 bind=$mod SHIFT, 8, split:movetoworkspace, 8 bind=$mod, 9, split:workspace, 9 bind=$mod SHIFT, 9, split:movetoworkspace, 9 bind=$mod, 0, split:workspace, 10 bind=$mod SHIFT, 0, split:movetoworkspace, 10 bindm=$mod, mouse:272, movewindow bindm=$mod, mouse:273, resizewindow env=WLR_NO_HARDWARE_CURSORS,1 env=NIXOS_OZONE_WL,1 env=XCURSOR_SIZE,26 exec-once=/nix/store/vj29dccn2hrn3lb4d6pdcmrz59j69fpk-hyprland-startup.sh layerrule=blur, logout_dialog layerrule=xray 1, logout_dialog monitor=eDP-1,1920x1080@60,0x0,1 monitor=HDMI-A-1,1920x1080@60,1920x0,1 monitor=,preferred,auto,1 windowrulev2=tag +music, class:^(feishin|io.bassi.Amberol) windowrulev2=tag +music, title:^(.*Yandex Music.*) windowrulev2=float, class:^(nm-connection-editor) windowrulev2=float, class:^(.blueman-manager-wrapped) windowrulev2=float, class:^(zoom) windowrulev2=float, class:^(org.gnome.Calculator) windowrulev2=noblur, class:^(vlc) windowrulev2=noblur, class:^(zoom) windowrulev2=size 350 700,class:^(org.gnome.Calculator) windowrulev2=opacity 0.8 override 0.8 override 1.0 override, tag:music plugin { hyprsplit { num_workspaces = 10 } } ======Config-End======== ```
djelenc commented 3 months ago

do other commands work or is it just swaylock?

The same with others. I used the same shell script as @MOIS3Y, and it only registered the closing event. The lid-opening event was missed.

alba4k commented 3 months ago

Probably because your laptop is still asleep when the switch goes off

on my setup I just have hyprlock --immediate-render --immediate --no-fade-in & playerctl pause as pre suspend comand in hypridle. That way I achieve exactly what you are trying to do here

alternatively, just make it run something like swaylock & systemctl suspend when the lid is closed

vaxerski commented 3 months ago

this should be fixed by https://github.com/hyprwm/aquamarine/commit/339337cc7b32ddda02f874817059a426bcf4ef16