sxhkd icon indicating copy to clipboard operation
sxhkd copied to clipboard

Setting SXHKD_SHELL to bash does not do anything.

Open MichaelDuPlessis opened this issue 1 year ago • 1 comments

I am using the fish shell and I have set the environment variable SXHKD_SHELL to /run/current-system/sw/bin/bash. The path looks strange because I am using NixOS. Even though I have changed the environment variable it seems to still be running commands using fish.

MichaelDuPlessis avatar Jul 16 '23 15:07 MichaelDuPlessis

I confirm it on my system. I have set SXHKD_SHELL to /bin/sh, which on my system is dash. However, sxhkd still tries to execute commands in fish (which is my login shell) and with many of them, of course, fails.

Why does sxhkd even try to execute commands with $SHELL instead of /bin/sh to begin with? It's not so rare for people to use non-POSIX-compliant shell for their login shell, fish is not the only one. OTH, /bin/sh will always link to a POSIX-compliant shell.

So I think that the default behavior should be different and use /bin/sh instead of $SHELL. If it is not possible for backwards-compatibility reason, then sxhkd should at least pay attention to its own variable $SXHKD_SHELL whose whole supposed reason is to prevent this mess.

Kzer-Za avatar Sep 10 '23 10:09 Kzer-Za