-
Notifications
You must be signed in to change notification settings - Fork 50
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
Custom toolbar #3
Comments
Hi Simon, I want to change API so every package which wants to add a toolbar icons, would receive handler to manage its buttons during lifetime. Such registering could be blocked by user from settings. Adding custom icons from init script sounds like something which can be done in separate package which may be developed by someone other than me wink, wink |
"But what's really great about this package is that I can just configure the icons and actions myself in Menu > Open Your Init Script." |
@brpaz Sure, this should add a couple icons that do some stuff. atom.packages.activatePackage('toolbar')
.then (pkg) =>
@toolbar = pkg.mainModule
@toolbar.appendButton 'octoface', 'open-on-github:history', 'Open on GitHub'
@toolbar.appendSpacer()
@toolbar.appendButton 'color-mode', 'theme-toggler:toggle', 'Toggle Themes'
@toolbar.appendButton 'paintcan', 'styleguide:show', 'Styleguide'
@toolbar.appendSpacer()
@toolbar.appendButton 'three-bars', 'tree-view:toggle', 'Toggle tree-view'
@toolbar.appendSpacer()
@toolbar.appendButton 'gear', 'settings-view:open', 'Settings' Note that you need to have some of the packages installed. And the first one, "open-on-github" doesn't seem to work. I guess it's because when you click the button, it already lost focus and doesn't know which file to open. But yeah.. you can add any command that has no "focus issue". It's basically clicking buttons instead of having to remember the shortcuts. |
@simurai thanks. I found the answer myself some minutes ago :) |
simurai commented on 25 jan. 2015 14:18 CET: atom.packages.activatePackage('toolbar')
.then (pkg) =>
@toolbar = pkg.mainModule
... Above code is the old way. The new way is described in the readme. |
I'm closing this issue in favor of #49 |
I really like this package, but I guess not how it was initially intended. 😉
I don't really want other packages to fill up my toolbar because I might not need/want some of the icons. But what's really great about this package is that I can just configure the icons and actions myself in
Menu > Open Your Init Script
.So maybe you could:
The text was updated successfully, but these errors were encountered: