zzzeyez / pecan Goto Github PK
View Code? Open in Web Editor NEWmenubar for macOS
License: GNU General Public License v3.0
menubar for macOS
License: GNU General Public License v3.0
When trying to configure and install pecan-style, the following command fails:
sed -i -e "s~/Users/zzzeyez/scripts/uber~HOME/Library/Application\ Support/Übersicht/widgets~g" "$HOME/Library/Application\ Support/Übersicht/widgets/Pecan/pecan-style"
And returns:
sed: /Users/inftp/Library/Application\ Support/Übersicht/widgets/Pecan/pecan-style: No such file or directory
This is using Übersicht's default settings and cloning Pecan into "~/Library/Application Support/Übersicht/widgets"
In the current version as of writing this the css class names within the *.coffee
files do not match the configured class names in the style.css
files.
Here's a list of classnames that need updating:
background
renamed to pecanbackground
left
renamed to pecanworkspace
left2
renamed to pecannetwork
center
renamed to pecandate
right
renamed to pecanclock
right2
renamed to pecanbattery
Hi there, first of all thanks for this project, been a fan of unixporn
for some time and found this project there.
This is not an issue but more a how-to
. While the Debug Console is open i'm trying to debug some css, but due to the refresh rates of each .coffee
the node's keep collapsing making it hard to inspect the css.
Any way around this ?
Thanks!
I will like to avoid seeing the menubar when the mouse reaches the top of the screen.
Is this possible?
Where did that feature go? Any suggestions on how I could code it myself?
I feel like there's a really good opportunity to migrate Pecan from CoffeeScript to JSX format. My main motivation for the migration is Ubersicht's move to the .jsx format. While CoffeeScript is supported at this time, it looks the move is for future versions of widgets to use the JSX format and this would ensure Pecan doesn't get affected if CoffeeScript is eventually depreciated/unsupported. I'm more than happy to lend a hand with converting it to JSX format and assisting with debugging as I love this widget and want to help enhance its feature-set.
With my chunkwm setup, I get "chunkc: connection failed! Pecan/scripts/ws: line 15: [: =: unary operator expected chunkc: connection failed!"
after running pecan. I fixed it temporarily by removing:
if exists /usr/local/bin/chunkc ; then
/usr/local/bin/chunkc tiling::query --desktop id
else
& fi
from the ws script, but not sure what the nature of the problem is based on the debug error. Maybe something to do with a chunkwm update?
Personally I think this might have to do with a missing font. Very well might be my fault. What should I do?
Wal on the rest of my stuff works but when trying the wal-set script, the widget refreshes and that's it. I have sassc installed.
I cannot drag or click on folders or anything on desktop.
I found Ubersicht years ago and use the Sidebar set of widgets. When these are loaded, it pushes the entire Pecan view up the viewport. Not sure if this is to do with block display or what (I avoid front-end work as much as I can...), but is there a way to get other Ubersicht widgets to be ignored in the logic to sit on top of the Pecan background?
Thanks!
@zzzeyez I see in your screenshots (as well in Xanthia) that you have different icons, such as the moon or for music playing?
I was wondering how you're using these, and if there's any logic for setting them. Currently the default ✮ is what my clock shows.
I'm asking, because I'm working on pulling the music player from my own Uber-bar into your project here, but the icon doesn't match the one used in Xanthia:
I really like this minimalistic bar, however, it is possible to show all the workspaces while highlight the current workspace (Like bold or color)? Thanks!
I'm not using chunkwm, so there should be an apple logo in place of the window id in left. However, it's just showing a vertical rectangle where the logo should be. Do you know how to fix this?
edit: just used a unicode apple symbol
administrator$ bash ~/Library/Application\ Support/Übersicht/widgets/Pecan/wal-set42:48: syntax error: Expected end of line but found identifier. (-2741)
Here is my wal-set script
#!/usr/bin/env bash
sassc --style expanded "$(dirname "$0")/scss/style.scss" > "$(dirname "$0")/style.css" &&
osascript <<EOD
tell application "Übersicht"
refresh widget id "Pecan-background-coffee"
end tell
EOD
Here's my style.css
/* Pecan is a bar for Ubersicht /
/ Written by Daniel Neemann */
// Import Colors
@import "/Users/administrator/.cache/wal/colors.scss";
:root {
/* Define your resolution */
--monitorwidth: 1920px;
--monitorheight: 1080px;
/* Choose background colors, ordered from left to right */
/* Set --bgcenter to "none" to have date's background same as bar */
--bg: $color0;
--bgleft: $color1;
--bgleft2: $color8;
--bgcenter: $color0;
--bgright2: $color8;
--bgright: $color6;
/* Choose foreground colors */
--fgleft: $color0;
--fgleft2: $color1;
--fgcenter: $color7;
--fgright2: $color6;
--fgright: $color0;
/* Opacity. Change --opacitycenter to 0 in order to hide date */
/* --opacity affects --border, so set it to 0 if you would like */
/* for every widget to appear independent. */
--opacity: 1;
--opacitysides: 1;
--opacitycenter: 1;
/* Entire bar's outer padding (use --border for space between widgets) */
--paddingleft: 300px;
--paddingright: 300px;
--paddingv: 10px;
/* Inner-horizontal padding. --height determines inner-vertical padding */
--textpadding: 2ch;
/* Bar's total height including --border and excluding padding */
--height: 25px;
/* Mono font recommended (alignment depends on character width) */
--font: SF Mono, monospace;
--fontsize: 11px;
/* Border size. Also functions as space between widgets, */
/* so set --opacity to 0 if you want widgets to appear independent */
--border: 0px;
}
/* Get monitor width */
.screen {
width: var(--monitorwidth);
height: var(--monitorheight);
}
/* Bar background */
.background {
background-color: var(--bg);
display: block;
position: absolute;
height: var(--height);
left: 0px;
right: 0px;
margin: var(--paddingv) var(--paddingright) var(--paddingv) var(--paddingleft);
opacity: var(--opacity);
z-index: -1;
box-shadow: 0px 2px 8px 2px rgba(0,0,0,0.25);
}
/* Workspace indicator -- far left -- requires ChunkWM */
.left {
-webkit-font-smoothing: antialiased;
color: var(--fgleft);
display: block;
position: relative;
background-color: var(--bgleft);
opacity: var(--opacitysides);
font: var(--fontsize) var(--font);
left: var(--paddingleft);
padding: 0px var(--textpadding);
margin: calc(var(--paddingv) + var(--border)) var(--border);
line-height: calc(var(--height) - calc(var(--border) * 2);
}
/* Network bandwidth -- 2nd to left -- requires ifstat */
.left2 {
background-color: var(--bgleft2);
opacity: var(--opacitysides);
color: var(--fgleft2);
-webkit-font-smoothing: antialiased;
position: relative;
display: block;
font: var(--fontsize) var(--font);
left: calc(var(--paddingleft) + calc(var(--textpadding) * 2) + 1ch + var(--border));
padding: 0px var(--textpadding);
margin: var(--border);
top: var(--paddingv);
line-height: calc(var(--height) - calc(var(--border) * 2);
}
/* Date -- third to left -- set --opacitycenter to 0 to hide */
.center {
color: var(--fgcenter);
background-color: var(--bgcenter);
opacity: var(--opacitycenter);
-webkit-font-smoothing: antialiased;
position: absolute;
display: inline-block;
font: var(--fontsize) var(--font);
padding: 0px var(--textpadding);
width: auto;
left: 50%;
transform: translate(-50%);
margin: var(--border);
line-height: calc(var(--height) - calc(var(--border) * 2);
text-align: center;
}
/* This is a container to align the center widget */
.holder {
background-color: none;
display: block;
position: absolute;
height: var(--height);
left: 0px;
right: 0px;
margin: var(--paddingv) var(--paddingright) var(--paddingv) var(--paddingleft);
}
/* Battery percentage -- 4th to left */
.right2 {
-webkit-font-smoothing: antialiased;
color: var(--fgright2);
display: block;
position: relative;
background-color: var(--bgright2);
opacity: var(--opacitysides);
font: var(--fontsize) var(--font);
padding: 0px var(--textpadding);
margin: var(--border);
top: var(--paddingv);
float: right;
right: calc(var(--paddingright) + calc(var(--textpadding) * 2) + 9ch + 2px + calc(var(--border) * 2));
margin: var(--border);
line-height: calc(var(--height) - calc(var(--border) * 2));
}
/* Clock -- 5th to left */
.right {
-webkit-font-smoothing: antialiased;
color: var(--fgright);
display: block;
position: relative;
background-color: var(--bgright);
opacity: var(--opacitysides);
font: var(--fontsize) var(--font);
padding: 0px var(--textpadding);
margin: var(--border);
top: var(--paddingv);
float: right;
right: var(--paddingright);
margin-left: auto;
margin-right: var(--border);
line-height: calc(var(--height) - calc(var(--border) * 2);
}
Let me know if you need anything else. Running the latest version of macOS
Since chunkwm is no longer maintained, a worskpace view for its successor yabai would be nice. Thanks!
I am a noob, can you tell me how to make it like it is in the 3rd screenshot? I literally have no idea how to.
TIA
Hi, How can i hide some of the elements?
For example I don't need network plugin, how can i hide it?
After installing ifstat and refreshing the widgets, the download and upload speeds were not updating. After some quick testing, I was able to resolve the issue.
I found that removing -i en0
in both scripts, download and upload, resolved the issue.
The new scripts become /usr/local/bin/ifstat -n -z -S 1 1 | awk 'FNR == 3 {print $2}'
for download and /usr/local/bin/ifstat -n -z -S 1 1 | awk 'FNR == 3 {print $3}'
for upload.
i followed the instructions... nothing happened...
I'm trying to automatically update my wallpaper and theme every so often (current interval set at 14400 seconds or 4 hours.
Anyways, I have the following:
a wallpaper.plist
that calls /Users/elevate/scripts/theme_service.sh
~ cat scripts/theme_service.sh
#!/bin/bash
/usr/local/bin/wal -i /Users/elevate/Pictures/wallpapers && /Users/elevate/scripts/uber/widgets/Pecan/wal-set`
if i run that script outside the service, it works without issues. However, if I run the following command:
launchctrl start set.wallpaper (or let the service run automatically) the wallpaper changes however, wal-set doesn't run.
~ cat scripts/uber/widgets/Pecan/wal-set
#!/bin/bash
sassc --style expanded "$(dirname "$0")/scss/style.scss" > "$(dirname "$0")/style.css" &&
osascript /Users/elevate/scripts/refresh-pecan-background-coffee.scpt
Of course, if I run /Users/elevate/scripts/uber/widgets/Pecan/wal-set outside the service, that works as well.
Does anyone have any tips on how I can get this one last piece to work as a service?
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
Hi,
first of all, great tool! Its very easy to customize and provides some information for me :)
The thing is: I don't use Yabai, would it be somehow possible to have some kind of workspace indicator?
Also is it possible to somehow show the song from Apple Music?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.