Skip to content

Commit 5116371

Browse files
committed
Added secondary bar, application launcher, iTunes monitor
1 parent 02794de commit 5116371

File tree

8 files changed

+720
-146
lines changed

8 files changed

+720
-146
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_STORE

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ git clone https://github.com/blahsd/supernerd.widget $HOME/Library/Application\
3535
Supernerd is the only bar replacement that employs one single widget to display all of the informations you need. Since everybody else does it differently, it might be a bad idea, but I don't really know why, so I don't care. At any rate, having it this way probably reduces over head, and most importantly makes it super easy to theme, because you only have to edit one file's CSS which then applies to all of the widgets.
3636

3737
Supernerds ships themed with the colours of the [Snazzy](https://github.com/sindresorhus/hyper-snazzy) theme (which I recommend).
38+
39+
# Credits
40+
* [herbischoff/nerbar.widget](https://github.com/herrbischoff/nerdbar.widget): most of the original styling
41+
* [Pe8er/playbox.widget](https://github.com/Pe8er/Playbox.widget): the script that fetches information from iTunes, which I recklessly mutilated for use with supernerd
42+
* [syndresorhus/hyper-snazzy](https://github.com/sindresorhus/hyper-snazzy): I copied the sweet colors from here

bar.coffee renamed to bar-bottom.coffee

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
#
32
# ──────────────────────────────────────────────── I ───────
4-
# :::::: S U P E R N E R D
3+
# :::::: S U P E R N E R D – BOTTOM
54
# ──────────────────────────────────────────────────────────
65
#
76

@@ -21,7 +20,6 @@
2120
mem : "ps -A -o %mem | awk '{s+=$1} END {print s \"%\"}' "
2221
hdd : "df -hl | awk '{s+=$5} END {print s \"%\"}'"
2322
date : "date +\"%a %d %b\""
24-
focus : "/usr/local/bin/chunkc tiling::query --window owner"
2523

2624
#
2725
# ─── COLORS ─────────────────────────────────────────────────────────────────
@@ -49,16 +47,15 @@
4947
"$(#{ commands.cpu }):::" +
5048
"$(#{ commands.mem }):::" +
5149
"$(#{ commands.hdd }):::" +
52-
"$(#{ commands.date }):::" +
53-
"$(#{ commands.focus }):::"
50+
"$(#{ commands.date }):::"
5451

5552

5653

5754
#
5855
# ─── REFRESH ────────────────────────────────────────────────────────────────
5956
#
6057

61-
refreshFrequency: 1028
58+
refreshFrequency:5012
6259

6360
#
6461
# ─── RENDER ─────────────────────────────────────────────────────────────────
@@ -69,47 +66,40 @@
6966
<link rel="stylesheet" href="./font-awesome/font-awesome.min.css" />
7067
<div class="container" id="main">
7168
<div class="container" id="left">
72-
<div class="cpu">
73-
<i class="fa fa-spinner"></i>
74-
<span class="cpu-output"></span>
69+
<div class="home">
70+
<i class="fas fa-home"></i>
71+
~/
72+
</div>
73+
<div class="browser">
74+
<i class="far fa-compass"></i>
75+
Browser
7576
</div>
76-
<div class="mem">
77-
<i class="fas fa-server"></i>
78-
<span class="mem-output"></span>
77+
<div class="mail">
78+
<i class="far fa-envelope"></i>
79+
Mail
7980
</div>
80-
<div class="hdd">
81-
<i class="fas fa-hdd"></i>
82-
<span class="hdd-output"></span>
81+
<div class="messages">
82+
<i class="far fa-comments"></i>
83+
Messages
8384
</div>
8485
</div>
8586
8687
<div class="container" id="center">
87-
<div class="window">
88-
<i class="fa fa-window-maximize"></i>
89-
<span class="window-output"></span>
90-
</div>
9188
</div>
9289
9390
<div class="container" id="right">
94-
<div class="volume">
95-
<span class="volume-icon"></span>
96-
<span class="volume-output"></span>
97-
</div>
98-
<div class="wifi">
99-
<i class="fa fa-wifi"></i>
100-
<span class="wifi-output"></span>
91+
<div class="cpu">
92+
<i class="fa fa-spinner"></i>
93+
<span class="cpu-output"></span>
10194
</div>
102-
<div class="battery">
103-
<span class="battery-icon"></span>
104-
<span class="battery-output"></span>
95+
<div class="mem">
96+
<i class="fas fa-server"></i>
97+
<span class="mem-output"></span>
10598
</div>
106-
<div class="time">
107-
<i class="far fa-clock"></i>
108-
<span class="time-output"></span>
99+
<div class="hdd">
100+
<i class="fas fa-hdd"></i>
101+
<span class="hdd-output"></span>
109102
</div>
110-
<div class="date">
111-
<i class="far fa-calendar-alt"></i>
112-
<span class="date-output"></span>
113103
</div>
114104
115105
</div>
@@ -132,7 +122,6 @@
132122
mem = output[ 5 ]
133123
hdd = output[ 6 ]
134124
date = output[ 7 ]
135-
focus = output[ 8 ]
136125

137126

138127
$( ".time-output" ) .text( "#{ time }" )
@@ -143,7 +132,6 @@
143132
$( ".cpu-output") .text("#{ cpu }")
144133
$( ".mem-output") .text("#{ mem }")
145134
$( ".hdd-output") .text("#{ hdd }")
146-
$( ".window-output" ).text( "#{ focus }" )
147135

148136

149137
@handleBattery( Number( battery.replace( /%/g, "" ) ) )
@@ -200,10 +188,17 @@
200188
color: #{ colors.red }
201189
.window
202190
color: #{ colors.white }
203-
.battery,.time,.wifi,.volume,.cpu,.mem,.hdd,.date
204-
margin-right:24px
191+
.messages
192+
color: #{ colors.green }
193+
.mail
194+
color: #{ colors.cyan }
195+
.browser
196+
color: #{ colors.blue }
197+
.home
198+
color: #{ colors.white }
199+
205200
206-
top: 16px
201+
bottom: 4px
207202
left: 16px
208203
209204
font-family: 'Menlo'
@@ -212,6 +207,9 @@
212207
z-index: 0
213208
display: flex
214209
210+
i
211+
margin-left:16px
212+
215213
.container
216214
display: flex;
217215
flex-direction: row;
@@ -239,5 +237,13 @@
239237
justify-content:flex-end
240238
241239
"""
240+
#
241+
# ─── HANDLE CLICKS ──────────────────────────────────────────────────────────
242+
#
243+
afterRender: (domEl) ->
244+
$(domEl).on 'click', '.home', => @run "open ~"
245+
$(domEl).on 'click', '.browser', => @run "open /Applications/Safari.app"
246+
$(domEl).on 'click', '.mail', => @run "open /Applications/Mail.app"
247+
$(domEl).on 'click', '.messages', => @run "open /Applications/WhatsApp.app"
242248

243249
# ──────────────────────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)