Refine notch mode: own island modules, Super+N, fuller pages, header strip
- Notch islands and a header strip in the open notch take their own module lists (Settings → Notch → Modules); the strip scrolls sideways on wheel. - `glassmxrph notch mode` swaps notch mode and the full bar. - The left column fills its space: large media player (streams show LIVE), a full-height Performance card and a clock over the calendar. - A cog edits the tiles in the Control Center editor, then the notch returns. - The launcher uses the notch shape and keeps its mode pills inside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5217af4f67
commit
74b6ad50ec
14 files changed
+530
-99
No files matched your search
@@ -16,6 +16,20 @@ Singleton {
|
||||
return [];
|
||||
return hasOwn(screenName) ? screens[screenName].modules : ConfigService.data.bar.modules;
|
||||
}
|
||||
// Entries for a notch module list ("left", "right" or "strip"). Each reuses
|
||||
// the module's bar entry for its options when the layout has one.
|
||||
function notchModules(screenName, key) {
|
||||
if (!ConfigService.ready || !ConfigService.data.notch)
|
||||
return [];
|
||||
const layout = modulesFor(screenName);
|
||||
return (ConfigService.data.notch[key] || []).map(id => Object.assign({}, layout.find(m => m.id === id) || {
|
||||
id: id
|
||||
}, {
|
||||
id: id,
|
||||
enabled: true,
|
||||
position: key === "right" ? "right" : key === "left" ? "left" : "center"
|
||||
}));
|
||||
}
|
||||
// Saves to the screen's own layout when it has one, else the shared layout.
|
||||
function save(screenName, modules) {
|
||||
if (!hasOwn(screenName))
|
||||
|
||||
@@ -79,7 +79,7 @@ Singleton {
|
||||
available: true,
|
||||
group: "shell",
|
||||
icon: "",
|
||||
keywords: ["Notch", "Notch mode", "Open on Media while audio plays", "Pocket-dots", "Island"]
|
||||
keywords: ["Notch", "Notch mode", "Open on Media while audio plays", "Pocket-dots", "Left island", "Right island", "Notch strip"]
|
||||
},
|
||||
{
|
||||
id: "tray",
|
||||
|
||||
@@ -94,6 +94,34 @@ Singleton {
|
||||
}
|
||||
onNotchModeChanged: if (!notchMode)
|
||||
notchOpen = false
|
||||
// Super+N: swaps between notch mode and the full bar.
|
||||
function toggleNotchMode() {
|
||||
if (!ConfigService.ready)
|
||||
return false;
|
||||
notchOpen = false;
|
||||
return ConfigService.setValue("notch.enabled", !notchMode);
|
||||
}
|
||||
// The notch's cog edits its tiles in the Control Center editor, then the
|
||||
// notch comes back once the Control Center closes.
|
||||
property bool controlCenterEditRequested: false
|
||||
property bool notchReturn: false
|
||||
function editControlCenter() {
|
||||
notchReturn = notchMode;
|
||||
notchOpen = false;
|
||||
wallpaperPickerOpen = false;
|
||||
overviewOpen = false;
|
||||
dashboardOpen = false;
|
||||
launcherOpen = false;
|
||||
settingsOpen = false;
|
||||
controlCenterScreen = notchScreen || activeScreen();
|
||||
controlCenterEditRequested = true;
|
||||
controlCenterOpen = true;
|
||||
}
|
||||
onControlCenterOpenChanged: if (!controlCenterOpen && notchReturn) {
|
||||
notchReturn = false;
|
||||
if (notchMode)
|
||||
Qt.callLater(openNotch);
|
||||
}
|
||||
// Workspace overview (SUPER+Tab): a drawer of live workspace thumbnails.
|
||||
property bool overviewOpen: false
|
||||
property var overviewScreen: null
|
||||
|
||||
Reference in new issue
Block a user