Skip to content

Commit

Permalink
Merge pull request #67 from th-ch/hide-menu
Browse files Browse the repository at this point in the history
Option to hide menu
  • Loading branch information
th-ch authored Nov 28, 2020
2 parents ae5b85d + 155ef9e commit ed16c35
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { setApplicationMenu } = require("./menu");
const {
autoUpdate,
getEnabledPlugins,
hideMenu,
isAppVisible,
isTrayEnabled,
setOptions,
Expand Down Expand Up @@ -86,6 +87,7 @@ function createMainWindow() {
},
frame: !is.macOS(),
titleBarStyle: is.macOS() ? "hiddenInset" : "default",
autoHideMenuBar: hideMenu(),
});
if (windowMaximized) {
win.maximize();
Expand Down
13 changes: 13 additions & 0 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const {
enablePlugin,
disablePlugin,
autoUpdate,
hideMenu,
isAppVisible,
isTrayEnabled,
setOptions,
Expand Down Expand Up @@ -42,6 +43,18 @@ const mainMenuTemplate = (win) => [
setOptions({ autoUpdates: item.checked });
},
},
...(is.windows() || is.linux()
? [
{
label: "Hide menu",
type: "checkbox",
checked: hideMenu(),
click: (item) => {
setOptions({ hideMenu: item.checked });
},
},
]
: []),
...(is.windows() || is.macOS()
? // Only works on Win/Mac
// https://www.electronjs.org/docs/api/app#appsetloginitemsettingssettings-macos-windows
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "youtube-music",
"productName": "YouTube Music",
"version": "1.6.3",
"version": "1.6.4",
"description": "YouTube Music Desktop App - including custom plugins",
"license": "MIT",
"repository": "th-ch/youtube-music",
Expand Down
2 changes: 2 additions & 0 deletions store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const store = new Store({
tray: false,
appVisible: true,
autoUpdates: true,
hideMenu: false,
startAtLogin: false,
},
},
Expand All @@ -31,5 +32,6 @@ module.exports = {
isTrayEnabled: () => store.get("options.tray"),
isAppVisible: () => store.get("options.appVisible"),
autoUpdate: () => store.get("options.autoUpdates"),
hideMenu: () => store.get("options.hideMenu"),
startAtLogin: () => store.get("options.startAtLogin"),
};

0 comments on commit ed16c35

Please sign in to comment.