baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.79k stars 414 forks source link

workaround for panel load in zsh env #247

Closed CJD14 closed 9 years ago

CJD14 commented 9 years ago

So when I launch bspwm I dont get any panel at all.

panel & 

is set in the bspwmrc

% echo $PANEL_FIFO 
% /tmp/panel-fifo

is set and the right variable

bspwm-git sxhkd-git sutils-git xtitle-git bar-aint-recursive

everything was installed on arch-linux via AUR according to this link

~/.config/sxhkd/sxhkdrc

exists

~/.config/bspwm/bspwmrc

exists and is executable

and finally, panel, panel_bar, and panel_colors exist, in $PATH, and are executable as well. This is where the problem lies I believe. I use ZSH as my shell, and so I blindly set the path in my zshenv file. After a quick chat on irc.freenode.net#bspwm I was pointed in the right direction and was told someone else had to change their path or set it else where other than a .zprofile or other .zfile.

I just tried setting the path in /etc/profile instead, but was unsuccessful the last time. Im going to move the panel files elsewhere I suppose that is already in the path for sure, even though I can confirm /home/user/bin is in my $PATH variable where the panel files are located.

This seems to be an issue interacting with zsh as these are expecting sh/bash configuration on load.

Either I think it should be explained a bit in the docs or worked around that it detects when it may be in an alternative shells path.

Thanks for your time.

ryneeverett commented 9 years ago

FYI, Arch now has bspwm and sxhkd in official repos and I'd expect those to be more stable.

Did you check to see if the panel process is running? (ps aux | grep panel) When I first tried bspwm I thought my panel wasn't running when I actually just needed to add some padding in my bspwmrc to make it visible (bspc config bottom_padding 29).

CJD14 commented 9 years ago

I dont know what happened. I couldn't get it to load no matter what. I noticed it was not running for sure after I checked ps aux like you mentioned would run panel manually from the terminal, and it would show.

I managed to get it to work after putting it both in my /etc/profile and also ~/.zprofile.

export XDG_CONFIG_HOME="/home/cjd/.config"
export BSPWM_SOCKET="/tmp/bspwm-socket"
export PANEL_FIFO="/tmp/panel-fifo"
export PATH=$PATH:/home/cjd/bin

then it worked perfect.

so I rebooted to be sure that it is consistent, but the second time the problem you mention occured, it was showing but wouldn't display. though i added 15 to my top padding config. Whats the bottom one for? is your bar at the bottom?

ryneeverett commented 9 years ago

Yeah, I like my panel at the bottom. Add padding wherever you need it.

CJD14 commented 9 years ago

Okay thanks a bunch. I think I got it all set now. Perfect. I appreciate the help. I have restarted quite a few times and haven't recreated the issue of it not showing back up. but now I need to hunt down an issue as to why the mouse doesn't respond until a window is opened.

But still that is a bit confusing, and it appears quite a few people in the IRC channel seemed to also experience the same exact issue.

We were curious what should we do to set these variables. One person who uses zsh as their shell had to set it in /etc/profile but it didnt make a difference for me, I had to put it in my .zprofile in home for it to work. My zsh shell may be invoked differently that him.

I also saw another really simple solution in someone elses config, they just put this at the bottom of their bspwmrc instead of panel & : /home/user/.config/bspwm/panel & that way it should not be required to be in path and should work regardless of setup. just thoughts.

ryneeverett commented 9 years ago

Is the line: emulate sh -c 'source /etc/profile' in your /etc/zsh/zprofile? See the wiki:

Please note that on Arch Linux, by default it contains one line which source the /etc/profile, see below for details.