mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 16:02:51 -05:00
Compare commits
24 Commits
stable
...
aab4b6765d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aab4b6765d | ||
|
|
3539aca1f7 | ||
|
|
81fbe9eaba | ||
|
|
f9dc6de485 | ||
|
|
012022d370 | ||
|
|
993216e157 | ||
|
|
c992f2b582 | ||
|
|
3243adebca | ||
|
|
baccef57d4 | ||
|
|
a823095372 | ||
|
|
172a743de4 | ||
|
|
623eec3689 | ||
|
|
53a033fe35 | ||
|
|
c490ee24f4 | ||
|
|
cc1e49294e | ||
|
|
e6fa46ae26 | ||
|
|
35fe774a1b | ||
|
|
1e6a0f9423 | ||
|
|
cc1877aadb | ||
|
|
f1eb1fa9ba | ||
|
|
bdd01e335d | ||
|
|
4b7baf82cd | ||
|
|
15c88ce1d2 | ||
|
|
8891c388d0 |
78
.github/workflows/run-obs.yml
vendored
78
.github/workflows/run-obs.yml
vendored
@@ -4,13 +4,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
package:
|
package:
|
||||||
description: "Package to update (dms, dms-git, or all)"
|
description: "Package to update"
|
||||||
required: false
|
required: true
|
||||||
default: "all"
|
type: choice
|
||||||
tag_version:
|
options:
|
||||||
description: "Specific tag version for dms stable (e.g., v1.0.2). Leave empty to auto-detect latest release."
|
- dms
|
||||||
required: false
|
- dms-git
|
||||||
default: ""
|
- all
|
||||||
|
default: "dms"
|
||||||
rebuild_release:
|
rebuild_release:
|
||||||
description: "Release number for rebuilds (e.g., 2, 3, 4 to increment spec Release)"
|
description: "Release number for rebuilds (e.g., 2, 3, 4 to increment spec Release)"
|
||||||
required: false
|
required: false
|
||||||
@@ -56,8 +57,9 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Helper function to check dms stable tag
|
# Helper function to check dms stable tag
|
||||||
|
# Sets LATEST_TAG variable in parent scope if update needed
|
||||||
check_dms_stable() {
|
check_dms_stable() {
|
||||||
local LATEST_TAG=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name"' | sed 's/.*"tag_name": "v\?\([^"]*\)".*/\1/' || echo "")
|
LATEST_TAG=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name"' | sed 's/.*"tag_name": "\([^"]*\)".*/\1/' || echo "")
|
||||||
local OBS_SPEC=$(curl -s -u "$OBS_USERNAME:$OBS_PASSWORD" "https://api.opensuse.org/source/home:AvengeMedia:dms/dms/dms.spec" 2>/dev/null || echo "")
|
local OBS_SPEC=$(curl -s -u "$OBS_USERNAME:$OBS_PASSWORD" "https://api.opensuse.org/source/home:AvengeMedia:dms/dms/dms.spec" 2>/dev/null || echo "")
|
||||||
local OBS_VERSION=$(echo "$OBS_SPEC" | grep "^Version:" | awk '{print $2}' | xargs || echo "")
|
local OBS_VERSION=$(echo "$OBS_SPEC" | grep "^Version:" | awk '{print $2}' | xargs || echo "")
|
||||||
|
|
||||||
@@ -73,8 +75,8 @@ jobs:
|
|||||||
# Main logic
|
# Main logic
|
||||||
REBUILD="${{ github.event.inputs.rebuild_release }}"
|
REBUILD="${{ github.event.inputs.rebuild_release }}"
|
||||||
|
|
||||||
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
# Tag push - always update stable package
|
# Tag selected or pushed - always update stable package
|
||||||
echo "packages=dms" >> $GITHUB_OUTPUT
|
echo "packages=dms" >> $GITHUB_OUTPUT
|
||||||
VERSION="${GITHUB_REF#refs/tags/}"
|
VERSION="${GITHUB_REF#refs/tags/}"
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
@@ -104,7 +106,12 @@ jobs:
|
|||||||
# Check each package and build list of those needing updates
|
# Check each package and build list of those needing updates
|
||||||
PACKAGES_TO_UPDATE=()
|
PACKAGES_TO_UPDATE=()
|
||||||
check_dms_git && PACKAGES_TO_UPDATE+=("dms-git")
|
check_dms_git && PACKAGES_TO_UPDATE+=("dms-git")
|
||||||
check_dms_stable && PACKAGES_TO_UPDATE+=("dms")
|
if check_dms_stable; then
|
||||||
|
PACKAGES_TO_UPDATE+=("dms")
|
||||||
|
if [[ -n "$LATEST_TAG" ]]; then
|
||||||
|
echo "version=$LATEST_TAG" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${#PACKAGES_TO_UPDATE[@]} -gt 0 ]]; then
|
if [[ ${#PACKAGES_TO_UPDATE[@]} -gt 0 ]]; then
|
||||||
echo "packages=${PACKAGES_TO_UPDATE[*]}" >> $GITHUB_OUTPUT
|
echo "packages=${PACKAGES_TO_UPDATE[*]}" >> $GITHUB_OUTPUT
|
||||||
@@ -129,6 +136,9 @@ jobs:
|
|||||||
if check_dms_stable; then
|
if check_dms_stable; then
|
||||||
echo "packages=$PKG" >> $GITHUB_OUTPUT
|
echo "packages=$PKG" >> $GITHUB_OUTPUT
|
||||||
echo "has_updates=true" >> $GITHUB_OUTPUT
|
echo "has_updates=true" >> $GITHUB_OUTPUT
|
||||||
|
if [[ -n "$LATEST_TAG" ]]; then
|
||||||
|
echo "version=$LATEST_TAG" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "packages=" >> $GITHUB_OUTPUT
|
echo "packages=" >> $GITHUB_OUTPUT
|
||||||
echo "has_updates=false" >> $GITHUB_OUTPUT
|
echo "has_updates=false" >> $GITHUB_OUTPUT
|
||||||
@@ -161,12 +171,19 @@ jobs:
|
|||||||
- name: Determine packages to update
|
- name: Determine packages to update
|
||||||
id: packages
|
id: packages
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
# Check if GITHUB_REF points to a tag (works for both push events and workflow_dispatch with tag selected)
|
||||||
# Tag push event - use the pushed tag
|
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
|
# Tag selected or pushed - use the tag from GITHUB_REF
|
||||||
echo "packages=dms" >> $GITHUB_OUTPUT
|
echo "packages=dms" >> $GITHUB_OUTPUT
|
||||||
VERSION="${GITHUB_REF#refs/tags/}"
|
VERSION="${GITHUB_REF#refs/tags/}"
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Triggered by tag: $VERSION"
|
echo "Using tag from GITHUB_REF: $VERSION"
|
||||||
|
# Check if check-updates already determined a version (from auto-detection)
|
||||||
|
elif [[ -n "${{ needs.check-updates.outputs.version }}" ]]; then
|
||||||
|
# Use version from check-updates job
|
||||||
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "version=${{ needs.check-updates.outputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
echo "Using version from check-updates: ${{ needs.check-updates.outputs.version }}"
|
||||||
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
|
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
|
||||||
# Scheduled run - dms-git only
|
# Scheduled run - dms-git only
|
||||||
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
@@ -176,22 +193,28 @@ jobs:
|
|||||||
|
|
||||||
# Determine version for dms stable
|
# Determine version for dms stable
|
||||||
if [[ "${{ github.event.inputs.package }}" == "dms" ]]; then
|
if [[ "${{ github.event.inputs.package }}" == "dms" ]]; then
|
||||||
# For explicit dms selection, require tag_version
|
# Use github.ref if tag selected, otherwise auto-detect latest
|
||||||
if [[ -n "${{ github.event.inputs.tag_version }}" ]]; then
|
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
VERSION="${{ github.event.inputs.tag_version }}"
|
VERSION="${GITHUB_REF#refs/tags/}"
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Using specified tag: $VERSION"
|
echo "Using tag from GITHUB_REF: $VERSION"
|
||||||
else
|
else
|
||||||
echo "ERROR: tag_version is required when package=dms"
|
# Auto-detect latest release for dms
|
||||||
echo "Please specify a tag version (e.g., v1.0.2) or use package=all for auto-detection"
|
LATEST_TAG=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name"' | sed 's/.*"tag_name": "\([^"]*\)".*/\1/' || echo "")
|
||||||
exit 1
|
if [[ -n "$LATEST_TAG" ]]; then
|
||||||
|
echo "version=$LATEST_TAG" >> $GITHUB_OUTPUT
|
||||||
|
echo "Auto-detected latest release: $LATEST_TAG"
|
||||||
|
else
|
||||||
|
echo "ERROR: Could not auto-detect latest release"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
elif [[ "${{ github.event.inputs.package }}" == "all" ]]; then
|
elif [[ "${{ github.event.inputs.package }}" == "all" ]]; then
|
||||||
# For "all", auto-detect if tag_version not specified
|
# Use github.ref if tag selected, otherwise auto-detect latest
|
||||||
if [[ -n "${{ github.event.inputs.tag_version }}" ]]; then
|
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
VERSION="${{ github.event.inputs.tag_version }}"
|
VERSION="${GITHUB_REF#refs/tags/}"
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
echo "Using specified tag: $VERSION"
|
echo "Using tag from GITHUB_REF: $VERSION"
|
||||||
else
|
else
|
||||||
# Auto-detect latest release for "all"
|
# Auto-detect latest release for "all"
|
||||||
LATEST_TAG=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name"' | sed 's/.*"tag_name": "\([^"]*\)".*/\1/' || echo "")
|
LATEST_TAG=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name"' | sed 's/.*"tag_name": "\([^"]*\)".*/\1/' || echo "")
|
||||||
@@ -206,7 +229,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Use filtered packages from check-updates when package="all" and no rebuild/tag specified
|
# Use filtered packages from check-updates when package="all" and no rebuild/tag specified
|
||||||
if [[ "${{ github.event.inputs.package }}" == "all" ]] && [[ -z "${{ github.event.inputs.rebuild_release }}" ]] && [[ -z "${{ github.event.inputs.tag_version }}" ]]; then
|
if [[ "${{ github.event.inputs.package }}" == "all" ]] && [[ -z "${{ github.event.inputs.rebuild_release }}" ]] && [[ ! "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
echo "Manual trigger: all (filtered to: ${{ needs.check-updates.outputs.packages }})"
|
echo "Manual trigger: all (filtered to: ${{ needs.check-updates.outputs.packages }})"
|
||||||
else
|
else
|
||||||
@@ -215,6 +238,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
|
if [[ -n "${{ needs.check-updates.outputs.version }}" ]]; then
|
||||||
|
echo "version=${{ needs.check-updates.outputs.version }}" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Update dms-git spec version
|
- name: Update dms-git spec version
|
||||||
|
|||||||
@@ -87,8 +87,6 @@ var (
|
|||||||
swayVersionRegex = regexp.MustCompile(`sway version (\d+\.\d+)`)
|
swayVersionRegex = regexp.MustCompile(`sway version (\d+\.\d+)`)
|
||||||
riverVersionRegex = regexp.MustCompile(`river (\d+\.\d+)`)
|
riverVersionRegex = regexp.MustCompile(`river (\d+\.\d+)`)
|
||||||
wayfireVersionRegex = regexp.MustCompile(`wayfire (\d+\.\d+)`)
|
wayfireVersionRegex = regexp.MustCompile(`wayfire (\d+\.\d+)`)
|
||||||
labwcVersionRegex = regexp.MustCompile(`labwc (\d+\.\d+\.\d+)`)
|
|
||||||
mangowcVersionRegex = regexp.MustCompile(`mango (\d+\.\d+\.\d+)`)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var doctorCmd = &cobra.Command{
|
var doctorCmd = &cobra.Command{
|
||||||
@@ -450,13 +448,11 @@ func checkWindowManagers() []checkResult {
|
|||||||
versionRegex *regexp.Regexp
|
versionRegex *regexp.Regexp
|
||||||
commands []string
|
commands []string
|
||||||
}{
|
}{
|
||||||
{"Hyprland", "Hyprland", "--version", hyprlandVersionRegex, []string{"hyprland", "Hyprland"}},
|
{"Hyprland", "hyprctl", "version", hyprlandVersionRegex, []string{"hyprland", "Hyprland"}},
|
||||||
{"niri", "niri", "--version", niriVersionRegex, []string{"niri"}},
|
{"niri", "niri", "--version", niriVersionRegex, []string{"niri"}},
|
||||||
{"Sway", "sway", "--version", swayVersionRegex, []string{"sway"}},
|
{"Sway", "sway", "--version", swayVersionRegex, []string{"sway"}},
|
||||||
{"River", "river", "-version", riverVersionRegex, []string{"river"}},
|
{"River", "river", "-version", riverVersionRegex, []string{"river"}},
|
||||||
{"Wayfire", "wayfire", "--version", wayfireVersionRegex, []string{"wayfire"}},
|
{"Wayfire", "wayfire", "--version", wayfireVersionRegex, []string{"wayfire"}},
|
||||||
{"labwc", "labwc", "--version", labwcVersionRegex, []string{"labwc"}},
|
|
||||||
{"mangowc", "mango", "-v", mangowcVersionRegex, []string{"mango"}},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var results []checkResult
|
var results []checkResult
|
||||||
@@ -502,8 +498,8 @@ func checkWindowManagers() []checkResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getVersionFromCommand(cmd, arg string, regex *regexp.Regexp) string {
|
func getVersionFromCommand(cmd, arg string, regex *regexp.Regexp) string {
|
||||||
output, err := exec.Command(cmd, arg).CombinedOutput()
|
output, err := exec.Command(cmd, arg).Output()
|
||||||
if err != nil && len(output) == 0 {
|
if err != nil {
|
||||||
return "installed"
|
return "installed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,18 +11,12 @@ let
|
|||||||
|
|
||||||
inherit (config.services.greetd.settings.default_session) user;
|
inherit (config.services.greetd.settings.default_session) user;
|
||||||
|
|
||||||
compositorPackage =
|
|
||||||
let
|
|
||||||
configured = lib.attrByPath [ "programs" cfg.compositor.name "package" ] null config;
|
|
||||||
in
|
|
||||||
if configured != null then configured else builtins.getAttr cfg.compositor.name pkgs;
|
|
||||||
|
|
||||||
cacheDir = "/var/lib/dms-greeter";
|
cacheDir = "/var/lib/dms-greeter";
|
||||||
greeterScript = pkgs.writeShellScriptBin "dms-greeter" ''
|
greeterScript = pkgs.writeShellScriptBin "dms-greeter" ''
|
||||||
export PATH=$PATH:${
|
export PATH=$PATH:${
|
||||||
lib.makeBinPath [
|
lib.makeBinPath [
|
||||||
cfg.quickshell.package
|
cfg.quickshell.package
|
||||||
compositorPackage
|
config.programs.${cfg.compositor.name}.package
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
${
|
${
|
||||||
@@ -70,7 +64,6 @@ in
|
|||||||
"niri"
|
"niri"
|
||||||
"hyprland"
|
"hyprland"
|
||||||
"sway"
|
"sway"
|
||||||
"labwc"
|
|
||||||
];
|
];
|
||||||
description = "Compositor to run greeter in";
|
description = "Compositor to run greeter in";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ in
|
|||||||
default = config.wayland.systemd.target;
|
default = config.wayland.systemd.target;
|
||||||
defaultText = lib.literalExpression "config.wayland.systemd.target";
|
defaultText = lib.literalExpression "config.wayland.systemd.target";
|
||||||
description = "Systemd target to bind to.";
|
description = "Systemd target to bind to.";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Spicy Miso
|
Saffron Bloom
|
||||||
|
|||||||
@@ -82,19 +82,15 @@ Singleton {
|
|||||||
popoutOpening();
|
popoutOpening();
|
||||||
}
|
}
|
||||||
|
|
||||||
let movedFromOtherScreen = false;
|
let justClosedSamePopout = false;
|
||||||
for (const otherScreenName in currentPopoutsByScreen) {
|
for (const otherScreenName in currentPopoutsByScreen) {
|
||||||
if (otherScreenName === screenName)
|
if (otherScreenName === screenName)
|
||||||
continue;
|
continue;
|
||||||
const otherPopout = currentPopoutsByScreen[otherScreenName];
|
const otherPopout = currentPopoutsByScreen[otherScreenName];
|
||||||
if (!otherPopout)
|
if (!otherPopout)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (otherPopout === popout) {
|
if (otherPopout === popout) {
|
||||||
movedFromOtherScreen = true;
|
justClosedSamePopout = true;
|
||||||
currentPopoutsByScreen[otherScreenName] = null;
|
|
||||||
currentPopoutTriggers[otherScreenName] = null;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (otherPopout.dashVisible !== undefined) {
|
if (otherPopout.dashVisible !== undefined) {
|
||||||
@@ -116,7 +112,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPopout === popout && popout.shouldBeVisible && !movedFromOtherScreen) {
|
if (currentPopout === popout && popout.shouldBeVisible) {
|
||||||
if (triggerId !== undefined && currentPopoutTriggers[screenName] === triggerId) {
|
if (triggerId !== undefined && currentPopoutTriggers[screenName] === triggerId) {
|
||||||
if (popout.dashVisible !== undefined) {
|
if (popout.dashVisible !== undefined) {
|
||||||
popout.dashVisible = false;
|
popout.dashVisible = false;
|
||||||
@@ -143,7 +139,6 @@ Singleton {
|
|||||||
popout.currentTabIndex = tabIndex;
|
popout.currentTabIndex = tabIndex;
|
||||||
}
|
}
|
||||||
currentPopoutTriggers[screenName] = triggerId;
|
currentPopoutTriggers[screenName] = triggerId;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPopoutTriggers[screenName] = triggerId;
|
currentPopoutTriggers[screenName] = triggerId;
|
||||||
@@ -158,8 +153,16 @@ Singleton {
|
|||||||
ModalManager.closeAllModalsExcept(null);
|
ModalManager.closeAllModalsExcept(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (movedFromOtherScreen) {
|
if (justClosedSamePopout) {
|
||||||
popout.open();
|
Qt.callLater(() => {
|
||||||
|
if (popout.dashVisible !== undefined) {
|
||||||
|
popout.dashVisible = true;
|
||||||
|
} else if (popout.notificationHistoryVisible !== undefined) {
|
||||||
|
popout.notificationHistoryVisible = true;
|
||||||
|
} else {
|
||||||
|
popout.open();
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
if (popout.dashVisible !== undefined) {
|
if (popout.dashVisible !== undefined) {
|
||||||
popout.dashVisible = true;
|
popout.dashVisible = true;
|
||||||
|
|||||||
@@ -244,13 +244,13 @@ BasePill {
|
|||||||
Column {
|
Column {
|
||||||
id: controlColumn
|
id: controlColumn
|
||||||
visible: root.isVerticalOrientation
|
visible: root.isVerticalOrientation
|
||||||
width: root.vIconSize
|
anchors.centerIn: parent
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
spacing: Theme.spacingXS
|
spacing: Theme.spacingXS
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showScreenSharingIcon && NiriService.hasCasts
|
visible: root.showScreenSharingIcon && NiriService.hasCasts
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -264,6 +264,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showNetworkIcon && NetworkService.networkAvailable
|
visible: root.showNetworkIcon && NetworkService.networkAvailable
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -277,6 +278,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected
|
visible: root.showVpnIcon && NetworkService.vpnAvailable && NetworkService.vpnConnected
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -290,6 +292,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
visible: root.showBluetoothIcon && BluetoothService.available && BluetoothService.enabled
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -303,6 +306,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize + (root.showAudioPercent ? audioPercentV.implicitHeight + 2 : 0)
|
height: root.vIconSize + (root.showAudioPercent ? audioPercentV.implicitHeight + 2 : 0)
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showAudioIcon
|
visible: root.showAudioIcon
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -341,6 +345,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize + (root.showMicPercent ? micPercentV.implicitHeight + 2 : 0)
|
height: root.vIconSize + (root.showMicPercent ? micPercentV.implicitHeight + 2 : 0)
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showMicIcon
|
visible: root.showMicIcon
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -379,6 +384,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize + (root.showBrightnessPercent ? brightnessPercentV.implicitHeight + 2 : 0)
|
height: root.vIconSize + (root.showBrightnessPercent ? brightnessPercentV.implicitHeight + 2 : 0)
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showBrightnessIcon && DisplayService.brightnessAvailable && root.hasPinnedBrightnessDevice()
|
visible: root.showBrightnessIcon && DisplayService.brightnessAvailable && root.hasPinnedBrightnessDevice()
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -414,6 +420,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showBatteryIcon && BatteryService.batteryAvailable
|
visible: root.showBatteryIcon && BatteryService.batteryAvailable
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -427,6 +434,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs()
|
visible: root.showPrinterIcon && CupsService.cupsAvailable && root.hasPrintJobs()
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
@@ -440,6 +448,7 @@ BasePill {
|
|||||||
Item {
|
Item {
|
||||||
width: root.vIconSize
|
width: root.vIconSize
|
||||||
height: root.vIconSize
|
height: root.vIconSize
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
visible: root.hasNoVisibleIcons()
|
visible: root.hasNoVisibleIcons()
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
export WLR_DRM_DEVICES=/dev/dri/card1
|
||||||
|
|
||||||
COMPOSITOR=""
|
COMPOSITOR=""
|
||||||
COMPOSITOR_CONFIG=""
|
COMPOSITOR_CONFIG=""
|
||||||
DMS_PATH="dms-greeter"
|
DMS_PATH="dms-greeter"
|
||||||
@@ -14,7 +16,7 @@ dms-greeter - DankMaterialShell greeter launcher
|
|||||||
Usage: dms-greeter --command COMPOSITOR [OPTIONS]
|
Usage: dms-greeter --command COMPOSITOR [OPTIONS]
|
||||||
|
|
||||||
Required:
|
Required:
|
||||||
--command COMPOSITOR Compositor to use (niri, hyprland, sway, scroll, mangowc, or labwc)
|
--command COMPOSITOR Compositor to use (niri, hyprland, sway, scroll or mangowc)
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-C, --config PATH Custom compositor config file
|
-C, --config PATH Custom compositor config file
|
||||||
@@ -31,7 +33,6 @@ Examples:
|
|||||||
dms-greeter --command scroll -p /home/user/.config/quickshell/custom-dms
|
dms-greeter --command scroll -p /home/user/.config/quickshell/custom-dms
|
||||||
dms-greeter --command niri --cache-dir /tmp/dmsgreeter
|
dms-greeter --command niri --cache-dir /tmp/dmsgreeter
|
||||||
dms-greeter --command mangowc
|
dms-greeter --command mangowc
|
||||||
dms-greeter --command labwc
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,15 +231,6 @@ SCROLL_EOF
|
|||||||
exec scroll -c "$COMPOSITOR_CONFIG"
|
exec scroll -c "$COMPOSITOR_CONFIG"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
labwc)
|
|
||||||
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
|
|
||||||
exec labwc --config "$COMPOSITOR_CONFIG" --session "$QS_CMD"
|
|
||||||
else
|
|
||||||
exec labwc --session "$QS_CMD"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
mangowc)
|
mangowc)
|
||||||
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
|
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
|
||||||
exec mango -c "$COMPOSITOR_CONFIG" -s "$QS_CMD && mmsg -d quit"
|
exec mango -c "$COMPOSITOR_CONFIG" -s "$QS_CMD && mmsg -d quit"
|
||||||
@@ -249,7 +241,7 @@ SCROLL_EOF
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Error: Unsupported compositor: $COMPOSITOR" >&2
|
echo "Error: Unsupported compositor: $COMPOSITOR" >&2
|
||||||
echo "Supported compositors: niri, hyprland, sway, scroll, mangowc, labwc" >&2
|
echo "Supported compositors: niri, hyprland, sway, mangowc" >&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ Item {
|
|||||||
SettingsButtonGroupRow {
|
SettingsButtonGroupRow {
|
||||||
text: I18n.tr("Position")
|
text: I18n.tr("Position")
|
||||||
model: ["Top", "Bottom", "Left", "Right"]
|
model: ["Top", "Bottom", "Left", "Right"]
|
||||||
buttonPadding: Theme.spacingS
|
|
||||||
minButtonWidth: 44
|
|
||||||
textSize: Theme.fontSizeSmall
|
|
||||||
currentIndex: {
|
currentIndex: {
|
||||||
switch (SettingsData.dockPosition) {
|
switch (SettingsData.dockPosition) {
|
||||||
case SettingsData.Position.Top:
|
case SettingsData.Position.Top:
|
||||||
@@ -132,9 +129,6 @@ Item {
|
|||||||
tags: ["dock", "indicator", "style", "circle", "line"]
|
tags: ["dock", "indicator", "style", "circle", "line"]
|
||||||
text: I18n.tr("Indicator Style")
|
text: I18n.tr("Indicator Style")
|
||||||
model: ["Circle", "Line"]
|
model: ["Circle", "Line"]
|
||||||
buttonPadding: Theme.spacingS
|
|
||||||
minButtonWidth: 44
|
|
||||||
textSize: Theme.fontSizeSmall
|
|
||||||
currentIndex: SettingsData.dockIndicatorStyle === "circle" ? 0 : 1
|
currentIndex: SettingsData.dockIndicatorStyle === "circle" ? 0 : 1
|
||||||
onSelectionChanged: (index, selected) => {
|
onSelectionChanged: (index, selected) => {
|
||||||
if (selected) {
|
if (selected) {
|
||||||
@@ -231,9 +225,6 @@ Item {
|
|||||||
description: I18n.tr("Choose the border accent color")
|
description: I18n.tr("Choose the border accent color")
|
||||||
visible: SettingsData.dockBorderEnabled
|
visible: SettingsData.dockBorderEnabled
|
||||||
model: ["Surface", "Secondary", "Primary"]
|
model: ["Surface", "Secondary", "Primary"]
|
||||||
buttonPadding: Theme.spacingS
|
|
||||||
minButtonWidth: 44
|
|
||||||
textSize: Theme.fontSizeSmall
|
|
||||||
currentIndex: {
|
currentIndex: {
|
||||||
switch (SettingsData.dockBorderColor) {
|
switch (SettingsData.dockBorderColor) {
|
||||||
case "surfaceText":
|
case "surfaceText":
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ StyledRect {
|
|||||||
|
|
||||||
Row {
|
Row {
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
DankIcon {
|
DankIcon {
|
||||||
id: headerIcon
|
id: headerIcon
|
||||||
@@ -70,8 +69,6 @@ StyledRect {
|
|||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
visible: root.title !== ""
|
visible: root.title !== ""
|
||||||
width: parent.width - (headerIcon.visible ? headerIcon.width + parent.spacing : 0)
|
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -402,24 +402,6 @@ Item {
|
|||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneWidgetData(widget) {
|
|
||||||
if (typeof widget === "string")
|
|
||||||
return {
|
|
||||||
"id": widget,
|
|
||||||
"enabled": true
|
|
||||||
};
|
|
||||||
var result = {
|
|
||||||
"id": widget.id,
|
|
||||||
"enabled": widget.enabled
|
|
||||||
};
|
|
||||||
var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "minimumWidth", "showSwap", "mediaSize", "clockCompactMode", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon"];
|
|
||||||
for (var i = 0; i < keys.length; i++) {
|
|
||||||
if (widget[keys[i]] !== undefined)
|
|
||||||
result[keys[i]] = widget[keys[i]];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleItemEnabledChanged(sectionId, itemId, enabled) {
|
function handleItemEnabledChanged(sectionId, itemId, enabled) {
|
||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
for (var i = 0; i < widgets.length; i++) {
|
for (var i = 0; i < widgets.length; i++) {
|
||||||
@@ -427,8 +409,43 @@ Item {
|
|||||||
var widgetId = typeof widget === "string" ? widget : widget.id;
|
var widgetId = typeof widget === "string" ? widget : widget.id;
|
||||||
if (widgetId !== itemId)
|
if (widgetId !== itemId)
|
||||||
continue;
|
continue;
|
||||||
var newWidget = cloneWidgetData(widget);
|
|
||||||
newWidget.enabled = enabled;
|
if (typeof widget === "string") {
|
||||||
|
widgets[i] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": enabled
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": enabled
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
else if (widget.id === "gpuTemp")
|
||||||
|
newWidget.selectedGpuIndex = 0;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
else if (widget.id === "gpuTemp")
|
||||||
|
newWidget.pciId = "";
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
widgets[i] = newWidget;
|
widgets[i] = newWidget;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -441,36 +458,130 @@ Item {
|
|||||||
|
|
||||||
function handleSpacerSizeChanged(sectionId, widgetIndex, newSize) {
|
function handleSpacerSizeChanged(sectionId, widgetIndex, newSize) {
|
||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
if (widgetIndex < 0 || widgetIndex >= widgets.length)
|
if (widgetIndex < 0 || widgetIndex >= widgets.length) {
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var widget = widgets[widgetIndex];
|
var widget = widgets[widgetIndex];
|
||||||
var widgetId = typeof widget === "string" ? widget : widget.id;
|
var widgetId = typeof widget === "string" ? widget : widget.id;
|
||||||
if (widgetId !== "spacer")
|
if (widgetId !== "spacer") {
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
var newWidget = cloneWidgetData(widget);
|
}
|
||||||
newWidget.size = newSize;
|
|
||||||
|
if (typeof widget === "string") {
|
||||||
|
widgets[widgetIndex] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true,
|
||||||
|
"size": newSize
|
||||||
|
};
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled,
|
||||||
|
"size": newSize
|
||||||
|
};
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleGpuSelectionChanged(sectionId, widgetIndex, selectedGpuIndex) {
|
function handleGpuSelectionChanged(sectionId, widgetIndex, selectedGpuIndex) {
|
||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
if (widgetIndex < 0 || widgetIndex >= widgets.length)
|
if (widgetIndex < 0 || widgetIndex >= widgets.length) {
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pciId = DgopService.availableGpus && DgopService.availableGpus.length > selectedGpuIndex ? DgopService.availableGpus[selectedGpuIndex].pciId : "";
|
var pciId = DgopService.availableGpus && DgopService.availableGpus.length > selectedGpuIndex ? DgopService.availableGpus[selectedGpuIndex].pciId : "";
|
||||||
var newWidget = cloneWidgetData(widgets[widgetIndex]);
|
var widget = widgets[widgetIndex];
|
||||||
newWidget.selectedGpuIndex = selectedGpuIndex;
|
if (typeof widget === "string") {
|
||||||
newWidget.pciId = pciId;
|
widgets[widgetIndex] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true,
|
||||||
|
"selectedGpuIndex": selectedGpuIndex,
|
||||||
|
"pciId": pciId
|
||||||
|
};
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled,
|
||||||
|
"selectedGpuIndex": selectedGpuIndex,
|
||||||
|
"pciId": pciId
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDiskMountSelectionChanged(sectionId, widgetIndex, mountPath) {
|
function handleDiskMountSelectionChanged(sectionId, widgetIndex, mountPath) {
|
||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
if (widgetIndex < 0 || widgetIndex >= widgets.length)
|
if (widgetIndex < 0 || widgetIndex >= widgets.length) {
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
var newWidget = cloneWidgetData(widgets[widgetIndex]);
|
}
|
||||||
newWidget.mountPath = mountPath;
|
|
||||||
|
var widget = widgets[widgetIndex];
|
||||||
|
if (typeof widget === "string") {
|
||||||
|
widgets[widgetIndex] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true,
|
||||||
|
"mountPath": mountPath
|
||||||
|
};
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled,
|
||||||
|
"mountPath": mountPath
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
@@ -479,8 +590,33 @@ Item {
|
|||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
if (widgetIndex < 0 || widgetIndex >= widgets.length)
|
if (widgetIndex < 0 || widgetIndex >= widgets.length)
|
||||||
return;
|
return;
|
||||||
var newWidget = cloneWidgetData(widgets[widgetIndex]);
|
|
||||||
|
var widget = widgets[widgetIndex];
|
||||||
|
if (typeof widget === "string") {
|
||||||
|
widget = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled !== undefined ? widget.enabled : true,
|
||||||
|
"showNetworkIcon": widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon,
|
||||||
|
"showBluetoothIcon": widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon,
|
||||||
|
"showAudioIcon": widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon,
|
||||||
|
"showAudioPercent": widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent,
|
||||||
|
"showVpnIcon": widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon,
|
||||||
|
"showBrightnessIcon": widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon,
|
||||||
|
"showBrightnessPercent": widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent,
|
||||||
|
"showMicIcon": widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon,
|
||||||
|
"showMicPercent": widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent,
|
||||||
|
"showBatteryIcon": widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon,
|
||||||
|
"showPrinterIcon": widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon,
|
||||||
|
"showScreenSharingIcon": widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon
|
||||||
|
};
|
||||||
newWidget[settingName] = value;
|
newWidget[settingName] = value;
|
||||||
|
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
@@ -505,8 +641,47 @@ Item {
|
|||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var newWidget = cloneWidgetData(widgets[widgetIndex]);
|
|
||||||
newWidget.minimumWidth = enabled;
|
var widget = widgets[widgetIndex];
|
||||||
|
if (typeof widget === "string") {
|
||||||
|
widgets[widgetIndex] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true,
|
||||||
|
"minimumWidth": enabled
|
||||||
|
};
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled,
|
||||||
|
"minimumWidth": enabled
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
if (widget.mountPath !== undefined)
|
||||||
|
newWidget.mountPath = widget.mountPath;
|
||||||
|
if (widget.showSwap !== undefined)
|
||||||
|
newWidget.showSwap = widget.showSwap;
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
@@ -517,41 +692,143 @@ Item {
|
|||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var newWidget = cloneWidgetData(widgets[widgetIndex]);
|
|
||||||
newWidget.showSwap = enabled;
|
var widget = widgets[widgetIndex];
|
||||||
|
if (typeof widget === "string") {
|
||||||
|
widgets[widgetIndex] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true,
|
||||||
|
"showSwap": enabled
|
||||||
|
};
|
||||||
|
setWidgetsForSection(sectionId, widgets);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled,
|
||||||
|
"showSwap": enabled
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
if (widget.mountPath !== undefined)
|
||||||
|
newWidget.mountPath = widget.mountPath;
|
||||||
|
if (widget.minimumWidth !== undefined)
|
||||||
|
newWidget.minimumWidth = widget.minimumWidth;
|
||||||
|
if (widget.mediaSize !== undefined)
|
||||||
|
newWidget.mediaSize = widget.mediaSize;
|
||||||
|
if (widget.clockCompactMode !== undefined)
|
||||||
|
newWidget.clockCompactMode = widget.clockCompactMode;
|
||||||
|
if (widget.focusedWindowCompactMode !== undefined)
|
||||||
|
newWidget.focusedWindowCompactMode = widget.focusedWindowCompactMode;
|
||||||
|
if (widget.runningAppsCompactMode !== undefined)
|
||||||
|
newWidget.runningAppsCompactMode = widget.runningAppsCompactMode;
|
||||||
|
if (widget.keyboardLayoutNameCompactMode !== undefined)
|
||||||
|
newWidget.keyboardLayoutNameCompactMode = widget.keyboardLayoutNameCompactMode;
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
widgets[widgetIndex] = newWidget;
|
widgets[widgetIndex] = newWidget;
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleCompactModeChanged(sectionId, widgetId, value) {
|
function handleCompactModeChanged(sectionId, widgetId, value) {
|
||||||
var widgets = getWidgetsForSection(sectionId).slice();
|
var widgets = getWidgetsForSection(sectionId).slice();
|
||||||
|
|
||||||
for (var i = 0; i < widgets.length; i++) {
|
for (var i = 0; i < widgets.length; i++) {
|
||||||
var widget = widgets[i];
|
var widget = widgets[i];
|
||||||
var currentId = typeof widget === "string" ? widget : widget.id;
|
var currentId = typeof widget === "string" ? widget : widget.id;
|
||||||
|
|
||||||
if (currentId !== widgetId)
|
if (currentId !== widgetId)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var newWidget = cloneWidgetData(widget);
|
if (typeof widget === "string") {
|
||||||
|
widgets[i] = {
|
||||||
|
"id": widget,
|
||||||
|
"enabled": true
|
||||||
|
};
|
||||||
|
widget = widgets[i];
|
||||||
|
} else {
|
||||||
|
var newWidget = {
|
||||||
|
"id": widget.id,
|
||||||
|
"enabled": widget.enabled
|
||||||
|
};
|
||||||
|
if (widget.size !== undefined)
|
||||||
|
newWidget.size = widget.size;
|
||||||
|
if (widget.selectedGpuIndex !== undefined)
|
||||||
|
newWidget.selectedGpuIndex = widget.selectedGpuIndex;
|
||||||
|
if (widget.pciId !== undefined)
|
||||||
|
newWidget.pciId = widget.pciId;
|
||||||
|
if (widget.mountPath !== undefined)
|
||||||
|
newWidget.mountPath = widget.mountPath;
|
||||||
|
if (widget.minimumWidth !== undefined)
|
||||||
|
newWidget.minimumWidth = widget.minimumWidth;
|
||||||
|
if (widget.showSwap !== undefined)
|
||||||
|
newWidget.showSwap = widget.showSwap;
|
||||||
|
if (widget.mediaSize !== undefined)
|
||||||
|
newWidget.mediaSize = widget.mediaSize;
|
||||||
|
if (widget.clockCompactMode !== undefined)
|
||||||
|
newWidget.clockCompactMode = widget.clockCompactMode;
|
||||||
|
if (widget.focusedWindowCompactMode !== undefined)
|
||||||
|
newWidget.focusedWindowCompactMode = widget.focusedWindowCompactMode;
|
||||||
|
if (widget.runningAppsCompactMode !== undefined)
|
||||||
|
newWidget.runningAppsCompactMode = widget.runningAppsCompactMode;
|
||||||
|
if (widget.keyboardLayoutNameCompactMode !== undefined)
|
||||||
|
newWidget.keyboardLayoutNameCompactMode = widget.keyboardLayoutNameCompactMode;
|
||||||
|
if (widget.id === "controlCenterButton") {
|
||||||
|
newWidget.showNetworkIcon = widget.showNetworkIcon ?? SettingsData.controlCenterShowNetworkIcon;
|
||||||
|
newWidget.showBluetoothIcon = widget.showBluetoothIcon ?? SettingsData.controlCenterShowBluetoothIcon;
|
||||||
|
newWidget.showAudioIcon = widget.showAudioIcon ?? SettingsData.controlCenterShowAudioIcon;
|
||||||
|
newWidget.showAudioPercent = widget.showAudioPercent ?? SettingsData.controlCenterShowAudioPercent;
|
||||||
|
newWidget.showVpnIcon = widget.showVpnIcon ?? SettingsData.controlCenterShowVpnIcon;
|
||||||
|
newWidget.showBrightnessIcon = widget.showBrightnessIcon ?? SettingsData.controlCenterShowBrightnessIcon;
|
||||||
|
newWidget.showBrightnessPercent = widget.showBrightnessPercent ?? SettingsData.controlCenterShowBrightnessPercent;
|
||||||
|
newWidget.showMicIcon = widget.showMicIcon ?? SettingsData.controlCenterShowMicIcon;
|
||||||
|
newWidget.showMicPercent = widget.showMicPercent ?? SettingsData.controlCenterShowMicPercent;
|
||||||
|
newWidget.showBatteryIcon = widget.showBatteryIcon ?? SettingsData.controlCenterShowBatteryIcon;
|
||||||
|
newWidget.showPrinterIcon = widget.showPrinterIcon ?? SettingsData.controlCenterShowPrinterIcon;
|
||||||
|
newWidget.showScreenSharingIcon = widget.showScreenSharingIcon ?? SettingsData.controlCenterShowScreenSharingIcon;
|
||||||
|
}
|
||||||
|
widgets[i] = newWidget;
|
||||||
|
widget = newWidget;
|
||||||
|
}
|
||||||
|
|
||||||
switch (widgetId) {
|
switch (widgetId) {
|
||||||
case "music":
|
case "music":
|
||||||
newWidget.mediaSize = value;
|
widget.mediaSize = value;
|
||||||
break;
|
break;
|
||||||
case "clock":
|
case "clock":
|
||||||
newWidget.clockCompactMode = value;
|
widget.clockCompactMode = value;
|
||||||
break;
|
break;
|
||||||
case "focusedWindow":
|
case "focusedWindow":
|
||||||
newWidget.focusedWindowCompactMode = value;
|
widget.focusedWindowCompactMode = value;
|
||||||
break;
|
break;
|
||||||
case "runningApps":
|
case "runningApps":
|
||||||
newWidget.runningAppsCompactMode = value;
|
widget.runningAppsCompactMode = value;
|
||||||
break;
|
break;
|
||||||
case "keyboard_layout_name":
|
case "keyboard_layout_name":
|
||||||
newWidget.keyboardLayoutNameCompactMode = value;
|
widget.keyboardLayoutNameCompactMode = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
widgets[i] = newWidget;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
setWidgetsForSection(sectionId, widgets);
|
setWidgetsForSection(sectionId, widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,19 +31,6 @@ Column {
|
|||||||
signal minimumWidthChanged(string sectionId, int widgetIndex, bool enabled)
|
signal minimumWidthChanged(string sectionId, int widgetIndex, bool enabled)
|
||||||
signal showSwapChanged(string sectionId, int widgetIndex, bool enabled)
|
signal showSwapChanged(string sectionId, int widgetIndex, bool enabled)
|
||||||
|
|
||||||
function cloneWidgetData(widget) {
|
|
||||||
var result = {
|
|
||||||
"id": widget.id,
|
|
||||||
"enabled": widget.enabled
|
|
||||||
};
|
|
||||||
var keys = ["size", "selectedGpuIndex", "pciId", "mountPath", "minimumWidth", "showSwap", "mediaSize", "clockCompactMode", "focusedWindowCompactMode", "runningAppsCompactMode", "keyboardLayoutNameCompactMode", "showNetworkIcon", "showBluetoothIcon", "showAudioIcon", "showAudioPercent", "showVpnIcon", "showBrightnessIcon", "showBrightnessPercent", "showMicIcon", "showMicPercent", "showBatteryIcon", "showPrinterIcon", "showScreenSharingIcon"];
|
|
||||||
for (var i = 0; i < keys.length; i++) {
|
|
||||||
if (widget[keys[i]] !== undefined)
|
|
||||||
result[keys[i]] = widget[keys[i]];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
@@ -740,7 +727,13 @@ Column {
|
|||||||
var newItems = root.items.slice();
|
var newItems = root.items.slice();
|
||||||
var draggedItem = newItems.splice(index, 1)[0];
|
var draggedItem = newItems.splice(index, 1)[0];
|
||||||
newItems.splice(newIndex, 0, draggedItem);
|
newItems.splice(newIndex, 0, draggedItem);
|
||||||
root.itemOrderChanged(newItems.map(item => root.cloneWidgetData(item)));
|
root.itemOrderChanged(newItems.map(item => {
|
||||||
|
return ({
|
||||||
|
"id": item.id,
|
||||||
|
"enabled": item.enabled,
|
||||||
|
"size": item.size
|
||||||
|
});
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delegateItem.x = 0;
|
delegateItem.x = 0;
|
||||||
|
|||||||
@@ -63,15 +63,15 @@ Item {
|
|||||||
onToggled: checked => SettingsData.set("showWorkspaceApps", checked)
|
onToggled: checked => SettingsData.set("showWorkspaceApps", checked)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Row {
|
||||||
width: parent.width
|
width: parent.width - Theme.spacingL
|
||||||
height: maxAppsColumn.height
|
spacing: Theme.spacingL
|
||||||
visible: SettingsData.showWorkspaceApps
|
visible: SettingsData.showWorkspaceApps
|
||||||
opacity: visible ? 1 : 0
|
opacity: visible ? 1 : 0
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Theme.spacingL
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: maxAppsColumn
|
|
||||||
x: Theme.spacingL
|
|
||||||
width: 120
|
width: 120
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
|
|
||||||
@@ -80,15 +80,14 @@ Item {
|
|||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
font.weight: Font.Medium
|
font.weight: Font.Medium
|
||||||
horizontalAlignment: Text.AlignLeft
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DankTextField {
|
DankTextField {
|
||||||
width: 100
|
width: 100
|
||||||
height: 28
|
height: 28
|
||||||
placeholderText: "3"
|
placeholderText: "#ffffff"
|
||||||
text: SettingsData.maxWorkspaceIcons
|
text: SettingsData.maxWorkspaceIcons
|
||||||
maximumLength: 2
|
maximumLength: 7
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
topPadding: Theme.spacingXS
|
topPadding: Theme.spacingXS
|
||||||
bottomPadding: Theme.spacingXS
|
bottomPadding: Theme.spacingXS
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Singleton {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property string currentVersion: "1.2"
|
readonly property string currentVersion: "1.2"
|
||||||
readonly property bool changelogEnabled: true
|
readonly property bool changelogEnabled: false
|
||||||
|
|
||||||
readonly property string configDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)) + "/DankMaterialShell"
|
readonly property string configDir: Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation)) + "/DankMaterialShell"
|
||||||
readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion
|
readonly property string changelogMarkerPath: configDir + "/.changelog-" + currentVersion
|
||||||
|
|||||||
@@ -287,14 +287,11 @@ Singleton {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDaemon) {
|
// MODIFICATION: Treat Launchers as persistent instances like Daemons
|
||||||
const newDaemons = Object.assign({}, pluginDaemonComponents);
|
if (isDaemon || isLauncher) {
|
||||||
newDaemons[pluginId] = comp;
|
|
||||||
pluginDaemonComponents = newDaemons;
|
|
||||||
} else if (isLauncher) {
|
|
||||||
const instance = comp.createObject(root, {
|
const instance = comp.createObject(root, {
|
||||||
"pluginId": pluginId,
|
"pluginId": pluginId,
|
||||||
"pluginService": root
|
"pluginService": root // Inject PluginService
|
||||||
});
|
});
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
console.error("PluginService: failed to instantiate plugin:", pluginId, comp.errorString());
|
console.error("PluginService: failed to instantiate plugin:", pluginId, comp.errorString());
|
||||||
@@ -305,9 +302,15 @@ Singleton {
|
|||||||
newInstances[pluginId] = instance;
|
newInstances[pluginId] = instance;
|
||||||
pluginInstances = newInstances;
|
pluginInstances = newInstances;
|
||||||
|
|
||||||
const newLaunchers = Object.assign({}, pluginLauncherComponents);
|
if (isDaemon) {
|
||||||
newLaunchers[pluginId] = comp;
|
const newDaemons = Object.assign({}, pluginDaemonComponents);
|
||||||
pluginLauncherComponents = newLaunchers;
|
newDaemons[pluginId] = comp;
|
||||||
|
pluginDaemonComponents = newDaemons;
|
||||||
|
} else {
|
||||||
|
const newLaunchers = Object.assign({}, pluginLauncherComponents);
|
||||||
|
newLaunchers[pluginId] = comp;
|
||||||
|
pluginLauncherComponents = newLaunchers;
|
||||||
|
}
|
||||||
} else if (isDesktop) {
|
} else if (isDesktop) {
|
||||||
const newDesktop = Object.assign({}, pluginDesktopComponents);
|
const newDesktop = Object.assign({}, pluginDesktopComponents);
|
||||||
newDesktop[pluginId] = comp;
|
newDesktop[pluginId] = comp;
|
||||||
|
|||||||
@@ -754,7 +754,7 @@ Singleton {
|
|||||||
"humidity": Math.round(hourly.relative_humidity_2m?.[i] || 0),
|
"humidity": Math.round(hourly.relative_humidity_2m?.[i] || 0),
|
||||||
"wind": Math.round(hourly.wind_speed_10m?.[i] || 0),
|
"wind": Math.round(hourly.wind_speed_10m?.[i] || 0),
|
||||||
"pressure": Math.round(hourly.surface_pressure?.[i] || 0),
|
"pressure": Math.round(hourly.surface_pressure?.[i] || 0),
|
||||||
"precipitationProbability": Math.round(hourly.precipitation_probability?.[i] || 0),
|
"precipitationProbability": Math.round(hourly.precipitation_probability_max?.[0] || 0),
|
||||||
"visibility": Math.round(hourly.visibility?.[i] || 0),
|
"visibility": Math.round(hourly.visibility?.[i] || 0),
|
||||||
"isDay": isDay
|
"isDay": isDay
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
v1.2.3
|
v1.4-unstable
|
||||||
|
|||||||
Reference in New Issue
Block a user