mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NPanel refactor - 1st pass: SidePanel and settings an new logic
This commit is contained in:
@@ -37,7 +37,7 @@ Singleton {
|
||||
Process {
|
||||
id: process
|
||||
stdinEnabled: true
|
||||
running: (Settings.data.audio.visualizerType !== "none") && PanelService.sidePanel.isLoaded
|
||||
running: (Settings.data.audio.visualizerType !== "none") && PanelService.sidePanel.active
|
||||
command: ["cava", "-p", "/dev/stdin"]
|
||||
onExited: {
|
||||
stdinEnabled = true
|
||||
|
||||
@@ -5,8 +5,16 @@ import Quickshell
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
// A ref. to the sidePanel, so it's accessible from other services
|
||||
property var sidePanel: null
|
||||
|
||||
// Currently opened panel
|
||||
property var openedPanel: null
|
||||
|
||||
property var sidePanel: null
|
||||
function registerOpen(panel) {
|
||||
if (openedPanel && openedPanel != panel) {
|
||||
openedPanel.close()
|
||||
}
|
||||
openedPanel = panel
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,15 @@ Singleton {
|
||||
// -------------------------------------------
|
||||
// Manual scaling via Settings
|
||||
function scale(aScreen) {
|
||||
return scaleByName(aScreen.name)
|
||||
try {
|
||||
if (aScreen !== undefined && aScreen.name !== undefined) {
|
||||
return scaleByName(aScreen.name)
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
//Logger.warn(e)
|
||||
}
|
||||
return 1.0
|
||||
}
|
||||
|
||||
function scaleByName(aScreenName) {
|
||||
|
||||
Reference in New Issue
Block a user