diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 00:56:55 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 00:56:55 +1000 |
| commit | d54df2792ad8536ea2e4135fba3bb3558e281fe1 (patch) | |
| tree | 22445e7f85a5c4e9e84a337f4676c97e4550905e /config | |
| parent | dev: fix run script (diff) | |
| download | caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.tar.gz caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.tar.bz2 caelestia-shell-d54df2792ad8536ea2e4135fba3bb3558e281fe1.zip | |
feat: bar panel preset
Make presets more flexible
Fix workspaces when show windows disabled
Make rounded option for workspaces
Diffstat (limited to 'config')
| -rw-r--r-- | config/Appearance.qml | 4 | ||||
| -rw-r--r-- | config/BarConfig.qml | 61 |
2 files changed, 45 insertions, 20 deletions
diff --git a/config/Appearance.qml b/config/Appearance.qml index a80f010..b17b125 100644 --- a/config/Appearance.qml +++ b/config/Appearance.qml @@ -27,6 +27,10 @@ Singleton { return c; } + function on(c: color): color { + return Qt.hsla(c.hslHue, c.hslSaturation, 0.2, 1); + } + FileView { path: `${StandardPaths.standardLocations(StandardPaths.GenericStateLocation)[0]}/caelestia/scheme/current-mode.txt` watchChanges: true diff --git a/config/BarConfig.qml b/config/BarConfig.qml index d33d7dd..99f7796 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -10,44 +10,65 @@ Singleton { property bool vertical: false property Preset preset: presets.pills - readonly property Sizes sizes: Sizes {} - readonly property Workspaces workspaces: Workspaces {} - readonly property Tray tray: Tray {} + readonly property Sizes sizes: preset.sizes + readonly property Workspaces workspaces: preset.workspaces + readonly property Tray tray: preset.tray readonly property Presets presets: Presets {} component Sizes: QtObject { - readonly property int height: 40 - readonly property int innerHeight: 30 - readonly property int floatingGap: 10 - readonly property int floatingGapLarge: 15 - readonly property int maxLabelWidth: 600 - readonly property int maxLabelHeight: 400 + property int totalHeight: height + property int height: 40 + property int innerHeight: 30 + property int floatingGap: 10 + property int floatingGapLarge: 15 + property int maxLabelWidth: 600 + property int maxLabelHeight: 400 } component Workspaces: QtObject { - readonly property int shown: 10 - readonly property string style: "" - readonly property bool occupiedBg: true - readonly property bool showWindows: true - readonly property bool activeTrail: !showWindows // Doesn't work well with variable sized workspaces - readonly property string label: " " - readonly property string occupiedLabel: " " - readonly property string activeLabel: " " + property int shown: 10 + property bool rounded: true + property bool occupiedBg: true + property bool showWindows: true + property bool activeTrail: !showWindows // Doesn't work well with variable sized workspaces + property string label: " " + property string occupiedLabel: " " + property string activeLabel: " " } component Tray: QtObject { - readonly property bool recolourIcons: false + property bool recolourIcons: false } component Preset: QtObject { required property string name - required property int totalHeight + property Sizes sizes: Sizes {} + property Workspaces workspaces: Workspaces {} + property Tray tray: Tray {} } component Presets: QtObject { readonly property Preset pills: Preset { name: "pills" - totalHeight: root.sizes.height + root.sizes.floatingGap + sizes: Sizes { + totalHeight: height + floatingGap + } + } + readonly property Preset panel: Preset { + name: "panel" + sizes: Sizes { + height: 30 + } + workspaces: Workspaces { + rounded: false + showWindows: false + label: "" + occupiedLabel: "" + activeLabel: "" + } + tray: Tray { + recolourIcons: true + } } } } |