You are not logged in.
I use Qtile, and I configured it to run
myFilemanager = "alacritty -e ranger"
Key([mod], "e", lazy.spawn(myFileManager), desc='File browser'),I also have a few custom scripts in ~/.local/bin/scripts, one of them being `setbg`. I have also have this directory in my PATH
When I run `setbg` in alacritty alone, it works as intended. When I run it in ranger using `:shell setbg %s`, the behaviour was not what I was expecting. If I run ranger through an existing alacritty window, that is, open up alacritty and type `ranger`, then it works as expected, but if I launch ranger by the shortcut, then it doesn't work. When I try to open the terminal using Shift + s, it says that the `setbg` command was not found, but when I try to print out the $PATH env variable, it has `~/.local/bin/scripts` if I run `setbg` in that terminal window, it works.
What is the difference between `alacritty -e ranger` and manually opening up alacritty and running ranger, is there a way that I can do the latter in one keystroke in Qtile?
Last edited by ZALMT (2024-05-22 14:10:16)
Offline
What is the difference between `alacritty -e ranger` and manually opening up alacritty and running ranger, is there a way that I can do the latter in one keystroke in Qtile?
When you open alacritty, it launches the shell which reads your rc file(s), where, I assume, you modify your PATH. This only affects what's been executed by the shell. When you run alacritty -e ranger, no shell is executed and therefore PATH not modified. What you want is to modify your PATH variable in your profile file. For bash, see: https://wiki.archlinux.org/title/Bash#C … tion_files
Offline