Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launching / moving a window silently to workspace with on-created-empty rule triggers the rule #5663

Open
luravoid opened this issue Apr 20, 2024 · 5 comments · Fixed by #6026
Labels
bug Something isn't working

Comments

@luravoid
Copy link

luravoid commented Apr 20, 2024

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

  1. Set on-created-empy rule, for example:
workspace = 10,on-created-empty:kitty
  1. 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

@luravoid luravoid added the bug Something isn't working label Apr 20, 2024
@ordy
Copy link

ordy commented Apr 20, 2024

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.

@yassineibr
Copy link

yassineibr commented Apr 28, 2024

The on-created-empty feature was added back here #5452, and introduced the bug also.

@30350n
Copy link

30350n commented Jun 2, 2024

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.)

@30350n
Copy link

30350n commented Jun 4, 2024

Could you reopen this? @vaxerski

@vaxerski vaxerski reopened this Jun 4, 2024
@vaxerski
Copy link
Member

vaxerski commented Jun 4, 2024

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants