hyprwm / hyprlang

The official implementation library for the hypr config language.
https://hyprland.org/hyprlang
GNU Lesser General Public License v3.0
129 stars 15 forks source link

' {' Doesn't Work for Exec (but '{' Does) #19

Closed PacificViking closed 7 months ago

PacificViking commented 7 months ago

bind = $mainMod ALT, F, exec, hyprctl keyword input:follow_mouse $(expr 2 + 1 - $(hyprctl getoption input:follow_mouse | awk -F': ' 'NR==2{print $2}'));

I have this little script here for toggling follow_mouse between 1 and 2 with Super+Alt+F. Unfortunately, it only works when the awk formatting string is 'NR==2{print $2}'. When it is 'NR==2 {print $2}', the command works when being ran in a terminal, but doesn't run with Hyprland's config.

A more minimal example would be bind = $mainMod ALT, F, exec, echo ' {' > ~/log.log; Which also works in terminal but not in Hyprland's config.

vaxerski commented 7 months ago

hyprland doesn't use hyprlang yet