zzzeyez/pecan

pecan-style command not working properly

Closed this issue · 8 comments

Hi,

when I finished all the steps you showed and run pecan-style --list, it shows:

/usr/local/bin/pecan-style: line 66: cd: HOME/Applications/Übersicht/widgets//Pecan: No such file or directory

why is line 66 in pecan-style file has two / in HOME/Applications/Übersicht/widgets//Pecan?

Thanks

all the command I ran after installing Übersicht:

  1. git clone https://github.com/zzzeyez/Pecan.git $HOME/Applications/Übersicht/widgets/Pecan

  2. sed -i -e "s~/Users/zzzeyez/scripts/uber~HOME/Applications/Übersicht/widgets~g" "$HOME/Applications/Übersicht/widgets/Pecan/pecan-style"

  3. mv "$HOME/Library/Applications/Übersicht/widgets/Pecan/pecan-style" "/usr/local/bin"

  4. Yuanmengs-MacBook-Pro:~ yuanmengli$ pecan-style --list /usr/local/bin/pecan-style: line 66: cd: HOME/Applications/Übersicht/widgets//Pecan: No such file or directory

same problem too, @zzzeyez

Same.

A part of me feels like we should not be using "s~/Users/zzzeyez/scripts/uber~HOME/Applications/Übersicht/widgets~g" ?

but if not what should we use?

I would just manually edit the pecan-style script. Set the uber variable at the top to the location of your widgets folder without a trailing slash. This lead to more issues for me, I think because of either the Ü character or space causing problems. My solution was to make a symbolic link to my widgets folder in ~/Documents.

ln -s $HOME/Library/Application\ Support/Übersicht/widgets ~/Documents/uber

and then set line 6 of pecan-style to:

uber="$HOME/Documents/uber"

You might encounter this issue once you get that variable set correctly: #1

Hey, I fixed this issue a couple days ago. The Ü was my problem. I changed the Ü to U in these places:

  1. The app (rename the file in the Applications folder to Ubersicht)
  2. The container folder of the widget folder (application support path from the comment above)
  3. The reference to the Übersicht application in the refresh function in the pecan-style script.

It worked immediately for me after that.

Hey, the original problems arise because you forgot to use the sed command on the original file. The sed command replaces all the bad instances with your own instances. No need for you to manually edit the file.
Edit: wadegbow was right, silly me. It was the uber variable, and you can manually edit it if you like.

the sed command is just manually editing the top of the script. feel free to manually type in the location of your ubersicht widgets.

also, i have discovered that the Ü character causes many problems. i have decided to refresh like so instead:

refresh(){
osascript -e 'tell application "'$(ps ax | grep sicht | awk '{print $5}' | head -1 | cut -d/ -f3 | cut -d. -f1)'" to refresh'
}

hope this works more universally