richie5um / TextBar-Recipes

TextBar Recipes
369 stars 35 forks source link

No text in menubar - just an icon and a dot #69

Closed hepcat72 closed 4 years ago

hepcat72 commented 4 years ago

My guess is that the script you're using doesn't have a shebang at the top, thus my default prefered shell is trying to run your bash script to generate the text? Because this is what I see:

textbarbug

Is there a work-around to get it to work without me changing my default shell?

richie5um commented 4 years ago

Hi. Can you replace those with your own script files - to verify your hypothesis? Thanks.

Let me know if that doesnt make sense :)

On Fri, 29 May 2020, at 5:41 PM, Robert Leach wrote:

My guess is that the script you're using doesn't have a shebang at the top, thus my default prefered shell is trying to run your bash script to generate the text? Because this is what I see:

textbarbug https://user-images.githubusercontent.com/2300532/83283687-9afc6a80-a1a9-11ea-83b5-932676a79e9d.png

Is there a work-around to get it to work without me changing my default shell?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/richie5um/TextBar-Recipes/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG5OGLGNMZG52ROUWFCES3RT7QTTANCNFSM4NOF73EQ.

hepcat72 commented 4 years ago

No, that wasn't it. Apparently the default shell in the advanced prefs defaults to the user's default shell, but the default "Shell Arguments" value (-l) is bash-specific. Removing the invalid -l (or editing the default shell to bash) fixes the problem.

hepcat72 commented 4 years ago

Whoops. It doesn't fix everything. I'm guessing that the local IP address option must add another bash-specific argument? It still displays as a dot.

richie5um commented 4 years ago

Can you try editing some of the values on the 'Preferences > Settings' tab? Changing the shell and launch options may help. Just to see if we can narrow it down.

It also logs out to Console.log.

hepcat72 commented 4 years ago

Yeah, I saw that. I enabled it briefly before I figured out the issue with the shell. I just encountered another issue. Perhaps it's related... I tried changing the font to look like what I'm used to, but all the changes are only applied to the external IP item and not the whoami item... I'll re-enable logging and take a look.

richie5um commented 4 years ago

Sorry, I'd missed your earlier comment. The local IP checks a specific adaptor, it could be the wrong one for your device.

richie5um commented 4 years ago

Ok, thanks.

hepcat72 commented 4 years ago

OK, hmmm... the external IP item's font size and position changes immediately and the whoami appears unaffected... until I close and re-open the preferences, and it immediately updates.

richie5um commented 4 years ago

Not ideal. But, sounds like it eventually works. Correct?

hepcat72 commented 4 years ago

Yeah.

hepcat72 commented 4 years ago

OK, so I looked in the console. Every other TextBar line has this error:

default 14:40:45.668523-0400 TextBar Script output error: PATH: Undefined variable.

Not sure why, as PATH is defined in both bash and in tcsh:

tcsh>echo $PATH
/opt/sw/bin:/opt/sw/sbin:~/local/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
tcsh>bash
bash-5.0$ echo $PATH
/opt/sw/bin:/opt/sw/sbin:~/local/miniconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
hepcat72 commented 4 years ago

I've been trying to add the local IP address. I ran into another issue. It does appear that another bash argument is added which I cannot edit. Switching the default shell to bash fixes that. It's worth noting that the example in your README for the DHCP address spits out the en5 address (although once I got the default local IP address option working, it was correct). But the other bug I encountered is that when you add a new item to the menu bar, their positions change around. I was putting the whoami output where "fast user switching" would be (since my university restricts that system pref and I like having that there). But when I added new items, the external IP would change places with whoami.

richie5um commented 4 years ago

The order of the items in the TextBar preferences list is intended to be reflected in the menubar. You can drag/drop the items in the list :).

hepcat72 commented 4 years ago

Yes, but adding a new item changes the order of the previously manually positioned items. Also, I'm seeing randomly, other items are changing positions after a sleep/wake cycle (when I close the laptop lid and re-open it later). Specifically, my AirPlay menu item shifts. I don't recall specifically where I was finding it, but it was something like this:

Before closing the lid (the order I manually set):

textbar-before-sleep

After re-opening the lid:

textbar-changed-after-sleep-wake

I guess I should be submitting these as separate issues...

richie5um commented 4 years ago

Are you re-positioning TextBar items using the macOS mechanism (hold command, click and drag icon)? If so, don't do that to reposition TextBar items - instead reposition the items in the TextBar Preferences list. TextBar isn't allowed to get access (or edit) the macOS ordering approach.

hepcat72 commented 4 years ago

Yes, though I don't see the ability to place the whoami item where I want it (between time & spotlight). I take it that's not possible without command-drag?

richie5um commented 4 years ago

You can use command-drag, but, it won't persist on reboot.