summaryrefslogtreecommitdiff
path: root/modules/controlcenter
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-01-09 15:15:49 -0500
committerFreya Murphy <freya@freyacat.org>2026-01-22 08:33:36 -0500
commit2c2805abc3dc41ecfb6c48d3707d23423568c5a2 (patch)
tree71dab16530ad4c0bc47b08d7dec1107093879f37 /modules/controlcenter
parentonly show active workspaces, fix colors (diff)
downloadcaelestia-shell-2c2805abc3dc41ecfb6c48d3707d23423568c5a2.tar.gz
caelestia-shell-2c2805abc3dc41ecfb6c48d3707d23423568c5a2.tar.bz2
caelestia-shell-2c2805abc3dc41ecfb6c48d3707d23423568c5a2.zip
remove more stuffff
Diffstat (limited to 'modules/controlcenter')
-rw-r--r--modules/controlcenter/PaneRegistry.qml18
-rw-r--r--modules/controlcenter/Panes.qml17
-rw-r--r--modules/controlcenter/appearance/sections/AnimationsSection.qml42
-rw-r--r--modules/controlcenter/appearance/sections/BorderSection.qml63
-rw-r--r--modules/controlcenter/appearance/sections/ColorVariantSection.qml92
-rw-r--r--modules/controlcenter/appearance/sections/ScalesSection.qml84
-rw-r--r--modules/controlcenter/appearance/sections/ThemeModeSection.qml24
-rw-r--r--modules/controlcenter/appearance/sections/TransparencySection.qml74
-rw-r--r--modules/controlcenter/launcher/Settings.qml167
-rw-r--r--modules/controlcenter/taskbar/ConnectedButtonGroup.qml109
10 files changed, 7 insertions, 683 deletions
diff --git a/modules/controlcenter/PaneRegistry.qml b/modules/controlcenter/PaneRegistry.qml
index d8bf45e..377027c 100644
--- a/modules/controlcenter/PaneRegistry.qml
+++ b/modules/controlcenter/PaneRegistry.qml
@@ -24,24 +24,6 @@ QtObject {
readonly property string icon: "volume_up"
readonly property string component: "audio/AudioPane.qml"
},
- QtObject {
- readonly property string id: "appearance"
- readonly property string label: "appearance"
- readonly property string icon: "palette"
- readonly property string component: "appearance/AppearancePane.qml"
- },
- QtObject {
- readonly property string id: "taskbar"
- readonly property string label: "taskbar"
- readonly property string icon: "task_alt"
- readonly property string component: "taskbar/TaskbarPane.qml"
- },
- QtObject {
- readonly property string id: "launcher"
- readonly property string label: "launcher"
- readonly property string icon: "apps"
- readonly property string component: "launcher/LauncherPane.qml"
- }
]
readonly property int count: panes.length
diff --git a/modules/controlcenter/Panes.qml b/modules/controlcenter/Panes.qml
index c239b91..03f74be 100644
--- a/modules/controlcenter/Panes.qml
+++ b/modules/controlcenter/Panes.qml
@@ -3,9 +3,6 @@ pragma ComponentBehavior: Bound
import "bluetooth"
import "network"
import "audio"
-import "appearance"
-import "taskbar"
-import "launcher"
import qs.components
import qs.services
import qs.config
@@ -103,7 +100,7 @@ ClippingRectangle {
implicitHeight: root.height
property bool hasBeenLoaded: false
-
+
function updateActive(): void {
const diff = Math.abs(root.session.activeIndex - pane.paneIndex);
const isActivePane = diff === 0;
@@ -130,37 +127,37 @@ ClippingRectangle {
anchors.fill: parent
clip: false
active: false
-
+
Component.onCompleted: {
Qt.callLater(pane.updateActive);
}
-
+
onActiveChanged: {
if (active && !pane.hasBeenLoaded) {
pane.hasBeenLoaded = true;
}
-
+
if (active && !item) {
loader.setSource(pane.componentPath, {
"session": root.session
});
}
}
-
+
onItemChanged: {
if (item) {
pane.hasBeenLoaded = true;
}
}
}
-
+
Connections {
target: root.session
function onActiveIndexChanged(): void {
pane.updateActive();
}
}
-
+
Connections {
target: layout
function onInitialOpeningCompleteChanged(): void {
diff --git a/modules/controlcenter/appearance/sections/AnimationsSection.qml b/modules/controlcenter/appearance/sections/AnimationsSection.qml
deleted file mode 100644
index 03fc2b1..0000000
--- a/modules/controlcenter/appearance/sections/AnimationsSection.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../../components"
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-CollapsibleSection {
- id: root
-
- required property var rootPane
-
- title: qsTr("Animations")
- showBackground: true
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Animation duration scale")
- value: rootPane.animDurationsScale
- from: 0.1
- to: 5.0
- decimals: 1
- suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 5.0 }
-
- onValueModified: (newValue) => {
- rootPane.animDurationsScale = newValue;
- rootPane.saveConfig();
- }
- }
- }
-}
-
diff --git a/modules/controlcenter/appearance/sections/BorderSection.qml b/modules/controlcenter/appearance/sections/BorderSection.qml
deleted file mode 100644
index dae26c3..0000000
--- a/modules/controlcenter/appearance/sections/BorderSection.qml
+++ /dev/null
@@ -1,63 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../../components"
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-CollapsibleSection {
- id: root
-
- required property var rootPane
-
- title: qsTr("Border")
- showBackground: true
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Border rounding")
- value: rootPane.borderRounding
- from: 0.1
- to: 100
- decimals: 1
- suffix: "px"
- validator: DoubleValidator { bottom: 0.1; top: 100 }
-
- onValueModified: (newValue) => {
- rootPane.borderRounding = newValue;
- rootPane.saveConfig();
- }
- }
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Border thickness")
- value: rootPane.borderThickness
- from: 0.1
- to: 100
- decimals: 1
- suffix: "px"
- validator: DoubleValidator { bottom: 0.1; top: 100 }
-
- onValueModified: (newValue) => {
- rootPane.borderThickness = newValue;
- rootPane.saveConfig();
- }
- }
- }
-}
-
diff --git a/modules/controlcenter/appearance/sections/ColorVariantSection.qml b/modules/controlcenter/appearance/sections/ColorVariantSection.qml
deleted file mode 100644
index 98c3d7c..0000000
--- a/modules/controlcenter/appearance/sections/ColorVariantSection.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../../../launcher/services"
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import Quickshell
-import QtQuick
-import QtQuick.Layouts
-
-CollapsibleSection {
- title: qsTr("Color variant")
- description: qsTr("Material theme variant")
- showBackground: true
-
- ColumnLayout {
- Layout.fillWidth: true
- spacing: Appearance.spacing.small / 2
-
- Repeater {
- model: M3Variants.list
-
- delegate: StyledRect {
- required property var modelData
-
- Layout.fillWidth: true
-
- color: Qt.alpha(Colours.tPalette.m3surfaceContainer, modelData.variant === Schemes.currentVariant ? Colours.tPalette.m3surfaceContainer.a : 0)
- radius: Appearance.rounding.normal
- border.width: modelData.variant === Schemes.currentVariant ? 1 : 0
- border.color: Colours.palette.m3primary
-
- StateLayer {
- function onClicked(): void {
- const variant = modelData.variant;
-
- Schemes.currentVariant = variant;
- Quickshell.execDetached(["caelestia", "scheme", "set", "-v", variant]);
-
- Qt.callLater(() => {
- reloadTimer.restart();
- });
- }
- }
-
- Timer {
- id: reloadTimer
- interval: 300
- onTriggered: {
- Schemes.reload();
- }
- }
-
- RowLayout {
- id: variantRow
-
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: Appearance.padding.normal
-
- spacing: Appearance.spacing.normal
-
- MaterialIcon {
- text: modelData.icon
- font.pointSize: Appearance.font.size.large
- fill: modelData.variant === Schemes.currentVariant ? 1 : 0
- }
-
- StyledText {
- Layout.fillWidth: true
- text: modelData.name
- font.weight: modelData.variant === Schemes.currentVariant ? 500 : 400
- }
-
- MaterialIcon {
- visible: modelData.variant === Schemes.currentVariant
- text: "check"
- color: Colours.palette.m3primary
- font.pointSize: Appearance.font.size.large
- }
- }
-
- implicitHeight: variantRow.implicitHeight + Appearance.padding.normal * 2
- }
- }
- }
-}
-
diff --git a/modules/controlcenter/appearance/sections/ScalesSection.qml b/modules/controlcenter/appearance/sections/ScalesSection.qml
deleted file mode 100644
index f74923b..0000000
--- a/modules/controlcenter/appearance/sections/ScalesSection.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../../components"
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-CollapsibleSection {
- id: root
-
- required property var rootPane
-
- title: qsTr("Scales")
- showBackground: true
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Padding scale")
- value: rootPane.paddingScale
- from: 0.5
- to: 2.0
- decimals: 1
- suffix: "×"
- validator: DoubleValidator { bottom: 0.5; top: 2.0 }
-
- onValueModified: (newValue) => {
- rootPane.paddingScale = newValue;
- rootPane.saveConfig();
- }
- }
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Rounding scale")
- value: rootPane.roundingScale
- from: 0.1
- to: 5.0
- decimals: 1
- suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 5.0 }
-
- onValueModified: (newValue) => {
- rootPane.roundingScale = newValue;
- rootPane.saveConfig();
- }
- }
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Spacing scale")
- value: rootPane.spacingScale
- from: 0.1
- to: 2.0
- decimals: 1
- suffix: "×"
- validator: DoubleValidator { bottom: 0.1; top: 2.0 }
-
- onValueModified: (newValue) => {
- rootPane.spacingScale = newValue;
- rootPane.saveConfig();
- }
- }
- }
-}
-
diff --git a/modules/controlcenter/appearance/sections/ThemeModeSection.qml b/modules/controlcenter/appearance/sections/ThemeModeSection.qml
deleted file mode 100644
index c136437..0000000
--- a/modules/controlcenter/appearance/sections/ThemeModeSection.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import QtQuick
-
-CollapsibleSection {
- title: qsTr("Theme mode")
- description: qsTr("Light or dark theme")
- showBackground: true
-
- SwitchRow {
- label: qsTr("Dark mode")
- checked: !Colours.currentLight
- onToggled: checked => {
- Colours.setMode(checked ? "dark" : "light");
- }
- }
-}
-
diff --git a/modules/controlcenter/appearance/sections/TransparencySection.qml b/modules/controlcenter/appearance/sections/TransparencySection.qml
deleted file mode 100644
index c9dbfb8..0000000
--- a/modules/controlcenter/appearance/sections/TransparencySection.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../../components"
-import qs.components
-import qs.components.controls
-import qs.components.containers
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-CollapsibleSection {
- id: root
-
- required property var rootPane
-
- title: qsTr("Transparency")
- showBackground: true
-
- SwitchRow {
- label: qsTr("Transparency enabled")
- checked: rootPane.transparencyEnabled
- onToggled: checked => {
- rootPane.transparencyEnabled = checked;
- rootPane.saveConfig();
- }
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Transparency base")
- value: rootPane.transparencyBase * 100
- from: 0
- to: 100
- suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
- rootPane.transparencyBase = newValue / 100;
- rootPane.saveConfig();
- }
- }
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.normal
-
- SliderInput {
- Layout.fillWidth: true
-
- label: qsTr("Transparency layers")
- value: rootPane.transparencyLayers * 100
- from: 0
- to: 100
- suffix: "%"
- validator: IntValidator { bottom: 0; top: 100 }
- formatValueFunction: (val) => Math.round(val).toString()
- parseValueFunction: (text) => parseInt(text)
-
- onValueModified: (newValue) => {
- rootPane.transparencyLayers = newValue / 100;
- rootPane.saveConfig();
- }
- }
- }
-}
-
diff --git a/modules/controlcenter/launcher/Settings.qml b/modules/controlcenter/launcher/Settings.qml
deleted file mode 100644
index 7ab1d46..0000000
--- a/modules/controlcenter/launcher/Settings.qml
+++ /dev/null
@@ -1,167 +0,0 @@
-pragma ComponentBehavior: Bound
-
-import ".."
-import "../components"
-import qs.components
-import qs.components.controls
-import qs.components.effects
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-ColumnLayout {
- id: root
-
- required property Session session
-
- spacing: Appearance.spacing.normal
-
- SettingsHeader {
- icon: "apps"
- title: qsTr("Launcher Settings")
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("General")
- description: qsTr("General launcher settings")
- }
-
- SectionContainer {
- ToggleRow {
- label: qsTr("Enabled")
- checked: Config.launcher.enabled
- toggle.onToggled: {
- Config.launcher.enabled = checked;
- Config.save();
- }
- }
-
- ToggleRow {
- label: qsTr("Show on hover")
- checked: Config.launcher.showOnHover
- toggle.onToggled: {
- Config.launcher.showOnHover = checked;
- Config.save();
- }
- }
-
- ToggleRow {
- label: qsTr("Vim keybinds")
- checked: Config.launcher.vimKeybinds
- toggle.onToggled: {
- Config.launcher.vimKeybinds = checked;
- Config.save();
- }
- }
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("Display")
- description: qsTr("Display and appearance settings")
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.small / 2
-
- PropertyRow {
- label: qsTr("Max shown items")
- value: qsTr("%1").arg(Config.launcher.maxShown)
- }
-
- PropertyRow {
- showTopMargin: true
- label: qsTr("Drag threshold")
- value: qsTr("%1 px").arg(Config.launcher.dragThreshold)
- }
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("Prefixes")
- description: qsTr("Command prefix settings")
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.small / 2
-
- PropertyRow {
- label: qsTr("Special prefix")
- value: Config.launcher.specialPrefix || qsTr("None")
- }
-
- PropertyRow {
- showTopMargin: true
- label: qsTr("Action prefix")
- value: Config.launcher.actionPrefix || qsTr("None")
- }
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("Fuzzy search")
- description: qsTr("Fuzzy search settings")
- }
-
- SectionContainer {
- ToggleRow {
- label: qsTr("Apps")
- checked: Config.launcher.useFuzzy.apps
- toggle.onToggled: {
- Config.launcher.useFuzzy.apps = checked;
- Config.save();
- }
- }
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("Sizes")
- description: qsTr("Size settings for launcher items")
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.small / 2
-
- PropertyRow {
- label: qsTr("Item width")
- value: qsTr("%1 px").arg(Config.launcher.sizes.itemWidth)
- }
-
- PropertyRow {
- showTopMargin: true
- label: qsTr("Item height")
- value: qsTr("%1 px").arg(Config.launcher.sizes.itemHeight)
- }
-
- PropertyRow {
- showTopMargin: true
- label: qsTr("Wallpaper width")
- value: qsTr("%1 px").arg(Config.launcher.sizes.wallpaperWidth)
- }
-
- PropertyRow {
- showTopMargin: true
- label: qsTr("Wallpaper height")
- value: qsTr("%1 px").arg(Config.launcher.sizes.wallpaperHeight)
- }
- }
-
- SectionHeader {
- Layout.topMargin: Appearance.spacing.large
- title: qsTr("Hidden apps")
- description: qsTr("Applications hidden from launcher")
- }
-
- SectionContainer {
- contentSpacing: Appearance.spacing.small / 2
-
- PropertyRow {
- label: qsTr("Total hidden")
- value: qsTr("%1").arg(Config.launcher.hiddenApps ? Config.launcher.hiddenApps.length : 0)
- }
- }
-}
-
diff --git a/modules/controlcenter/taskbar/ConnectedButtonGroup.qml b/modules/controlcenter/taskbar/ConnectedButtonGroup.qml
deleted file mode 100644
index bf3a97f..0000000
--- a/modules/controlcenter/taskbar/ConnectedButtonGroup.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-import ".."
-import qs.components
-import qs.components.controls
-import qs.components.effects
-import qs.services
-import qs.config
-import QtQuick
-import QtQuick.Layouts
-
-StyledRect {
- id: root
-
- property var options: [] // Array of {label: string, propertyName: string, onToggled: function}
- property var rootItem: null // The root item that contains the properties we want to bind to
- property string title: "" // Optional title text
-
- Layout.fillWidth: true
- implicitHeight: layout.implicitHeight + Appearance.padding.large * 2
- radius: Appearance.rounding.normal
- color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
- clip: true
-
- Behavior on implicitHeight {
- Anim {}
- }
-
- ColumnLayout {
- id: layout
-
- anchors.fill: parent
- anchors.margins: Appearance.padding.large
- spacing: Appearance.spacing.normal
-
- StyledText {
- visible: root.title !== ""
- text: root.title
- font.pointSize: Appearance.font.size.normal
- }
-
- RowLayout {
- id: buttonRow
- Layout.alignment: Qt.AlignHCenter
- spacing: Appearance.spacing.small
-
- Repeater {
- id: repeater
- model: root.options
-
- delegate: TextButton {
- id: button
- required property int index
- required property var modelData
-
- Layout.fillWidth: true
- text: modelData.label
-
- property bool _checked: false
-
- checked: _checked
- toggle: false
- type: TextButton.Tonal
-
- // Create binding in Component.onCompleted
- Component.onCompleted: {
- if (root.rootItem && modelData.propertyName) {
- const propName = modelData.propertyName;
- const rootItem = root.rootItem;
- _checked = Qt.binding(function() {
- return rootItem[propName] ?? false;
- });
- }
- }
-
- // Match utilities Toggles radius styling
- // Each button has full rounding (not connected) since they have spacing
- radius: stateLayer.pressed ? Appearance.rounding.small / 2 : internalChecked ? Appearance.rounding.small : Appearance.rounding.normal
-
- // Match utilities Toggles inactive color
- inactiveColour: Colours.layer(Colours.palette.m3surfaceContainerHighest, 2)
-
- // Adjust width similar to utilities toggles
- Layout.preferredWidth: implicitWidth + (stateLayer.pressed ? Appearance.padding.large : internalChecked ? Appearance.padding.smaller : 0)
-
- onClicked: {
- if (modelData.onToggled && root.rootItem && modelData.propertyName) {
- const currentValue = root.rootItem[modelData.propertyName] ?? false;
- modelData.onToggled(!currentValue);
- }
- }
-
- Behavior on Layout.preferredWidth {
- Anim {
- duration: Appearance.anim.durations.expressiveFastSpatial
- easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
- }
- }
-
- Behavior on radius {
- Anim {
- duration: Appearance.anim.durations.expressiveFastSpatial
- easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
- }
- }
- }
- }
- }
- }
-}
-