Giter Site home page Giter Site logo

snwe's Introduction

snwe

An extensible, customisable menubar replacement for macOS.


demo

This widget puts everything you might want to know at a glance in one place. From system monitoring, to currently playing music, the bar gives you an overview of what you need to know.

Thanks to the program's modular structure, it's trivial to extend it with new indicators or graphic themes. The wal-responsive adaptive colorscheme makes it always look at home.

demo demo demo

And the widget selection allows you to tailor it to your needs

demo demo demo

Yes but what does it do

The bar is undergoing very active development. I'm adding, modifying, and moving around functions on a weekly basis. The list of displays that follows is indicative and relative only to the default configuration which can be very easily switched up with any of the other configuration files that are included in the download.

  • Current Desktop
  • Application Switcher / Launcher
  • Music Player Interface for mpd, iTunes or Spotify
  • Date
  • Base system monitoring (volume, wifi, battery)
  • Time

Installation

(By this point we both know you want it.)

Prebuilt Binaries

No installation, no fuss – just download and run

  1. Head over to the release page
  2. Download the latest release
  3. Run.

NPM Install

For developing and customising

Please note that you might already have Brew, npm, or both, installed. In this case you can skip a couple steps!

  1. Install Brew. In a terminal, run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2>  /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
  1. Install npm. In a terminal, run
brew install npm
  1. Clone this repo (copy the files on your machine). Run:
git clone https://github.com/blahsd/snwe
  1. Navigate to wherever you cloned the repo and:
npm install
npm start

Optional dependencies

Some indicators rely on external programs that must be running on your machine for the indicator to work correctly. All of the following dependencies are optional – if you don't have them the bar will still work correctly, although with some functionalities impaired.

Desktop indicator

Installing chunkwm is trivial and takes just a couple of minutes. Regardless of whether you are going to use this bar, I recommend it wholeaheartedly. Still, it's a complex system, and I recommend you check out the link above and make an informed decision before installing.

These are the homebrew commands to install chunkwm:

# clone tap
brew tap crisidev/homebrew-chunkwm

# install latest stable version
brew install chunkwm

# install from git repo
brew install --HEAD chunkwm

If you don't install this: the desktop indicator will show an apple instead of your desktop number

mpd indicator

  • Uses mpd (no shit)

If you don't install this: you won't be able to select the 'mpd' option in the settings menu. You'll still be able to select iTunes or Spotify, so you're good.

wal-responsive styling

  • Uses pywal to generate and change color-schemes on the fly.

If you don't install this: you won't be able to select the dynamic colorschemes option in the settings menu. You will have the default colorschemes available and any that you might add yourself.

Usage

I will get around to write this paragraph, I promise. But honestly just run it, it's super simple.

Customisation

Thanks to its modular structure it's trivial to modify and add indicators, themes and colorschemes. In order to have a version that's more manageable to customise, I recommend installing the npm version, rather than the prebuilt.

Indicators

Reside in ./app/js/require/modules/.

Check out any of them to get a feel for how they work. The Date and Time indicators are the simplest, so they are a good place to start looking. All indicators must extend the ExternalModule class, which you can find in ./app/js/require/ExternalModule.js.

Themes and Colorschemes

Reside in ./app/css/.

Themes change the overall appearance of the bar. They should not include any color indication.

Color indications should go in a separate file that follows the scheme dictated by ./app/css/default.css.

Contribute

Test and report

Just using the app and reporting on the issue page any issue that you might run into does a great deal to help development. I'm also very appreciative of issues that don't report an issue but rather indicate a useful feature that is missing / a feature wishlist / UX improvements / ecc.

Custom Colors and Themes

I'd love to see your custom colorschemes and themes, or even your modifications to the default ones, and I am happy to link them here if you provide them to me. Hell, they might make it in the distributed package.

Contribute code

I try to keep every known issue clearly recorded on the issue page. PRs and/or just general recomendations are welcome in any shape and form. My code is mostly shit so go right ahead and change as your heart desires. You're probably gonna do a better job than me. Refactors are also welcome.

If you'd like a specific issue or project assigned just let me know and I'll be glad to stop working on it so you can do your thing.

