albertlauncher / albert

A fast and flexible keyboard launcher
https://albertlauncher.github.io
Other
7.23k stars 304 forks source link

Terminal wezterm missing probably due to flatpak #1337

Closed igorzhilin closed 2 months ago

igorzhilin commented 10 months ago

Hi Manuel

I have wezterm installed via flatpak. I use alias wezterm='flatpak run org.wezfurlong.wezterm'.

In the Albert source code file terminalprovider.cpp, I see the static const vector<ExecutableTerminal> exec_terminals that contains a bunch of terms including wezterm. But the problem is that my wezterm is flatpak. which wezterm returns nothing.

I suppose that's why it's not appearing.

What would be your suggestion to this? I guess the quickest workaround is to create a symlink wezterm somewhere in $PATH so that which wezterm can find it.

But maybe another solution?

ManuelSchneid3r commented 10 months ago

can you tell how one does run a command in this terminal from command line? I mean does the flatpak have a cli like flatpak run org.wezfurlong.wezterm -x <any commandline>?

ManuelSchneid3r commented 10 months ago

Wait theres still the problem that it would not be detected correctly. Wouldnt it make sense for such terminals to install a bootstrapper shell script into /usr/local/bin? Something like

#!/usr/bin/env sh
# Filename: /usr/local/bin/wezterm
flatpak run org.wezfurlong.wezterm $@
ManuelSchneid3r commented 9 months ago

@igorzhilin i am not that familar with flatpak. Is it common practice to ship a bootstrapper script or a desktop file?

ManuelSchneid3r commented 5 months ago

was just fiddling with flatpak and found that it automatically does what i suggested. flatpak also modifies PATH. doesnt wezterm do it?

Bildschirmfoto vom 2024-04-23 21-46-30

ManuelSchneid3r commented 5 months ago

@igorzhilin I have not a linux box available atm, but I am working on putting the terminal functionality in a plugin. I think it is not that hard to cover flatpaks too. I mean we maintain a hard coded list anyway so we could simply use flatpak list to check for availability and add terms like "flatpak run org.wez….wezterm" to run. The thing I wonder now: is it even possible to run flatpak terminals like regular terminals using a commandline with parameters? i mean can we call things like "flatpak run org.foo.Bar -e my_fancy_commandline with_params"? Can you please check this quickly?