colonelpanic8 / dotfiles

Configuration files for XMonad, Emacs, NixOS, Taffybar and more.

Home Page:http://ivanmalison.github.io/dotfiles/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A question about your systemd units

patrickpichler opened this issue · comments

Hi,
thank you for sharing your awesome dotfiles with the world!

I have a question regarding your dotfiles. I'm not able to execute, for example, taffybar without specifying the total path to it. I tried putting it into /usr/bin but without luck.

How did you pull this off?

(I'm sorry if my question sounds dumb , but i struggled with it for weeks now and now i'm really frustrated)

@patrickpichler
the taffybar binary needs in a path that can be found in your $PATH environment variable (as seen by systemd)

even if taffybar (or the whatever binary in question) is on your path in your SHELL, it might not be there for the systemd session. That is why I explicitly import my PATH here:

https://github.com/IvanMalison/dotfiles/blob/c1652258034679a9620df42debec297a6c5bb071/dotfiles/lib/shellpath.sh#L24

You'll usually want this to get executed somehow from .xprofile or something like that.

One thing you should know about my taffybar setup is that it is slightly non-standard in that I don't use the binary provided by taffybar, but a script that actually runs a stack build for taffybar:

https://github.com/IvanMalison/dotfiles/blob/c1652258034679a9620df42debec297a6c5bb071/dotfiles/lib/bin/taffybar#L1

This in turn produces a binary called imalison-taffybar, and that is what actually gets executed.

In the typical case taffybar will be located in

/$HOME/.local/bin/taffybar if you are using stack or $HOME/.cabal/bin/taffybar in the case of cabal.

I tried putting it into /usr/bin but without luck.

I would recommend against ever explicitly copying anything into that directory unless it is absolutely necessary

Thank you for your answer. I must have overlooked the shellpath script in your configuration.

@patrickpichler I wouldn't try to lift too much stuff from shellpath unless you are going to use it in its entirety. My path stuff is pretty complicated, and it could end up confusing you more than it helps.their entirety.

One thing that is useful for figuring out systemd stuff is:

https://github.com/IvanMalison/dotfiles/blob/master/dotfiles/lib/bin/rofi_systemd.sh

you can use the tail option to look at what is happening with any given sytemd unit without worrying about if its in the system session or th euser session

I will take a look at it. Thank you.