Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show MusicCurrentTrack #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions MPDCurrentTrack.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
command: """
/usr/local/bin/mpc | head -1
"""

refreshFrequency: 2000

style: """
-webkit-font-smoothing: antialiased
font: 11px Menlo
top: 14px
left: 210px
color: #eee8d5
"""

render: (output) -> """
<div class="some-class">#{output}</div>
"""
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# zenbar
# dhyanabar

![Screenshot](screenshot.jpg)
![screenshot](https://user-images.githubusercontent.com/4723360/50490428-06517400-09db-11e9-8f4a-8425c617962a.png)

Übersicht system information bar for use with kwm window
manager. A fork of herrbischoff's
[nerdbar](https://github.com/herrbischoff/nerdbar.widget)
Übersicht system information bar to replace the stock macOS menubar. This fork adds current song playing (either Spotify or MPD) and current connected WiFi network, along with minor graphical changes.

A fork of zhaorz's [zenbar](https://github.com/zhaorz/zenbar)

Connected WiFi-SSID is thanks to [mactexan](https://github.com/mactexan/WiFi-SSID-Widget)

## Installation

Expand All @@ -13,5 +15,5 @@ Make sure you have [Übersicht](http://tracesof.net/uebersicht/) installed.
Then clone this repository.

```bash
git clone https://github.com/zhaorz/zenbar $HOME/Library/Application\ Support/Übersicht/widgets/zenbar
git clone https://github.com/Johngeorgesample/dhyanabar $HOME/Library/Application\ Support/Übersicht/widgets/dhyanabar
```
23 changes: 23 additions & 0 deletions SpotifyCurrentTrack.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
command: """
IFS='|' read -r theArtist theName <<<"$(osascript <<<'tell application "Spotify"
set theTrack to current track
set theArtist to artist of theTrack
set theName to name of theTrack
return theArtist & "|" & theName
end tell')"
echo "$theArtist - $theName"
"""

refreshFrequency: 2000

style: """
-webkit-font-smoothing: antialiased
font: 11px Menlo
top: 14px
left: 210px
color: #eee8d5
"""

render: (output) -> """
<div class="some-class">#{output}</div>
"""
13 changes: 9 additions & 4 deletions background.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ render: (output) ->
style: """
display: block
position: absolute
height: 20px
height: 25px
bottom: 0
top: 0
left: 0
right: 0
margin: 10px 20px
background-color: #505050
opacity: 0.9
margin: 7px 200px
background-color: #000
opacity: 0.6
z-index: -1
box-shadow: 2px 2px 6px 0px rgba(0,0,0,0.7)
"""


# #505050

# margin: 7px 20px
16 changes: 0 additions & 16 deletions battery.coffee

This file was deleted.

6 changes: 3 additions & 3 deletions cpu.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ render: (output) ->
style: """
-webkit-font-smoothing: antialiased
color: #eee8d5
font: 9px Menlo
right: 155px
top: 16px
font: 11px Menlo
right: 280px
top: 14px
span
color: #aaa
"""
6 changes: 3 additions & 3 deletions datetime.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
command: "date +\"%a %d %b %Y %H:%M:%S\""
command: "date +\"%a %b %d %Y | %I:%M\""

refreshFrequency: 1000

Expand All @@ -8,8 +8,8 @@ render: (output) ->
style: """
-webkit-font-smoothing: antialiased
color: #eee8d5
font: 9px Menlo
top: 16px
font: 12px Menlo
top: 14px
width: 100%

.date
Expand Down
6 changes: 3 additions & 3 deletions mem.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ render: (output) ->
style: """
-webkit-font-smoothing: antialiased
color: #eee8d5
font: 9px Menlo
right: 90px
top: 16px
font: 11px Menlo
right: 208px
top: 14px
span
color: #aaa
"""
Binary file removed screenshot.jpg
Binary file not shown.
6 changes: 3 additions & 3 deletions volume.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ render: (output) ->

style: """
-webkit-font-smoothing: antialiased
font: 9px Menlo
top: 16px
right: 220px
font: 11px Menlo
top: 14px
right: 350px
color: #eee8d5
span
color: #aaa
Expand Down
24 changes: 24 additions & 0 deletions wifi-network.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# WiFi SSID Widget
#
# Joe Kelley
#
# This widget displays the current connected WiFi network name. It can be helpful if you are in an environment where multiple networks are available.
# It uses the built-in OS X airport framework to get and display the SSID name (up to 20 characters in length)


command: "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep ' SSID' | cut -c 18-38"

refreshFrequency: 10000

# Adjust the style settings to suit. I've set the position to be just below the WiFi icon in my menu bar.
style: """
-webkit-font-smoothing: antialiased
color: #eee8d5
font: 11px Menlo
right: 410px
top: 14px
span
color: #aaa
"""
render: (output) ->
"wifi <span>#{output}</span>"