Skip to content

Commit

Permalink
Move the dark mode and vibrancy toggle to the View menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 13, 2017
1 parent ead318a commit 2afbbb0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
32 changes: 18 additions & 14 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ const viewSubmenu = [
click() {
sendAction('zoom-out');
}
},
{
type: 'separator'
},
{
label: 'Toggle Dark Mode',
accelerator: 'Cmd+D',
click() {
sendAction('toggle-dark-mode');
}
}
];

Expand Down Expand Up @@ -65,7 +75,14 @@ ${process.platform} ${process.arch} ${os.release()}`;
}
];

if (process.platform !== 'darwin') {
if (process.platform === 'darwin') {
viewSubmenu.push({
label: 'Toggle Vibrancy',
click() {
sendAction('toggle-vibrancy');
}
});
} else {
helpSubmenu.push({
type: 'separator'
}, {
Expand Down Expand Up @@ -104,19 +121,6 @@ const darwinTpl = [
{
type: 'separator'
},
{
label: 'Toggle Dark Mode',
accelerator: 'Cmd+D',
click() {
sendAction('toggle-dark-mode');
}
},
{
label: 'Toggle Vibrancy',
click() {
sendAction('toggle-vibrancy');
}
},
{
label: 'Preferences…',
accelerator: 'Cmd+,',
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ If you like to have Caprine minimized on startup, open it from the command-line

### Dark mode

You can toggle dark mode in the `Caprine` menu or with <kbd>Cmd</kbd> <kbd>D</kbd> / <kbd>Ctrl</kbd> <kbd>D</kbd>.
You can toggle dark mode in the `View` menu or with <kbd>Cmd</kbd> <kbd>D</kbd> / <kbd>Ctrl</kbd> <kbd>D</kbd>.

<img src="media/screenshot-dark.png" width="846">

### Vibrancy

On *macOS*, you can toggle the window vibrancy effect in the `Caprine` menu.
On *macOS*, you can toggle the window vibrancy effect in the `View` menu.

<img src="media/screenshot-vibrancy.jpg" width="1165">

Expand Down

0 comments on commit 2afbbb0

Please sign in to comment.