Closed gouvinb closed 9 months ago
Thanks! I see hardly anything on the phone. Will test tonight, when I'm back home.
Wait, I've caught a bug with this kind of command: /opt/google/chrome/google-chrome --profile-directory=Default --app-id=xxx
.
I reworked command building.
Typical shell-supported command sets:
cmd
cmd --arg
cmd --arg=value
ENV_VAR="value" cmd
ENV_VAR="value" cmd --arg
ENV_VAR="value" cmd --arg=value
The listed commands above are now better managed.
Initially, the command types cmd --arg=value
or ENV_VAR="value" cmd --arg=value
were not correctly parsed. After finding a solution to this problem, I conducted further tests and discovered cases that were not currently handled. These cases are as follows:
cmd "arg with space"
ENV_VAR="value with space" cmd
Running apps with go is insanely complicated and always makes me miss the good, old python.
The approach with the Go language is a bit too low-level.
I think that most cases are covered and that the remaining 2 cases represent only a minority of situations.
Personally, I've never had a case like this; I had to invent them myself to check whether they worked or not.
All right. Let's find it ready.
Description
This pull request adds the
wm
flag to thenwg-drawer
command to launch a program with theswaymsg exec
orhyprctl dispatch exec
command.:warning: BREAKING CHANGE: '-swaymsg' removed, use '-wm sway' instead
Reference
This pull request refers to this comment (#101)
Instructions
To use this new feature, simply add the
-wm <current wm name>
argument to thenwg-drawer
command, or set theXDG_CURRENT_DESKTOP
environment variable to "sway", "hypr" or "hyprland".Example
Before
After
or
or
Note
I don't use Hypr or Hyprland (yet). So this PR must be tested.