Open wallpaper picker from launcher, apply on click, move media bar options to module cog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e71ce9c0a4
commit
2e80ef1181
10 files changed
+49
-79
No files matched your search
@@ -4,27 +4,9 @@ import "../controls"
|
||||
import "../../components"
|
||||
import "../../services"
|
||||
import "../../media"
|
||||
import "../../services/SettingsLogic.js" as Logic
|
||||
|
||||
SettingsPage {
|
||||
id: root
|
||||
function moduleOn(id) {
|
||||
return ConfigService.data.bar.modules.some(m => m.id === id && m.enabled);
|
||||
}
|
||||
// Adds the module to the centre lane the first time, then just toggles it.
|
||||
function setModule(id, on) {
|
||||
const modules = ConfigService.data.bar.modules;
|
||||
if (modules.some(m => m.id === id))
|
||||
ConfigService.setValue("bar.modules", Logic.editModule(modules, id, "enabled", on));
|
||||
else if (on)
|
||||
ConfigService.setValue("bar.modules", modules.concat([
|
||||
{
|
||||
id: id,
|
||||
position: "center",
|
||||
enabled: true
|
||||
}
|
||||
]));
|
||||
}
|
||||
SettingsSection {
|
||||
description: "Shared playback controls for all compatible MPRIS players."
|
||||
padded: true
|
||||
@@ -33,53 +15,6 @@ SettingsPage {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
SettingsSection {
|
||||
title: "Bar"
|
||||
description: "Playback and an audio visualizer in the bar. Cava shows system audio, not only the selected player, and only runs while something plays."
|
||||
SettingRow {
|
||||
title: "Now playing"
|
||||
description: "Play/pause and the current track"
|
||||
icon: ""
|
||||
GlassToggle {
|
||||
objectName: "mediaBarNowPlaying"
|
||||
checked: root.moduleOn("nowPlaying")
|
||||
onToggled: root.setModule("nowPlaying", checked)
|
||||
}
|
||||
}
|
||||
SettingRow {
|
||||
title: "Visualizer"
|
||||
description: CavaService.error ? "Cava: " + CavaService.error : "Cava bars; click opens the dashboard's Media tab"
|
||||
icon: ""
|
||||
GlassToggle {
|
||||
objectName: "mediaBarCava"
|
||||
checked: root.moduleOn("cava")
|
||||
onToggled: root.setModule("cava", checked)
|
||||
}
|
||||
}
|
||||
PreferenceSlider {
|
||||
label: "Visualizer bars"
|
||||
icon: ""
|
||||
setting: "bar.cava.bars"
|
||||
from: 4
|
||||
to: 24
|
||||
step: 1
|
||||
enabled: root.moduleOn("cava")
|
||||
}
|
||||
PreferenceChoice {
|
||||
label: "Visualizer style"
|
||||
icon: ""
|
||||
setting: "bar.cava.style"
|
||||
choices: ["bars", "mirror"]
|
||||
enabled: root.moduleOn("cava")
|
||||
}
|
||||
PreferenceToggle {
|
||||
label: "Hide while paused"
|
||||
description: "Collapse the visualizer when nothing is playing"
|
||||
icon: ""
|
||||
setting: "bar.cava.hideWhenIdle"
|
||||
enabled: root.moduleOn("cava")
|
||||
}
|
||||
}
|
||||
SettingsSection {
|
||||
title: "Media cards"
|
||||
description: "The player in the Control Center, dashboard and this page"
|
||||
|
||||
Reference in new issue
Block a user