Credits

  • paanvaannd: testing, debugging, and contributing to development.

  • davidlday: absolutely key in getting the first iteration off the ground as a Ubersicht widget.

  • splintah/nerdbar.widget: tons of code that I took shamelessly and adapted/expanded, again, for the previous incarnation of this bar.

  • some builds might include icons by freepik via flaticon and they want me to tell you that they are licensed under CC 3.0 BY, so, huh, there's that.

  • Me. I mean, I think I did a pretty good job. Buy me a coffee or send thoughts & prayers.

snwe's People

Contributors

blahsd avatar koekeishiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snwe's Issues

npm start fails on newest master build

$ git clone https://github.com/blahs.snwe && \
cd snwe && \
rm app/css/colors.wal.css && \
npm start

fails since commit 204b461 with an error similar to electron/electron-quick-start#108 with the following quoted portion being able to fix the issue on my end:

If that file is missing your node_modules install probably glitched out, it happens sometimes. Just delete your node_modules folder and re run npm install

The debug branch does not have this issue.

Line around snwe bar on macOS 10.14

screen shot 2018-10-07 at 10 07 28 pm

Just updated, now having this behavior. Not sure if there's anything that can be done about it, but thought I'd bring it to your attention anyways

Got "A Javascript error occured in the main process"

I think this happened because I used command-Q to try exit out of the settings menu. I tried uninstalling and reinstalling the app, but it gave the same error. I tried to remove the files in /private folder, but it has read-only permissions, and I can't chmod it for some reason.

