nwg-piotr / nwg-drawer

Application drawer for wlroots-based Wayland compositors
MIT License
233 stars 25 forks source link

Add the `swaymsg` flag to launch a program with `swaymsg exec` and prevent potential involuntary closing with Jetbrains IDEs #101

Closed gouvinb closed 9 months ago

gouvinb commented 9 months ago

Description

This pull request adds the swaymsg flag to the nwg-drawer command to launch a program with the swaymsg exec command. This prevents potential unintentional closure with Jetbrains IDEs.

Advantages

Instructions

To use this new feature, simply add the -swaymsg flag to the nwg-drawer command, or set the XDG_CURRENT_DESKTOP environment variable to "sway".

Example

Before

rubymine # without -term, -swaymsg and without XDG_CURRENT_DESKTOP=sway

After

swaymsg exec firefox # with -swaymsg or with XDG_CURRENT_DESKTOP=sway
nwg-piotr commented 9 months ago

Looks good, thank you.

For feature parity we should also have nwg-drawer -hyprctl -> hyprctl dispatch exec <command>.