Closed gmr458 closed 1 year ago
I think this is an issue in Hyprland. As far as I can tell, the problem is that those .desktop
files pass command line arguments in their Exec=
line, e.g. --unity-launch
for VSCode. In Sway, you can handle that by passing --
, after which all arguments are assumed to be for the command to be run:
> tofi-drun | xargs swaymsg exec --
# Selecting VSCode results in "swaymsg exec -- code-oss --unity-launch"
With hyprctl
, it just sees the --unity-launch
and complains about an invalid argument. Until this is fixed, you should be able to work around it by passing --drun-launch=true
to tofi, though this can have other undesirable effects such as launching programs on the wrong monity.
Alright, this should be possible in Hyprland now:
> tofi-drun | xargs hyprctl dispatch exec --
Thanks for the help, tofi-drun --drun-launch=true | xargs hyprctl dispatch exec --
is now working for me from the terminal, but no from the Hyprland keybinding, it has to be a problem with Hyprland.
You shouldn't use --drun-launch
if you're feeding it to Hyprland, that makes tofi try to launch the command itself (and not print anything out)
Sorry, I forgot to update my Hyprland dotfiles, tofi-drun --drun-launch=true
works perfect.
I am using Fedora 36 with Hyprland and when I use the command
tofi-drun | xargs hyprctl dispatch exec
I can open programs like Calendar, Alacritty, Sublime Text, Kitty, Calculator, Firefox, but other programs like Spotify, GNOME Files, VS Code, VLC Media Player don't open.This is the output trying to open GNOME Files: