stumpwm / mahogany

A stumpwm like Wayland compositor
GNU General Public License v2.0
241 stars 14 forks source link

Determine default applications #51

Open sdilts opened 1 year ago

sdilts commented 1 year ago

The default keymap will contain bindings to open a terminal, a text editor, and maybe more. Unlike X11, there is no practical guarantee that these apps will be installed on a user's machine.

The best example of this is the terminal emulator. We could assume that XTerm was installed in Stumpwm, but that's not the case for Wayland.

The two options I see are:

  1. Do a search to see if common apps are available (konsole, gnome-terminal, etc.)
  2. Pick one and fail gracefully if it can't be found.

Are there any other alternative ways to handle this?

bigbookofbug commented 6 months ago

i think the most practical method would be something similar to what dwl does - default bindings for common wayland applications such as bemenu and foot terminal.

the stumpwm "exec" command could definitely be utilized here as well, as it would allow the user to launch their applications still if there's no default binding (i used this in stumpwm when first starting it, as i had alacritty installed but not xterm).

dangerdyke commented 4 months ago

There's another option, which is reading a default from the $TERMINAL environment variable like hikari does. IMO it would be best to use that as a default and use option 1 as a fallback. It wouldn't do to have the user unable to open a terminal if they don't happen to have foot installed (as I don't)