Biont / sway-launcher-desktop

TUI Application launcher with Desktop Entry support. Made for SwayWM, but runs anywhere
GNU General Public License v3.0
605 stars 28 forks source link

$PATH is not read when launched from i3wm configuration #45

Open Kabouik opened 3 years ago

Kabouik commented 3 years ago

This is probably not an issue with the script itself but with the way I use it, but somehow sway-launcher-desktop.sh doesn't find all my executable files in $PATH when I run it from my i3wm configuration (i.e., with a keybinding), but it does when I run it directly in a terminal. Any ideas of what I am doing wrong?

Is there any way to make a script run from Sway/i3 inherit environment variables in .bashrc? I have tried running the script with bash using set $menu exec kitty --name=launcher -e /bin/bash -c '~/Projects/sway-launcher-desktop/sway-launcher-desktop.sh' but that didn't help.

mpldr commented 2 years ago

I'd suggest changing the command to set $menu exec kitty --name=launcher bash '~/Projects/sway-launcher-desktop/sway-launcher-desktop.sh'

I am using zsh but with this command it reads my environment just fine. Also: I can't seem to find -e in kitty's docs and -c provides the config to use.