Merge remote-tracking branch 'origin/main' into addon-i18n

This commit is contained in:
月月
2025-07-02 22:21:58 +08:00
79 changed files with 1631 additions and 830 deletions
@@ -15,7 +15,7 @@ Rectangle {
clip: true
implicitHeight: collapsed ? collapsedBottomWidgetGroupRow.implicitHeight : bottomWidgetGroupRow.implicitHeight
property int selectedTab: 0
property bool collapsed: PersistentStates.sidebar.bottomGroup.collapsed
property bool collapsed: Persistent.states.sidebar.bottomGroup.collapsed
property var tabs: [
{"type": "calendar", "name": "Calendar", "icon": "calendar_month", "widget": calendarWidget},
{"type": "todo", "name": "To Do", "icon": "done_outline", "widget": todoWidget}
@@ -30,7 +30,7 @@ Rectangle {
}
function setCollapsed(state) {
PersistentStateManager.setState("sidebar.bottomGroup.collapsed", state)
Persistent.states.sidebar.bottomGroup.collapsed = state
if (collapsed) {
bottomWidgetGroupRow.opacity = 0
}
@@ -15,7 +15,7 @@ QuickToggleButton {
toggleBluetooth.running = true
}
altAction: () => {
Quickshell.execDetached(["bash", "-c", `${ConfigOptions.apps.bluetooth}`])
Quickshell.execDetached(["bash", "-c", `${Config.options.apps.bluetooth}`])
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
Process {
@@ -24,7 +24,6 @@ QuickToggleButton {
running: true
command: ["bash", "-c", `test "$(hyprctl getoption animations:enabled -j | jq ".int")" -ne 0`]
onExited: (exitCode, exitStatus) => {
console.log("Game mode toggle exited with code:", exitCode, "and status:", exitStatus)
root.toggled = exitCode !== 0 // Inverted because enabled = nonzero exit
}
}
@@ -16,7 +16,7 @@ QuickToggleButton {
toggleNetwork.running = true
}
altAction: () => {
Quickshell.execDetached(["bash", "-c", `${Network.ethernet ? ConfigOptions.apps.networkEthernet : ConfigOptions.apps.network}`])
Quickshell.execDetached(["bash", "-c", `${Network.ethernet ? Config.options.apps.networkEthernet : Config.options.apps.network}`])
Hyprland.dispatch("global quickshell:sidebarRightClose")
}
Process {
@@ -17,6 +17,10 @@ Item {
property bool deviceSelectorInput
property int dialogMargins: 16
property PwNode selectedDevice
readonly property list<PwNode> appPwNodes: Pipewire.nodes.values.filter((node) => {
// return node.type == "21" // Alternative, not as clean
return node.isSink && node.isStream
})
function showDeviceSelectorDialog(input: bool) {
root.selectedDevice = null
@@ -60,21 +64,13 @@ Item {
anchors.margins: 10
spacing: 10
// Get a list of nodes that output to the default sink
PwNodeLinkTracker {
id: linkTracker
node: Pipewire.defaultAudioSink
}
Repeater {
model: linkTracker.linkGroups
model: root.appPwNodes
VolumeMixerEntry {
Layout.fillWidth: true
// Get links to the default sinnk
required property PwLinkGroup modelData
// Consider sources that output to the default sink
node: modelData.source
required property var modelData
node: modelData
}
}
}
@@ -85,7 +81,7 @@ Item {
anchors.fill: flickable
visible: opacity > 0
opacity: (linkTracker.linkGroups.length === 0) ? 1 : 0
opacity: (root.appPwNodes.length === 0) ? 1 : 0
Behavior on opacity {
NumberAnimation {