├── .gitignore ├── LICENSE ├── app ├── css │ ├── bootstrap.css │ ├── index.css │ └── settings.css ├── img │ ├── app-icon.icns │ ├── app-icon.ico │ ├── app-icon.png │ ├── close.png │ ├── icons │ │ ├── applause.png │ │ ├── ba-dum-tsss.png │ │ ├── crowd-laughing.png │ │ └── money.png │ ├── logo.png │ ├── settings.png │ ├── speaker.png │ ├── tray-icon-alt.png │ ├── tray-icon-alt@2x.png │ ├── tray-iconTemplate.png │ └── tray-iconTemplate@2x.png ├── index.html ├── js │ ├── index.js │ └── settings.js ├── settings.html └── wav │ ├── applause.wav │ ├── ba-dum-tsss.wav │ ├── burp.wav │ ├── crowd-laughing.wav │ ├── fart.wav │ ├── money.wav │ └── sad-trombone.wav ├── configuration.js ├── main.js ├── package.json └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | *.log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Kristian Poslek 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/css/bootstrap.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=e80a4375dea39240551f) 9 | * Config saved to config.json and https://gist.github.com/e80a4375dea39240551f 10 | */ 11 | /*! 12 | * Bootstrap v3.3.5 (http://getbootstrap.com) 13 | * Copyright 2011-2015 Twitter, Inc. 14 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 15 | */ 16 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ 17 | html { 18 | font-family: sans-serif; 19 | -ms-text-size-adjust: 100%; 20 | -webkit-text-size-adjust: 100%; 21 | } 22 | body { 23 | margin: 0; 24 | } 25 | article, 26 | aside, 27 | details, 28 | figcaption, 29 | figure, 30 | footer, 31 | header, 32 | hgroup, 33 | main, 34 | menu, 35 | nav, 36 | section, 37 | summary { 38 | display: block; 39 | } 40 | audio, 41 | canvas, 42 | progress, 43 | video { 44 | display: inline-block; 45 | vertical-align: baseline; 46 | } 47 | audio:not([controls]) { 48 | display: none; 49 | height: 0; 50 | } 51 | [hidden], 52 | template { 53 | display: none; 54 | } 55 | a { 56 | background-color: transparent; 57 | } 58 | a:active, 59 | a:hover { 60 | outline: 0; 61 | } 62 | abbr[title] { 63 | border-bottom: 1px dotted; 64 | } 65 | b, 66 | strong { 67 | font-weight: bold; 68 | } 69 | dfn { 70 | font-style: italic; 71 | } 72 | h1 { 73 | font-size: 2em; 74 | margin: 0.67em 0; 75 | } 76 | mark { 77 | background: #ff0; 78 | color: #000; 79 | } 80 | small { 81 | font-size: 80%; 82 | } 83 | sub, 84 | sup { 85 | font-size: 75%; 86 | line-height: 0; 87 | position: relative; 88 | vertical-align: baseline; 89 | } 90 | sup { 91 | top: -0.5em; 92 | } 93 | sub { 94 | bottom: -0.25em; 95 | } 96 | img { 97 | border: 0; 98 | } 99 | svg:not(:root) { 100 | overflow: hidden; 101 | } 102 | figure { 103 | margin: 1em 40px; 104 | } 105 | hr { 106 | -webkit-box-sizing: content-box; 107 | -moz-box-sizing: content-box; 108 | box-sizing: content-box; 109 | height: 0; 110 | } 111 | pre { 112 | overflow: auto; 113 | } 114 | code, 115 | kbd, 116 | pre, 117 | samp { 118 | font-family: monospace, monospace; 119 | font-size: 1em; 120 | } 121 | button, 122 | input, 123 | optgroup, 124 | select, 125 | textarea { 126 | color: inherit; 127 | font: inherit; 128 | margin: 0; 129 | } 130 | button { 131 | overflow: visible; 132 | } 133 | button, 134 | select { 135 | text-transform: none; 136 | } 137 | button, 138 | html input[type="button"], 139 | input[type="reset"], 140 | input[type="submit"] { 141 | -webkit-appearance: button; 142 | cursor: pointer; 143 | } 144 | button[disabled], 145 | html input[disabled] { 146 | cursor: default; 147 | } 148 | button::-moz-focus-inner, 149 | input::-moz-focus-inner { 150 | border: 0; 151 | padding: 0; 152 | } 153 | input { 154 | line-height: normal; 155 | } 156 | input[type="checkbox"], 157 | input[type="radio"] { 158 | -webkit-box-sizing: border-box; 159 | -moz-box-sizing: border-box; 160 | box-sizing: border-box; 161 | padding: 0; 162 | } 163 | input[type="number"]::-webkit-inner-spin-button, 164 | input[type="number"]::-webkit-outer-spin-button { 165 | height: auto; 166 | } 167 | input[type="search"] { 168 | -webkit-appearance: textfield; 169 | -webkit-box-sizing: content-box; 170 | -moz-box-sizing: content-box; 171 | box-sizing: content-box; 172 | } 173 | input[type="search"]::-webkit-search-cancel-button, 174 | input[type="search"]::-webkit-search-decoration { 175 | -webkit-appearance: none; 176 | } 177 | fieldset { 178 | border: 1px solid #c0c0c0; 179 | margin: 0 2px; 180 | padding: 0.35em 0.625em 0.75em; 181 | } 182 | legend { 183 | border: 0; 184 | padding: 0; 185 | } 186 | textarea { 187 | overflow: auto; 188 | } 189 | optgroup { 190 | font-weight: bold; 191 | } 192 | table { 193 | border-collapse: collapse; 194 | border-spacing: 0; 195 | } 196 | td, 197 | th { 198 | padding: 0; 199 | } 200 | * { 201 | -webkit-box-sizing: border-box; 202 | -moz-box-sizing: border-box; 203 | box-sizing: border-box; 204 | } 205 | *:before, 206 | *:after { 207 | -webkit-box-sizing: border-box; 208 | -moz-box-sizing: border-box; 209 | box-sizing: border-box; 210 | } 211 | html { 212 | font-size: 10px; 213 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 214 | } 215 | body { 216 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 217 | font-size: 14px; 218 | line-height: 1.42857143; 219 | color: #333333; 220 | background-color: #ffffff; 221 | } 222 | input, 223 | button, 224 | select, 225 | textarea { 226 | font-family: inherit; 227 | font-size: inherit; 228 | line-height: inherit; 229 | } 230 | a { 231 | color: #337ab7; 232 | text-decoration: none; 233 | } 234 | a:hover, 235 | a:focus { 236 | color: #23527c; 237 | text-decoration: underline; 238 | } 239 | a:focus { 240 | outline: thin dotted; 241 | outline: 5px auto -webkit-focus-ring-color; 242 | outline-offset: -2px; 243 | } 244 | figure { 245 | margin: 0; 246 | } 247 | img { 248 | vertical-align: middle; 249 | } 250 | .img-responsive { 251 | display: block; 252 | max-width: 100%; 253 | height: auto; 254 | } 255 | .img-rounded { 256 | border-radius: 6px; 257 | } 258 | .img-thumbnail { 259 | padding: 4px; 260 | line-height: 1.42857143; 261 | background-color: #ffffff; 262 | border: 1px solid #dddddd; 263 | border-radius: 4px; 264 | -webkit-transition: all 0.2s ease-in-out; 265 | -o-transition: all 0.2s ease-in-out; 266 | transition: all 0.2s ease-in-out; 267 | display: inline-block; 268 | max-width: 100%; 269 | height: auto; 270 | } 271 | .img-circle { 272 | border-radius: 50%; 273 | } 274 | hr { 275 | margin-top: 20px; 276 | margin-bottom: 20px; 277 | border: 0; 278 | border-top: 1px solid #eeeeee; 279 | } 280 | .sr-only { 281 | position: absolute; 282 | width: 1px; 283 | height: 1px; 284 | margin: -1px; 285 | padding: 0; 286 | overflow: hidden; 287 | clip: rect(0, 0, 0, 0); 288 | border: 0; 289 | } 290 | .sr-only-focusable:active, 291 | .sr-only-focusable:focus { 292 | position: static; 293 | width: auto; 294 | height: auto; 295 | margin: 0; 296 | overflow: visible; 297 | clip: auto; 298 | } 299 | [role="button"] { 300 | cursor: pointer; 301 | } 302 | .container { 303 | margin-right: auto; 304 | margin-left: auto; 305 | padding-left: 15px; 306 | padding-right: 15px; 307 | } 308 | @media (min-width: 768px) { 309 | .container { 310 | width: 750px; 311 | } 312 | } 313 | @media (min-width: 992px) { 314 | .container { 315 | width: 970px; 316 | } 317 | } 318 | @media (min-width: 1200px) { 319 | .container { 320 | width: 1170px; 321 | } 322 | } 323 | .container-fluid { 324 | margin-right: auto; 325 | margin-left: auto; 326 | padding-left: 15px; 327 | padding-right: 15px; 328 | } 329 | .row { 330 | margin-left: -15px; 331 | margin-right: -15px; 332 | } 333 | .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { 334 | position: relative; 335 | min-height: 1px; 336 | padding-left: 15px; 337 | padding-right: 15px; 338 | } 339 | .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { 340 | float: left; 341 | } 342 | .col-xs-12 { 343 | width: 100%; 344 | } 345 | .col-xs-11 { 346 | width: 91.66666667%; 347 | } 348 | .col-xs-10 { 349 | width: 83.33333333%; 350 | } 351 | .col-xs-9 { 352 | width: 75%; 353 | } 354 | .col-xs-8 { 355 | width: 66.66666667%; 356 | } 357 | .col-xs-7 { 358 | width: 58.33333333%; 359 | } 360 | .col-xs-6 { 361 | width: 50%; 362 | } 363 | .col-xs-5 { 364 | width: 41.66666667%; 365 | } 366 | .col-xs-4 { 367 | width: 33.33333333%; 368 | } 369 | .col-xs-3 { 370 | width: 25%; 371 | } 372 | .col-xs-2 { 373 | width: 16.66666667%; 374 | } 375 | .col-xs-1 { 376 | width: 8.33333333%; 377 | } 378 | .col-xs-pull-12 { 379 | right: 100%; 380 | } 381 | .col-xs-pull-11 { 382 | right: 91.66666667%; 383 | } 384 | .col-xs-pull-10 { 385 | right: 83.33333333%; 386 | } 387 | .col-xs-pull-9 { 388 | right: 75%; 389 | } 390 | .col-xs-pull-8 { 391 | right: 66.66666667%; 392 | } 393 | .col-xs-pull-7 { 394 | right: 58.33333333%; 395 | } 396 | .col-xs-pull-6 { 397 | right: 50%; 398 | } 399 | .col-xs-pull-5 { 400 | right: 41.66666667%; 401 | } 402 | .col-xs-pull-4 { 403 | right: 33.33333333%; 404 | } 405 | .col-xs-pull-3 { 406 | right: 25%; 407 | } 408 | .col-xs-pull-2 { 409 | right: 16.66666667%; 410 | } 411 | .col-xs-pull-1 { 412 | right: 8.33333333%; 413 | } 414 | .col-xs-pull-0 { 415 | right: auto; 416 | } 417 | .col-xs-push-12 { 418 | left: 100%; 419 | } 420 | .col-xs-push-11 { 421 | left: 91.66666667%; 422 | } 423 | .col-xs-push-10 { 424 | left: 83.33333333%; 425 | } 426 | .col-xs-push-9 { 427 | left: 75%; 428 | } 429 | .col-xs-push-8 { 430 | left: 66.66666667%; 431 | } 432 | .col-xs-push-7 { 433 | left: 58.33333333%; 434 | } 435 | .col-xs-push-6 { 436 | left: 50%; 437 | } 438 | .col-xs-push-5 { 439 | left: 41.66666667%; 440 | } 441 | .col-xs-push-4 { 442 | left: 33.33333333%; 443 | } 444 | .col-xs-push-3 { 445 | left: 25%; 446 | } 447 | .col-xs-push-2 { 448 | left: 16.66666667%; 449 | } 450 | .col-xs-push-1 { 451 | left: 8.33333333%; 452 | } 453 | .col-xs-push-0 { 454 | left: auto; 455 | } 456 | .col-xs-offset-12 { 457 | margin-left: 100%; 458 | } 459 | .col-xs-offset-11 { 460 | margin-left: 91.66666667%; 461 | } 462 | .col-xs-offset-10 { 463 | margin-left: 83.33333333%; 464 | } 465 | .col-xs-offset-9 { 466 | margin-left: 75%; 467 | } 468 | .col-xs-offset-8 { 469 | margin-left: 66.66666667%; 470 | } 471 | .col-xs-offset-7 { 472 | margin-left: 58.33333333%; 473 | } 474 | .col-xs-offset-6 { 475 | margin-left: 50%; 476 | } 477 | .col-xs-offset-5 { 478 | margin-left: 41.66666667%; 479 | } 480 | .col-xs-offset-4 { 481 | margin-left: 33.33333333%; 482 | } 483 | .col-xs-offset-3 { 484 | margin-left: 25%; 485 | } 486 | .col-xs-offset-2 { 487 | margin-left: 16.66666667%; 488 | } 489 | .col-xs-offset-1 { 490 | margin-left: 8.33333333%; 491 | } 492 | .col-xs-offset-0 { 493 | margin-left: 0%; 494 | } 495 | @media (min-width: 768px) { 496 | .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { 497 | float: left; 498 | } 499 | .col-sm-12 { 500 | width: 100%; 501 | } 502 | .col-sm-11 { 503 | width: 91.66666667%; 504 | } 505 | .col-sm-10 { 506 | width: 83.33333333%; 507 | } 508 | .col-sm-9 { 509 | width: 75%; 510 | } 511 | .col-sm-8 { 512 | width: 66.66666667%; 513 | } 514 | .col-sm-7 { 515 | width: 58.33333333%; 516 | } 517 | .col-sm-6 { 518 | width: 50%; 519 | } 520 | .col-sm-5 { 521 | width: 41.66666667%; 522 | } 523 | .col-sm-4 { 524 | width: 33.33333333%; 525 | } 526 | .col-sm-3 { 527 | width: 25%; 528 | } 529 | .col-sm-2 { 530 | width: 16.66666667%; 531 | } 532 | .col-sm-1 { 533 | width: 8.33333333%; 534 | } 535 | .col-sm-pull-12 { 536 | right: 100%; 537 | } 538 | .col-sm-pull-11 { 539 | right: 91.66666667%; 540 | } 541 | .col-sm-pull-10 { 542 | right: 83.33333333%; 543 | } 544 | .col-sm-pull-9 { 545 | right: 75%; 546 | } 547 | .col-sm-pull-8 { 548 | right: 66.66666667%; 549 | } 550 | .col-sm-pull-7 { 551 | right: 58.33333333%; 552 | } 553 | .col-sm-pull-6 { 554 | right: 50%; 555 | } 556 | .col-sm-pull-5 { 557 | right: 41.66666667%; 558 | } 559 | .col-sm-pull-4 { 560 | right: 33.33333333%; 561 | } 562 | .col-sm-pull-3 { 563 | right: 25%; 564 | } 565 | .col-sm-pull-2 { 566 | right: 16.66666667%; 567 | } 568 | .col-sm-pull-1 { 569 | right: 8.33333333%; 570 | } 571 | .col-sm-pull-0 { 572 | right: auto; 573 | } 574 | .col-sm-push-12 { 575 | left: 100%; 576 | } 577 | .col-sm-push-11 { 578 | left: 91.66666667%; 579 | } 580 | .col-sm-push-10 { 581 | left: 83.33333333%; 582 | } 583 | .col-sm-push-9 { 584 | left: 75%; 585 | } 586 | .col-sm-push-8 { 587 | left: 66.66666667%; 588 | } 589 | .col-sm-push-7 { 590 | left: 58.33333333%; 591 | } 592 | .col-sm-push-6 { 593 | left: 50%; 594 | } 595 | .col-sm-push-5 { 596 | left: 41.66666667%; 597 | } 598 | .col-sm-push-4 { 599 | left: 33.33333333%; 600 | } 601 | .col-sm-push-3 { 602 | left: 25%; 603 | } 604 | .col-sm-push-2 { 605 | left: 16.66666667%; 606 | } 607 | .col-sm-push-1 { 608 | left: 8.33333333%; 609 | } 610 | .col-sm-push-0 { 611 | left: auto; 612 | } 613 | .col-sm-offset-12 { 614 | margin-left: 100%; 615 | } 616 | .col-sm-offset-11 { 617 | margin-left: 91.66666667%; 618 | } 619 | .col-sm-offset-10 { 620 | margin-left: 83.33333333%; 621 | } 622 | .col-sm-offset-9 { 623 | margin-left: 75%; 624 | } 625 | .col-sm-offset-8 { 626 | margin-left: 66.66666667%; 627 | } 628 | .col-sm-offset-7 { 629 | margin-left: 58.33333333%; 630 | } 631 | .col-sm-offset-6 { 632 | margin-left: 50%; 633 | } 634 | .col-sm-offset-5 { 635 | margin-left: 41.66666667%; 636 | } 637 | .col-sm-offset-4 { 638 | margin-left: 33.33333333%; 639 | } 640 | .col-sm-offset-3 { 641 | margin-left: 25%; 642 | } 643 | .col-sm-offset-2 { 644 | margin-left: 16.66666667%; 645 | } 646 | .col-sm-offset-1 { 647 | margin-left: 8.33333333%; 648 | } 649 | .col-sm-offset-0 { 650 | margin-left: 0%; 651 | } 652 | } 653 | @media (min-width: 992px) { 654 | .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { 655 | float: left; 656 | } 657 | .col-md-12 { 658 | width: 100%; 659 | } 660 | .col-md-11 { 661 | width: 91.66666667%; 662 | } 663 | .col-md-10 { 664 | width: 83.33333333%; 665 | } 666 | .col-md-9 { 667 | width: 75%; 668 | } 669 | .col-md-8 { 670 | width: 66.66666667%; 671 | } 672 | .col-md-7 { 673 | width: 58.33333333%; 674 | } 675 | .col-md-6 { 676 | width: 50%; 677 | } 678 | .col-md-5 { 679 | width: 41.66666667%; 680 | } 681 | .col-md-4 { 682 | width: 33.33333333%; 683 | } 684 | .col-md-3 { 685 | width: 25%; 686 | } 687 | .col-md-2 { 688 | width: 16.66666667%; 689 | } 690 | .col-md-1 { 691 | width: 8.33333333%; 692 | } 693 | .col-md-pull-12 { 694 | right: 100%; 695 | } 696 | .col-md-pull-11 { 697 | right: 91.66666667%; 698 | } 699 | .col-md-pull-10 { 700 | right: 83.33333333%; 701 | } 702 | .col-md-pull-9 { 703 | right: 75%; 704 | } 705 | .col-md-pull-8 { 706 | right: 66.66666667%; 707 | } 708 | .col-md-pull-7 { 709 | right: 58.33333333%; 710 | } 711 | .col-md-pull-6 { 712 | right: 50%; 713 | } 714 | .col-md-pull-5 { 715 | right: 41.66666667%; 716 | } 717 | .col-md-pull-4 { 718 | right: 33.33333333%; 719 | } 720 | .col-md-pull-3 { 721 | right: 25%; 722 | } 723 | .col-md-pull-2 { 724 | right: 16.66666667%; 725 | } 726 | .col-md-pull-1 { 727 | right: 8.33333333%; 728 | } 729 | .col-md-pull-0 { 730 | right: auto; 731 | } 732 | .col-md-push-12 { 733 | left: 100%; 734 | } 735 | .col-md-push-11 { 736 | left: 91.66666667%; 737 | } 738 | .col-md-push-10 { 739 | left: 83.33333333%; 740 | } 741 | .col-md-push-9 { 742 | left: 75%; 743 | } 744 | .col-md-push-8 { 745 | left: 66.66666667%; 746 | } 747 | .col-md-push-7 { 748 | left: 58.33333333%; 749 | } 750 | .col-md-push-6 { 751 | left: 50%; 752 | } 753 | .col-md-push-5 { 754 | left: 41.66666667%; 755 | } 756 | .col-md-push-4 { 757 | left: 33.33333333%; 758 | } 759 | .col-md-push-3 { 760 | left: 25%; 761 | } 762 | .col-md-push-2 { 763 | left: 16.66666667%; 764 | } 765 | .col-md-push-1 { 766 | left: 8.33333333%; 767 | } 768 | .col-md-push-0 { 769 | left: auto; 770 | } 771 | .col-md-offset-12 { 772 | margin-left: 100%; 773 | } 774 | .col-md-offset-11 { 775 | margin-left: 91.66666667%; 776 | } 777 | .col-md-offset-10 { 778 | margin-left: 83.33333333%; 779 | } 780 | .col-md-offset-9 { 781 | margin-left: 75%; 782 | } 783 | .col-md-offset-8 { 784 | margin-left: 66.66666667%; 785 | } 786 | .col-md-offset-7 { 787 | margin-left: 58.33333333%; 788 | } 789 | .col-md-offset-6 { 790 | margin-left: 50%; 791 | } 792 | .col-md-offset-5 { 793 | margin-left: 41.66666667%; 794 | } 795 | .col-md-offset-4 { 796 | margin-left: 33.33333333%; 797 | } 798 | .col-md-offset-3 { 799 | margin-left: 25%; 800 | } 801 | .col-md-offset-2 { 802 | margin-left: 16.66666667%; 803 | } 804 | .col-md-offset-1 { 805 | margin-left: 8.33333333%; 806 | } 807 | .col-md-offset-0 { 808 | margin-left: 0%; 809 | } 810 | } 811 | @media (min-width: 1200px) { 812 | .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { 813 | float: left; 814 | } 815 | .col-lg-12 { 816 | width: 100%; 817 | } 818 | .col-lg-11 { 819 | width: 91.66666667%; 820 | } 821 | .col-lg-10 { 822 | width: 83.33333333%; 823 | } 824 | .col-lg-9 { 825 | width: 75%; 826 | } 827 | .col-lg-8 { 828 | width: 66.66666667%; 829 | } 830 | .col-lg-7 { 831 | width: 58.33333333%; 832 | } 833 | .col-lg-6 { 834 | width: 50%; 835 | } 836 | .col-lg-5 { 837 | width: 41.66666667%; 838 | } 839 | .col-lg-4 { 840 | width: 33.33333333%; 841 | } 842 | .col-lg-3 { 843 | width: 25%; 844 | } 845 | .col-lg-2 { 846 | width: 16.66666667%; 847 | } 848 | .col-lg-1 { 849 | width: 8.33333333%; 850 | } 851 | .col-lg-pull-12 { 852 | right: 100%; 853 | } 854 | .col-lg-pull-11 { 855 | right: 91.66666667%; 856 | } 857 | .col-lg-pull-10 { 858 | right: 83.33333333%; 859 | } 860 | .col-lg-pull-9 { 861 | right: 75%; 862 | } 863 | .col-lg-pull-8 { 864 | right: 66.66666667%; 865 | } 866 | .col-lg-pull-7 { 867 | right: 58.33333333%; 868 | } 869 | .col-lg-pull-6 { 870 | right: 50%; 871 | } 872 | .col-lg-pull-5 { 873 | right: 41.66666667%; 874 | } 875 | .col-lg-pull-4 { 876 | right: 33.33333333%; 877 | } 878 | .col-lg-pull-3 { 879 | right: 25%; 880 | } 881 | .col-lg-pull-2 { 882 | right: 16.66666667%; 883 | } 884 | .col-lg-pull-1 { 885 | right: 8.33333333%; 886 | } 887 | .col-lg-pull-0 { 888 | right: auto; 889 | } 890 | .col-lg-push-12 { 891 | left: 100%; 892 | } 893 | .col-lg-push-11 { 894 | left: 91.66666667%; 895 | } 896 | .col-lg-push-10 { 897 | left: 83.33333333%; 898 | } 899 | .col-lg-push-9 { 900 | left: 75%; 901 | } 902 | .col-lg-push-8 { 903 | left: 66.66666667%; 904 | } 905 | .col-lg-push-7 { 906 | left: 58.33333333%; 907 | } 908 | .col-lg-push-6 { 909 | left: 50%; 910 | } 911 | .col-lg-push-5 { 912 | left: 41.66666667%; 913 | } 914 | .col-lg-push-4 { 915 | left: 33.33333333%; 916 | } 917 | .col-lg-push-3 { 918 | left: 25%; 919 | } 920 | .col-lg-push-2 { 921 | left: 16.66666667%; 922 | } 923 | .col-lg-push-1 { 924 | left: 8.33333333%; 925 | } 926 | .col-lg-push-0 { 927 | left: auto; 928 | } 929 | .col-lg-offset-12 { 930 | margin-left: 100%; 931 | } 932 | .col-lg-offset-11 { 933 | margin-left: 91.66666667%; 934 | } 935 | .col-lg-offset-10 { 936 | margin-left: 83.33333333%; 937 | } 938 | .col-lg-offset-9 { 939 | margin-left: 75%; 940 | } 941 | .col-lg-offset-8 { 942 | margin-left: 66.66666667%; 943 | } 944 | .col-lg-offset-7 { 945 | margin-left: 58.33333333%; 946 | } 947 | .col-lg-offset-6 { 948 | margin-left: 50%; 949 | } 950 | .col-lg-offset-5 { 951 | margin-left: 41.66666667%; 952 | } 953 | .col-lg-offset-4 { 954 | margin-left: 33.33333333%; 955 | } 956 | .col-lg-offset-3 { 957 | margin-left: 25%; 958 | } 959 | .col-lg-offset-2 { 960 | margin-left: 16.66666667%; 961 | } 962 | .col-lg-offset-1 { 963 | margin-left: 8.33333333%; 964 | } 965 | .col-lg-offset-0 { 966 | margin-left: 0%; 967 | } 968 | } 969 | .clearfix:before, 970 | .clearfix:after, 971 | .container:before, 972 | .container:after, 973 | .container-fluid:before, 974 | .container-fluid:after, 975 | .row:before, 976 | .row:after { 977 | content: " "; 978 | display: table; 979 | } 980 | .clearfix:after, 981 | .container:after, 982 | .container-fluid:after, 983 | .row:after { 984 | clear: both; 985 | } 986 | .center-block { 987 | display: block; 988 | margin-left: auto; 989 | margin-right: auto; 990 | } 991 | .pull-right { 992 | float: right !important; 993 | } 994 | .pull-left { 995 | float: left !important; 996 | } 997 | .hide { 998 | display: none !important; 999 | } 1000 | .show { 1001 | display: block !important; 1002 | } 1003 | .invisible { 1004 | visibility: hidden; 1005 | } 1006 | .text-hide { 1007 | font: 0/0 a; 1008 | color: transparent; 1009 | text-shadow: none; 1010 | background-color: transparent; 1011 | border: 0; 1012 | } 1013 | .hidden { 1014 | display: none !important; 1015 | } 1016 | .affix { 1017 | position: fixed; 1018 | } 1019 | -------------------------------------------------------------------------------- /app/css/index.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | background: #0C7CA2; 4 | height: 725px; 5 | overflow: hidden; 6 | width: 368px; 7 | -webkit-app-region: drag; 8 | -webkit-user-select: none; 9 | } 10 | 11 | #main { 12 | background: #1DCCEB; 13 | border-bottom: 1px solid #73E2F7; 14 | height: 700px; 15 | } 16 | 17 | .speaker { 18 | padding-top: 50px; 19 | text-align: center; 20 | } 21 | 22 | .speaker img { 23 | height: 194px; 24 | width: 274px; 25 | } 26 | 27 | #main h1 { 28 | color: #fff; 29 | padding-right: 6px; 30 | padding-top: 5px; 31 | text-align: right; 32 | text-indent: -10000px; 33 | } 34 | 35 | #main h1 img { 36 | height: 31px; 37 | width: 195px; 38 | } 39 | 40 | .buttons { 41 | padding: 0 20px; 42 | } 43 | 44 | .buttons > div { 45 | text-align: center; 46 | } 47 | 48 | .button-sound { 49 | background-color: #0C7CA2; 50 | border-radius: 100%; 51 | cursor: pointer; 52 | display: inline-block; 53 | height: 24px; 54 | margin-top: 57px; 55 | position: relative; 56 | width: 24px; 57 | box-shadow: 0 4px 0 #044D7F; 58 | -webkit-app-region: no-drag; 59 | } 60 | 61 | .button-sound:hover { 62 | box-shadow: 0 2px 0 #044D7F; 63 | top: 2px; 64 | } 65 | 66 | .button-sound:hover > span { 67 | top: -42px; 68 | } 69 | 70 | .button-sound:active { 71 | box-shadow: 0 0 0 #044D7F; 72 | top: 5px; 73 | } 74 | 75 | .button-sound:active > span { 76 | top: -45px; 77 | } 78 | 79 | .button-icon { 80 | background-size: 30px 30px; 81 | background-repeat: no-repeat; 82 | display: inline-block; 83 | height: 50px; 84 | left: -2px; 85 | position: absolute; 86 | top: -40px; 87 | width: 30px; 88 | -webkit-app-region: no-drag; 89 | } 90 | 91 | .settings, 92 | .close { 93 | cursor: pointer; 94 | display: inline-block; 95 | height: 32px; 96 | position: absolute; 97 | text-indent: -10000px; 98 | top: 6px; 99 | width: 32px; 100 | z-index: 1; 101 | 102 | -webkit-app-region: no-drag; 103 | } 104 | 105 | .settings { 106 | background: transparent url('../img/settings.png') no-repeat 4px 4px; 107 | background-size: 24px 24px; 108 | right: 38px; 109 | } 110 | 111 | .close { 112 | background: transparent url('../img/close.png') no-repeat 4px 4px; 113 | background-size: 24px 24px; 114 | right: 6px; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /app/css/settings.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | background: #044D7F; 4 | overflow: hidden; 5 | -webkit-app-region: drag; 6 | -webkit-user-select: none; 7 | } 8 | 9 | #settings-screen { 10 | color: #fff; 11 | } 12 | 13 | h2 { 14 | margin-top: 8px; 15 | } 16 | 17 | input, 18 | label { 19 | -webkit-app-region: no-drag; 20 | } 21 | 22 | input { 23 | padding: 10px; 24 | } 25 | 26 | .close { 27 | background: transparent url('../img/close.png') no-repeat 4px 4px; 28 | background-size: 24px 24px; 29 | cursor: pointer; 30 | display: inline-block; 31 | height: 32px; 32 | position: absolute; 33 | right: 6px; 34 | text-indent: -10000px; 35 | top: 6px; 36 | width: 32px; 37 | z-index: 1; 38 | 39 | -webkit-app-region: no-drag; 40 | } 41 | -------------------------------------------------------------------------------- /app/img/app-icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/app-icon.icns -------------------------------------------------------------------------------- /app/img/app-icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/app-icon.ico -------------------------------------------------------------------------------- /app/img/app-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/app-icon.png -------------------------------------------------------------------------------- /app/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/close.png -------------------------------------------------------------------------------- /app/img/icons/applause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/icons/applause.png -------------------------------------------------------------------------------- /app/img/icons/ba-dum-tsss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/icons/ba-dum-tsss.png -------------------------------------------------------------------------------- /app/img/icons/crowd-laughing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/icons/crowd-laughing.png -------------------------------------------------------------------------------- /app/img/icons/money.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/icons/money.png -------------------------------------------------------------------------------- /app/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/logo.png -------------------------------------------------------------------------------- /app/img/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/settings.png -------------------------------------------------------------------------------- /app/img/speaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/speaker.png -------------------------------------------------------------------------------- /app/img/tray-icon-alt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/tray-icon-alt.png -------------------------------------------------------------------------------- /app/img/tray-icon-alt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/tray-icon-alt@2x.png -------------------------------------------------------------------------------- /app/img/tray-iconTemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/tray-iconTemplate.png -------------------------------------------------------------------------------- /app/img/tray-iconTemplate@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/img/tray-iconTemplate@2x.png -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sound Machine 6 | 7 | 8 | 9 | 10 |
Settings
11 |
Close
12 |
13 |
14 |
15 |
16 | 17 |
18 |

