firecat53 / networkmanager-dmenu

Control NetworkManager via dmenu
MIT License
783 stars 74 forks source link

Add --dmenu option to wofi invocation #138

Open hexbioc opened 1 month ago

hexbioc commented 1 month ago

On Wayland, with wofi, the script fails with a cryptic error:

(process:100791): GLib-GObject-CRITICAL **: 18:24:27.791: g_object_get_qdata: assertion 'G_IS_OBJECT (object)' failed

(process:100791): GLib-GObject-CRITICAL **: 18:24:27.791: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed

(process:100791): GLib-GObject-CRITICAL **: 18:24:27.791: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed

(process:100791): GLib-GObject-CRITICAL **: 18:24:27.791: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Turns out it is due to the failure in launching wofi, as it requires the --dmenu option to operate in dmenu mode.

This PR adds the same.

PS: Please let me know if you'd like me to create an issue first!

firecat53 commented 1 month ago

You can add --dmenu to your dmenu_command configuration, for example (see README): dmenu_command = wofi --dmenu

I would like to make nmdm a bit smarter and generalize support for each launcher so you don't have to configure common items like --dmenu. Unfortunately they all have different flags.

I'm going to leave this open as a reminder to myself to work on streamlining launcher support. Thanks for the contribution and the interest!