|
1 |
| - |
2 | 1 | #
|
3 | 2 | # ──────────────────────────────────────────────── I ───────
|
4 |
| -# :::::: S U P E R N E R D |
| 3 | +# :::::: S U P E R N E R D – BOTTOM |
5 | 4 | # ──────────────────────────────────────────────────────────
|
6 | 5 | #
|
7 | 6 |
|
|
21 | 20 | mem : "ps -A -o %mem | awk '{s+=$1} END {print s \"%\"}' "
|
22 | 21 | hdd : "df -hl | awk '{s+=$5} END {print s \"%\"}'"
|
23 | 22 | date : "date +\"%a %d %b\""
|
24 |
| - focus : "/usr/local/bin/chunkc tiling::query --window owner" |
25 | 23 |
|
26 | 24 | #
|
27 | 25 | # ─── COLORS ─────────────────────────────────────────────────────────────────
|
|
49 | 47 | "$(#{ commands.cpu }):::" +
|
50 | 48 | "$(#{ commands.mem }):::" +
|
51 | 49 | "$(#{ commands.hdd }):::" +
|
52 |
| - "$(#{ commands.date }):::" + |
53 |
| - "$(#{ commands.focus }):::" |
| 50 | + "$(#{ commands.date }):::" |
54 | 51 |
|
55 | 52 |
|
56 | 53 |
|
57 | 54 | #
|
58 | 55 | # ─── REFRESH ────────────────────────────────────────────────────────────────
|
59 | 56 | #
|
60 | 57 |
|
61 |
| - refreshFrequency: 1028 |
| 58 | + refreshFrequency:5012 |
62 | 59 |
|
63 | 60 | #
|
64 | 61 | # ─── RENDER ─────────────────────────────────────────────────────────────────
|
|
69 | 66 | <link rel="stylesheet" href="./font-awesome/font-awesome.min.css" />
|
70 | 67 | <div class="container" id="main">
|
71 | 68 | <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 |
75 | 76 | </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 |
79 | 80 | </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 |
83 | 84 | </div>
|
84 | 85 | </div>
|
85 | 86 |
|
86 | 87 | <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> |
91 | 88 | </div>
|
92 | 89 |
|
93 | 90 | <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> |
101 | 94 | </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> |
105 | 98 | </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> |
109 | 102 | </div>
|
110 |
| - <div class="date"> |
111 |
| - <i class="far fa-calendar-alt"></i> |
112 |
| - <span class="date-output"></span> |
113 | 103 | </div>
|
114 | 104 |
|
115 | 105 | </div>
|
|
132 | 122 | mem = output[ 5 ]
|
133 | 123 | hdd = output[ 6 ]
|
134 | 124 | date = output[ 7 ]
|
135 |
| - focus = output[ 8 ] |
136 | 125 |
|
137 | 126 |
|
138 | 127 | $( ".time-output" ) .text( "#{ time }" )
|
|
143 | 132 | $( ".cpu-output") .text("#{ cpu }")
|
144 | 133 | $( ".mem-output") .text("#{ mem }")
|
145 | 134 | $( ".hdd-output") .text("#{ hdd }")
|
146 |
| - $( ".window-output" ).text( "#{ focus }" ) |
147 | 135 |
|
148 | 136 |
|
149 | 137 | @handleBattery( Number( battery.replace( /%/g, "" ) ) )
|
|
200 | 188 | color: #{ colors.red }
|
201 | 189 | .window
|
202 | 190 | 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 | +
|
205 | 200 |
|
206 |
| - top: 16px |
| 201 | + bottom: 4px |
207 | 202 | left: 16px
|
208 | 203 |
|
209 | 204 | font-family: 'Menlo'
|
|
212 | 207 | z-index: 0
|
213 | 208 | display: flex
|
214 | 209 |
|
| 210 | + i |
| 211 | + margin-left:16px |
| 212 | +
|
215 | 213 | .container
|
216 | 214 | display: flex;
|
217 | 215 | flex-direction: row;
|
|
239 | 237 | justify-content:flex-end
|
240 | 238 |
|
241 | 239 | """
|
| 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" |
242 | 248 |
|
243 | 249 | # ──────────────────────────────────────────────────────────────────────────────
|
0 commit comments