19 | 20 |

21 |
22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 |
50 |
51 |
52 |
53 | 54 |
55 |
56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 | 64 |
65 |
66 |
67 |
68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 | 76 |
77 |
78 |
79 |
80 | 81 |
82 |
83 |
84 |
85 | 86 |
87 |
88 |
89 |
90 |
91 |
92 | 93 |
94 |
95 |
96 |
97 | 98 |
99 |
100 |
101 |
102 | 103 |
104 |
105 |
106 |
107 | 108 |
109 |
110 |
111 |
112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /app/js/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ipc = require('ipc'); 4 | var remote = require('remote'); 5 | var Tray = remote.require('tray'); 6 | var Menu = remote.require('menu'); 7 | var path = require('path'); 8 | 9 | var soundButtons = document.querySelectorAll('.button-sound'); 10 | var closeEl = document.querySelector('.close'); 11 | var settingsEl = document.querySelector('.settings'); 12 | 13 | var trayIcon = null; 14 | var trayMenu = null; 15 | 16 | for (var i = 0; i < soundButtons.length; i++) { 17 | var soundButton = soundButtons[i]; 18 | var soundName = soundButton.attributes['data-sound'].value; 19 | 20 | prepareButton(soundButton, soundName); 21 | } 22 | 23 | function prepareButton(buttonEl, soundName) { 24 | buttonEl.querySelector('span').style.backgroundImage = 'url("img/icons/' + soundName + '.png")'; 25 | 26 | var audio = new Audio(__dirname + '/wav/' + soundName + '.wav'); 27 | buttonEl.addEventListener('click', function () { 28 | audio.currentTime = 0; 29 | audio.play(); 30 | }); 31 | } 32 | 33 | closeEl.addEventListener('click', function () { 34 | ipc.send('close-main-window'); 35 | }); 36 | 37 | settingsEl.addEventListener('click', function () { 38 | ipc.send('open-settings-window'); 39 | }); 40 | 41 | ipc.on('global-shortcut', function (arg) { 42 | var event = new MouseEvent('click'); 43 | soundButtons[arg].dispatchEvent(event); 44 | }); 45 | 46 | if (process.platform === 'darwin') { 47 | trayIcon = new Tray(path.join(__dirname, 'img/tray-iconTemplate.png')); 48 | } 49 | else { 50 | trayIcon = new Tray(path.join(__dirname, 'img/tray-icon-alt.png')); 51 | } 52 | 53 | var trayMenuTemplate = [ 54 | { 55 | label: 'Sound machine', 56 | enabled: false 57 | }, 58 | { 59 | label: 'Settings', 60 | click: function () { 61 | ipc.send('open-settings-window'); 62 | } 63 | }, 64 | { 65 | label: 'Quit', 66 | click: function () { 67 | ipc.send('close-main-window'); 68 | } 69 | } 70 | ]; 71 | trayMenu = Menu.buildFromTemplate(trayMenuTemplate); 72 | trayIcon.setContextMenu(trayMenu); -------------------------------------------------------------------------------- /app/js/settings.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ipc = require('ipc'); 4 | var configuration = require('../configuration'); 5 | 6 | var modifierCheckboxes = document.querySelectorAll('.global-shortcut'); 7 | var closeEl = document.querySelector('.close'); 8 | 9 | closeEl.addEventListener('click', function (e) { 10 | ipc.send('close-settings-window'); 11 | }); 12 | 13 | for (var i = 0; i < modifierCheckboxes.length; i++) { 14 | var shortcutKeys = configuration.readSettings('shortcutKeys'); 15 | var modifierKey = modifierCheckboxes[i].attributes['data-modifier-key'].value; 16 | modifierCheckboxes[i].checked = shortcutKeys.indexOf(modifierKey) !== -1; 17 | 18 | modifierCheckboxes[i].addEventListener('click', function (e) { 19 | bindModifierCheckboxes(e); 20 | }); 21 | } 22 | 23 | function bindModifierCheckboxes(e) { 24 | var shortcutKeys = configuration.readSettings('shortcutKeys'); 25 | var modifierKey = e.target.attributes['data-modifier-key'].value; 26 | 27 | if (shortcutKeys.indexOf(modifierKey) !== -1) { 28 | var shortcutKeyIndex = shortcutKeys.indexOf(modifierKey); 29 | shortcutKeys.splice(shortcutKeyIndex, 1); 30 | } 31 | else { 32 | shortcutKeys.push(modifierKey); 33 | } 34 | 35 | configuration.saveSettings('shortcutKeys', shortcutKeys); 36 | ipc.send('set-global-shortcuts'); 37 | } -------------------------------------------------------------------------------- /app/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sound Machine Settings 6 | 7 | 8 | 9 | 10 |
Close
11 |
12 |
13 |
14 |

