Skip to content

Chained commands with @enter or @escape don't execute. #313

@Zhaith-Izaliel

Description

@Zhaith-Izaliel

Version Information:

  • Distribution Information ( run uname -a ): Linux Whispering-Willow 6.12.30 #1-NixOS SMP PREEMPT_DYNAMIC Thu May 22 12:29:54 UTC 2025 x86_64 GNU/Linux
  • swhkd version ( swhkd -V ): Simple-Wayland-HotKey-Daemon 1.3.0-dev, build from commit c5c4071459a6465a3743a8bb5bb990e27cdf315b.

Describe the bug:
Chained commands with @enter or @escape don't execute. For example having this configuration:

Super + n
  @enter stream && echo -n "stream" > /tmp/swhkd/current-mode

mode stream
Ctrl +c
  notify-send "test" && echo "test" > /tmp/swhkd/current-mode

escape
  @escape && echo -n "normal" > /tmp/swhkd/current-mode

endmode

You are able to enter and leave the mode, but the chained commands with @enter and @escape don't execute. However, it's possible to chain the command with another keybind not using these internal functions.

Expected behavior:
Chained commands with internal functions such as @enter and @escape should execute.

Actual behavior:
Chained commands with internal functions such as @enter and @escape don't execute at all.

To Reproduce:

  1. Create a configuration with a mode and two keybinds for entering and escaping the mode
  2. Chain a command with && to your calls of @escape and @enter mode.
  3. Use the keybinds to enter and escape the mode.
  4. You should see the command not being executed at all.

Additional information:
Here is the configuration that produces this behavior. Maybe the problem comes from it entirely, hence why I join it to this report as well:

Super + n
  @enter stream && echo -n "stream" > /tmp/swhkd/current-mode


mode stream
Ctrl + c
  obs-do set-scene 'Just Chatting'

Ctrl + d
  obs-do set-scene 'Game Development'

Ctrl + e
  obs-do set-scene 'Ending'

Ctrl + g
  obs-do set-scene 'Gaming'

Ctrl + n
  obs-do set-scene 'Schedule'

Ctrl + p
  obs-do set-scene 'Pause'

Ctrl + s
  obs-do set-scene 'Starting'

Shift + m
  obs-do toggle-mute

Shift + r
  obs-do toggle-record

a
  vts hotkeys trigger --name Angry

b
  vts hotkeys trigger --name Blush

c
  vts hotkeys trigger --name Crying

d
  vts hotkeys trigger --name Disgust

e
  vts hotkeys trigger --name Heart_Eyes

f
  vts hotkeys trigger --name Focusing

f1
  vts hotkeys trigger --name Calibrate

h
  vts hotkeys trigger --name Happy_Tears

s
  vts hotkeys trigger --name Sparkle_Eyes

w
  vts hotkeys trigger --name Worry

x
  vts hotkeys trigger --name Warth

y
  vts hotkeys trigger --name Yandere

escape
  @escape && echo -n "normal" > /tmp/swhkd/current-mode

endmode

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions