glzr-io / glazewm

GlazeWM is a tiling window manager for Windows inspired by i3wm.
GNU General Public License v3.0
5.94k stars 171 forks source link

Cannot execute multi-word commands through IPC from command line #410

Open silvarc141 opened 1 year ago

silvarc141 commented 1 year ago

Problem

Cannot execute GlazeWM commands that have more than 1 word (have their own arguments) through IPC from command line,

Details

Run any command with more than one word. For example in powershell, with GlazeWM from scoop:

glazewm command "focus workspace 1" Result: Invalid command 'focus' GlazeWM output: 09/22/2023 12:59:33[IpcMessageHandler] IPC message received: command focus workspace 1.

glazewm command '"exit wm"' Result: Invalid command 'exit' GlazeWM output: 09/22/2023 13:01:40[IpcMessageHandler] IPC message received: command exit wm.

Note

Single word command work as expected: glazewm command "close" GlazeWM output:

09/22/2023 13:03:59[IpcMessageHandler] IPC message received: command close.
09/22/2023 13:03:59[Bus] Command CloseWindowCommand invoked.

Info

OS: Windows 11 Shell: Powershell 5 Terminal emulator: Alacritty

silvarc141 commented 1 year ago

After inspecting this, turns out the following works: glazewm command \"""focus workspace 1\""" I believe this should be simplified or corrected in the command description.

burgr033 commented 1 year ago

glazewm command '"focus workspace 1"' works fine at my end.