Settings

15 | 16 |

Modifier keys for global shortcuts

17 |

18 | 20 | 21 |

22 | 23 |

24 | 26 | 27 |

28 | 29 |

30 | 32 | 33 |

34 |
35 |
36 |
37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/wav/applause.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/applause.wav -------------------------------------------------------------------------------- /app/wav/ba-dum-tsss.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/ba-dum-tsss.wav -------------------------------------------------------------------------------- /app/wav/burp.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/burp.wav -------------------------------------------------------------------------------- /app/wav/crowd-laughing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/crowd-laughing.wav -------------------------------------------------------------------------------- /app/wav/fart.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/fart.wav -------------------------------------------------------------------------------- /app/wav/money.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/money.wav -------------------------------------------------------------------------------- /app/wav/sad-trombone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomeKay/sound-machine-electron-guide/7c0e0357035dcef07b9dd44b49acf7ec9d286e74/app/wav/sad-trombone.wav -------------------------------------------------------------------------------- /configuration.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var nconf = require('nconf').file({file: getUserHome() + '/sound-machine-config.json'}); 4 | 5 | function saveSettings(settingKey, settingValue) { 6 | nconf.set(settingKey, settingValue); 7 | nconf.save(); 8 | } 9 | 10 | function readSettings(settingKey) { 11 | nconf.load(); 12 | return nconf.get(settingKey); 13 | } 14 | 15 | function getUserHome() { 16 | return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; 17 | } 18 | 19 | module.exports = { 20 | saveSettings: saveSettings, 21 | readSettings: readSettings 22 | }; -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var app = require('app'); 4 | var BrowserWindow = require('browser-window'); 5 | var globalShortcut = require('global-shortcut'); 6 | var configuration = require('./configuration'); 7 | var ipc = require('ipc'); 8 | 9 | var mainWindow = null; 10 | var settingsWindow = null; 11 | 12 | app.on('ready', function() { 13 | if (!configuration.readSettings('shortcutKeys')) { 14 | configuration.saveSettings('shortcutKeys', ['ctrl', 'shift']); 15 | } 16 | 17 | mainWindow = new BrowserWindow({ 18 | frame: false, 19 | height: 700, 20 | resizable: false, 21 | width: 368 22 | }); 23 | 24 | mainWindow.loadUrl('file://' + __dirname + '/app/index.html'); 25 | 26 | setGlobalShortcuts(); 27 | }); 28 | 29 | function setGlobalShortcuts() { 30 | globalShortcut.unregisterAll(); 31 | 32 | var shortcutKeysSetting = configuration.readSettings('shortcutKeys'); 33 | var shortcutPrefix = shortcutKeysSetting.length === 0 ? '' : shortcutKeysSetting.join('+') + '+'; 34 | 35 | globalShortcut.register(shortcutPrefix + '1', function () { 36 | mainWindow.webContents.send('global-shortcut', 0); 37 | }); 38 | globalShortcut.register(shortcutPrefix + '2', function () { 39 | mainWindow.webContents.send('global-shortcut', 1); 40 | }); 41 | } 42 | 43 | ipc.on('close-main-window', function () { 44 | app.quit(); 45 | }); 46 | 47 | ipc.on('open-settings-window', function () { 48 | if (settingsWindow) { 49 | return; 50 | } 51 | 52 | settingsWindow = new BrowserWindow({ 53 | frame: false, 54 | height: 200, 55 | resizable: false, 56 | width: 200 57 | }); 58 | 59 | settingsWindow.loadUrl('file://' + __dirname + '/app/settings.html'); 60 | 61 | settingsWindow.on('closed', function () { 62 | settingsWindow = null; 63 | }); 64 | }); 65 | 66 | ipc.on('close-settings-window', function () { 67 | if (settingsWindow) { 68 | settingsWindow.close(); 69 | } 70 | }); 71 | 72 | ipc.on('set-global-shortcuts', function () { 73 | setGlobalShortcuts(); 74 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sound_machine", 3 | "version": "0.1.0", 4 | "main": "./main.js", 5 | "scripts": { 6 | "start": "electron .", 7 | "package": "electron-packager ./ SoundMachine --all --out ~/Desktop/SoundMachine --version 0.30.2 --overwrite --icon=./app/img/app-icon.icns" 8 | }, 9 | "devDependencies": { 10 | "electron-packager": "^5.0.1", 11 | "electron-prebuilt": "^0.30.3" 12 | }, 13 | "dependencies": { 14 | "nconf": "^0.7.2" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Accompanying repository for the Electron guide 2 | 3 | ![Sound Machine](https://rawgithub.com/bojzi/sound-machine/master/sketch/sound-machine.png) --------------------------------------------------------------------------------