hyprwm / Hyprland

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

Exec-once call inside of Submap is not proccessed #6671

Closed danilanosikov closed 2 days ago

danilanosikov commented 2 days ago

Description

I was trying to change animation style of tofi launcher, but apperantly it does not have option to open it as a regular window, because of that it still used workspace-default animation.

I decided to call submap and instantly after that change animation to desired, call tofi, revert animation style to default and exit submap afterward - all automatically, with one shortcut.

Unfortunately, very soon I noticed - inside of submap exec-once call is not proccessed, at least it seems so.

Would it be reasonable to to implement exec-once call, and others like animation definition, etc, to be "callable" inside a submap?

So it would work somewhat like this:

bind=$System,$PasteKey,submap,clipboard-history-call
submap=clipboard-history-call

bezier=curve,0.5,0.3,0.1,0.9
animation=workspaces,1,5,curve,slide left

# Temporary Workspace Animation Style
exec-once = wl-clipboard-history-tofi-wrapper

submap=reset
# Default Workspace Animation Style
danilanosikov commented 2 days ago

Ah, didn't see documentation section about layer rules, anyway I still can see use for this feature, so I'll keep it open

vaxerski commented 2 days ago

exec-once runs once at compositor's startup and it doesn't matter where you put it, that wont change. You can listen to socket2 for submap changes, or stack keybinds to achieve this.