TypeError: Error processing argument at index 0, conversion failure from null
    at EventEmitter.ipcMain.on (/private/var/folders/mm/yv6bk_815zg78z6l4rzfzllc0000gp/T/AppTranslocation/7A927F6B-C899-4E4F-A7DA-0D1E15EFA5C0/d/snwe.app/Contents/Resources/app/main.js:13:7)
    at emitMany (events.js:147:13)
    at EventEmitter.emit (events.js:224:7)
    at WebContents.<anonymous> (/private/var/folders/mm/yv6bk_815zg78z6l4rzfzllc0000gp/T/AppTranslocation/7A927F6B-C899-4E4F-A7DA-0D1E15EFA5C0/d/snwe.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
    at emitTwo (events.js:126:13)
    at WebContents.emit (events.js:214:7)```

Electron Content Security Policy warning upon summoning the preferences window

The following message is displayed when running snwe and opening the preferences window:

Electron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled. This exposes users of this app to unnecessary security risks.

For more information and help, consult https://electronjs.org/docs/tutorial/security.
This warning will not show up once the app is packaged.

Doesn't receive onmouseover events

This is due to the window property focusable: false.

At this point, removing this property breaks interaction with window managers and is therefore decided against. A different solution should be found.

Activating 'taskbar' module crashes the app on launch

First launch was fine, once I changed the settings it started throwing the following exception.
I think it was down to the taskbar option

TypeError: Error processing argument at index 0, conversion failure from null
    at EventEmitter.ipcMain.on (/Applications/snwe.app/Contents/Resources/app/main.js:13:7)
    at emitMany (events.js:147:13)
    at EventEmitter.emit (events.js:224:7)
    at WebContents.<anonymous> (/Applications/snwe.app/Contents/Resources/electron.asar/browser/api/web-contents.js:286:13)
    at emitTwo (events.js:126:13)
    at WebContents.emit (events.js:214:7)```


Turn WiFi Off/On reversed

When connected to a WiFi network and clicking on the WiFi icon, the text "Turn WiFi On" shows up. This should read "Turn WiFi Off," as turning WiFi off is what happens on clicking that option.

Conversely, when WiFi is off, the text reads "Turn WiFi Off" hen it should read "Turn WiFi On."

Closing preference window manually and later trying to close it with the appropriate button causes an error

Could not call remote function 'close'. Check that the function signature is correct. Underlying error: Object has been destroyed
Error: Could not call remote function 'close'. Check that the function signature is correct. Underlying error: Object has been destroyed
    at callFunction (/Users/.../dev/proj/snwe/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:235:11)
    at EventEmitter.<anonymous> (/Users/.../dev/proj/snwe/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/rpc-server.js:342:5)
    at emitMany (events.js:127:13)
    at EventEmitter.emit (events.js:201:7)
    at WebContents.<anonymous> (/Users/.../dev/proj/snwe/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/browser/api/web-contents.js:231:13)
    at emitTwo (events.js:106:13)
    at WebContents.emit (events.js:191:7)

Is it possible to disable macos menu bar?

I want to just use snwe but when I move the cursor to the top the menu bar appears.

there is any way I can decrease the delay of the menubar or even kill the menubar process?

Not able to change the command tabs

I keep trying to change the command tabs on the bar. I have added .command files under the command-wrappers folder and changed config.json to match, however the config file keeps updating and overwriting my changes. How can I sort this?

`npm start` generates large non-transparent electron window with debugging tools and error message in terminal

error

Note: the purple rectangle is a window border drawn by chunkwm around the Grab.app GUI; disregard that.

This window is spawned upon starting snwe. It takes up a good portion of the screen (~80%?) without being resized through chunkwm. In the above image, the spawned window is fullscreen because of chunkwm.

On the bottom-right, in the debugging panes, there are some properties that are striked out. Mousing over those values shows a tooltip saying "Invalid property values."

Furthermore, the following is the terminal output upon running npm start in the cloned repo:

$ npm start

> [email protected] start /Users/pavananand/bin/snwe
> electron .

2018-05-08 09:51:38.353 Electron[11582:51534] *** WARNING: Textured window <AtomNSWindow: 0x7feaccd49120> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.

Make taskbar pull icons from apps

Current test implementation on this issue's dedicated numbered branch.
Current status is: script generates correctly the images from the apps icons, but I cant load them correctly in the app.

Contextual Menus

Clicking on items should bring up a contextual menu that allows extra options. For instance:

  • Desktop indicator -> desktop switcher
  • Music player -> playlist
  • Volume -> volume handle

etc.

One preference window generated per click of the preference icon

Clicking the preference icon multiple times will generate multiple preference windows. It would be good if there were a way to check if a preference window is open and, if so, clicking the preference icon will shift focus to the already-open preference window instead of generating a new one.

Preferences window is transparent

Upon clicking the preferences button on snwe, a preferences window shows up with radio buttons and text present but a transparent window.

Interestingly, upon trying to take a screenshot of the window for documentation, the window appears in the screenshot though it remains transparent on my desktop.

Electron instances persist after exiting with Ctrl + C

I'm actually not sure if I'm doing this right... I start the app with $ npm start and to stop I exit with Ctrl + C (I'm pretty sure this sends a SIGINT) and while this stops the application and allows me to interact with my terminal again, an Electron application remains in my Dock after each run and Activity Monitor shows that same process along with an associated Electron Helper per spawned process. The only way to exit those processes is to go to Force Quit those processes.

Perhaps using this would be a good way of quitting the process completely if I'm stopping the process properly on my end? I think it would also be necessary to provide users a good way to quit the app natively before release, so maybe a "Quit" button within the Preferences pane?

npm install fails on master build on linux

$ sudo npm i -verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node', '/usr/bin/npm', 'i', '-verbose' ]
npm info using [email protected]
npm info using [email protected]
npm verb npm-session 0910e1be8b356b97
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing stage:loadCurrentTree Completed in 3202ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 23ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1508ms
npm http fetch GET 304 https://registry.npmjs.org/electron 218ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 2124ms
npm timing stage:loadIdealTree Completed in 4257ms
npm timing stage:generateActionsToTake Completed in 144ms
npm verb correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /root/.npm/_locks/staging-d5f93b0f7f1f3b4d.lock for /home/void/Scripts/snwe/node_modules/.staging
npm timing audit compress Completed in 19ms
npm info audit Submitting payload of 21715bytes
npm timing action:extract Completed in 114ms
npm timing action:finalize Completed in 7ms
npm timing action:refresh-package-json Completed in 15ms
npm info lifecycle [email protected]~preinstall: [email protected]
npm timing action:preinstall Completed in 1ms
npm info linkStuff [email protected]
npm verb linkBins [ { electron: 'cli.js' },
npm verb linkBins   '/home/void/Scripts/snwe/node_modules/.bin',
npm verb linkBins   false ]
npm timing action:build Completed in 15ms
npm info lifecycle [email protected]~install: [email protected]
npm timing action:install Completed in 3ms
npm info lifecycle [email protected]~postinstall: [email protected]

> [email protected] postinstall /home/void/Scripts/snwe/node_modules/electron
> node install.js

/home/void/Scripts/snwe/node_modules/electron/install.js:47
  throw err
  ^

Error: EACCES: permission denied, mkdir '/home/void/Scripts/snwe/node_modules/electron/.electron'
npm verb lifecycle [email protected]~postinstall: unsafe-perm in lifecycle false
npm verb lifecycle [email protected]~postinstall: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/void/Scripts/snwe/node_modules/electron/node_modules/.bin:/home/void/Scripts/snwe/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/opt/texlive/2018/bin/x86_64-linux
npm verb lifecycle [email protected]~postinstall: CWD: /home/void/Scripts/snwe/node_modules/electron
npm info lifecycle [email protected]~postinstall: Failed to exec postinstall script
npm timing action:postinstall Completed in 481ms
npm verb unlock done using /root/.npm/_locks/staging-d5f93b0f7f1f3b4d.lock for /home/void/Scripts/snwe/node_modules/.staging
npm timing stage:rollbackFailedOptional Completed in 5ms
npm timing stage:runTopLevelLifecycles Completed in 8908ms
npm verb stack Error: [email protected] postinstall: `node install.js`
npm verb stack Exit status 1
npm verb stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
npm verb stack     at EventEmitter.emit (events.js:180:13)
npm verb stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack     at ChildProcess.emit (events.js:180:13)
npm verb stack     at maybeClose (internal/child_process.js:936:16)
npm verb stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
npm verb pkgid [email protected]
npm verb cwd /home/void/Scripts/snwe
npm verb Linux 4.16.14_1
npm verb argv "/usr/bin/node" "/usr/bin/npm" "i" "-verbose"
npm verb node v9.10.0
npm verb npm  v6.1.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 1, true ]
npm timing audit submit Completed in 1251ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1249ms
npm timing audit body Completed in 2ms
npm timing npm Completed in 10033ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-22T14_13_00_568Z-debug.log

Creating the folder it throws the error on beforehand doesn't help beause it's a postinstall thing and I believe the directory is re-written each time. I'm not really sure why it's returning a permission problem when run as sudo. The fact that it returns my LaTeX installation filepath seems questionable, but I'm honestly not that familiar with how npm works so I don't think I can make judgment on that.
Reading the log file doesn't really add new information, as it has the same fail message.

Error while npm install on osx

[email protected] postinstall /Users/pq/snwe/node_modules/electron
node install.js

[email protected] postinstall /Users/pq/snwe/node_modules/electron-prebuilt
node install.js

[email protected] postinstall /Users/pq/snwe
install-app-deps

sh: install-app-deps: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `install-app-deps`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/pq/.npm/_logs/2018-06-22T20_20_00_727Z-debug.log`

Add to brew

Hi, thanks for an awesome menu bar!

Could you add this to homebrew or as a cask please?

snwe went hidden when opening atom

Sometimes when I open atom editor, snwe (running from launchd) disappears from all spaces. The stderr produces no additional output than the following, which is to be expected when snwe functions "normally":

2018-09-07 21:09:24.131 Electron[77177:2324018] *** WARNING: Textured window <AtomNSWindow: 0x7f9866f032d0> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
56:62: execution error: Can’t make «class pArt» of «class pTrk» of application "iTunes" into type string. (-1700)

Running wal breaks everything

It would be great to have theme pywal-generated theme integration in this project similar to supernerd.

I'm aware that this is a new project so it may be a low priority at the moment. I think an issue would be helpful in tracking this feature for myself and others interested in using it if it is in the works.

Is such an integration possible with the electron framework? If it is already set up, is there documentation about how to set it up?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.