Hyprland
Hyprland copied to clipboard
Launching / moving a window silently to workspace with on-created-empty rule triggers the rule
Hyprland Version
System/Version info
hyprctl systeminfo
Hyprland, built from branch main at commit 10caa03ce5bc2ce8238c494d59405213d32ddead (config: merge all rules set for the same workspace selection (5656)).
Date: Sat Apr 20 03:20:16 2024
Tag: v0.39.1-10-g10caa03c, commits: 4470
flags: (if any)
System Information:
System name: Linux
Node name: scay-ms7b86
Release: 6.8.7-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Wed, 17 Apr 2024 15:20:28 +0000
GPU information:
29:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev e7) (prog-if 00 [VGA controller])
os-release: NAME="EndeavourOS"
PRETTY_NAME="EndeavourOS"
ID="endeavouros"
ID_LIKE="arch"
BUILD_ID="2023.11.17"
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://endeavouros.com"
DOCUMENTATION_URL="https://discovery.endeavouros.com"
SUPPORT_URL="https://forum.endeavouros.com"
BUG_REPORT_URL="https://forum.endeavouros.com/c/arch-based-related-questions/bug-reports"
PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
LOGO="endeavouros"
plugins:
hypreasymotion by Zakk ver 1.0
Bug or Regression?
Bug
Description
This is annoying when I autostart windows and they are launched 2 times because executing silently triggers the rule
How to reproduce
- Set on-created-empy rule, for example:
workspace = 10,on-created-empty:kitty
- Move window to this workspace silently or spawn it:
hyprctl dispatch movetoworkspacesilent 10 kitty
or
hyprctl dispatch exec "[workspace 10 silent] kitty"
Result: There are 2 kitty windows on workspace 10 instead of the only one that was moved / spawned
Crash reports, logs, images, videos
No response
So I did some tests because I wasn't familiar with on-created-empty. At first I was also getting two kitty spawns instead of one, but then I made it work in these two situations:
- disconnect my external monitor to only run hyprland on the laptop.
- remove the persistent rules on the external monitor
So maybe persistent workspaces could be messing with how on-created-empty handles commands.
The on-created-empty feature was added back here https://github.com/hyprwm/Hyprland/pull/5452, and introduced the bug also.
This still seems to be broken on 0ebb43c.
I have a workspace rule like this for a "terminal scratchpad":
workspace=special:scratchpad_terminal, on-created-empty:[float; noanim; dimaround] alacritty
If I switch to that workspace (via a bind), exit the terminal (to ensure the workspace is empty) and then run something like
hyprctl dispatch "exec [workspace special:scratchpad_terminal silent] firefox"
, hyprland switches to the special workspace and launches both firefox and alacritty.
(Expected behavior would be no automatic switch, because of silent
and only firefox being present on the special workspace.)
Could you reopen this? @vaxerski
sure