mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
cc: allow pinning brightness device per-monitor
This commit is contained in:
@@ -189,6 +189,7 @@ Singleton {
|
|||||||
property bool lockBeforeSuspend: false
|
property bool lockBeforeSuspend: false
|
||||||
property bool loginctlLockIntegration: true
|
property bool loginctlLockIntegration: true
|
||||||
property string launchPrefix: ""
|
property string launchPrefix: ""
|
||||||
|
property var brightnessDevicePins: ({})
|
||||||
|
|
||||||
property bool gtkThemingEnabled: false
|
property bool gtkThemingEnabled: false
|
||||||
property bool qtThemingEnabled: false
|
property bool qtThemingEnabled: false
|
||||||
@@ -507,6 +508,7 @@ Singleton {
|
|||||||
lockBeforeSuspend = settings.lockBeforeSuspend !== undefined ? settings.lockBeforeSuspend : false
|
lockBeforeSuspend = settings.lockBeforeSuspend !== undefined ? settings.lockBeforeSuspend : false
|
||||||
loginctlLockIntegration = settings.loginctlLockIntegration !== undefined ? settings.loginctlLockIntegration : true
|
loginctlLockIntegration = settings.loginctlLockIntegration !== undefined ? settings.loginctlLockIntegration : true
|
||||||
launchPrefix = settings.launchPrefix !== undefined ? settings.launchPrefix : ""
|
launchPrefix = settings.launchPrefix !== undefined ? settings.launchPrefix : ""
|
||||||
|
brightnessDevicePins = settings.brightnessDevicePins !== undefined ? settings.brightnessDevicePins : ({})
|
||||||
|
|
||||||
if (settings.configVersion === undefined) {
|
if (settings.configVersion === undefined) {
|
||||||
migrateFromUndefinedToV1(settings)
|
migrateFromUndefinedToV1(settings)
|
||||||
@@ -688,6 +690,7 @@ Singleton {
|
|||||||
"lockBeforeSuspend": lockBeforeSuspend,
|
"lockBeforeSuspend": lockBeforeSuspend,
|
||||||
"loginctlLockIntegration": loginctlLockIntegration,
|
"loginctlLockIntegration": loginctlLockIntegration,
|
||||||
"launchPrefix": launchPrefix,
|
"launchPrefix": launchPrefix,
|
||||||
|
"brightnessDevicePins": brightnessDevicePins,
|
||||||
"configVersion": settingsConfigVersion
|
"configVersion": settingsConfigVersion
|
||||||
}, null, 2))
|
}, null, 2))
|
||||||
}
|
}
|
||||||
@@ -743,7 +746,7 @@ Singleton {
|
|||||||
"screenPreferences", "animationSpeed", "customAnimationDuration", "acMonitorTimeout", "acLockTimeout",
|
"screenPreferences", "animationSpeed", "customAnimationDuration", "acMonitorTimeout", "acLockTimeout",
|
||||||
"acSuspendTimeout", "acHibernateTimeout", "batteryMonitorTimeout", "batteryLockTimeout",
|
"acSuspendTimeout", "acHibernateTimeout", "batteryMonitorTimeout", "batteryLockTimeout",
|
||||||
"batterySuspendTimeout", "batteryHibernateTimeout", "lockBeforeSuspend",
|
"batterySuspendTimeout", "batteryHibernateTimeout", "lockBeforeSuspend",
|
||||||
"loginctlLockIntegration", "launchPrefix", "configVersion"
|
"loginctlLockIntegration", "launchPrefix", "brightnessDevicePins", "configVersion"
|
||||||
]
|
]
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1809,6 +1812,11 @@ Singleton {
|
|||||||
saveSettings()
|
saveSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setBrightnessDevicePins(pins) {
|
||||||
|
brightnessDevicePins = pins
|
||||||
|
saveSettings()
|
||||||
|
}
|
||||||
|
|
||||||
function getPluginSetting(pluginId, key, defaultValue) {
|
function getPluginSetting(pluginId, key, defaultValue) {
|
||||||
if (!pluginSettings[pluginId]) {
|
if (!pluginSettings[pluginId]) {
|
||||||
return defaultValue
|
return defaultValue
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Item {
|
|||||||
property string expandedSection: ""
|
property string expandedSection: ""
|
||||||
property var expandedWidgetData: null
|
property var expandedWidgetData: null
|
||||||
property var bluetoothCodecSelector: null
|
property var bluetoothCodecSelector: null
|
||||||
|
property string screenName: ""
|
||||||
|
|
||||||
property var pluginDetailInstance: null
|
property var pluginDetailInstance: null
|
||||||
property var widgetModel: null
|
property var widgetModel: null
|
||||||
@@ -205,8 +206,9 @@ Item {
|
|||||||
Component {
|
Component {
|
||||||
id: brightnessDetailComponent
|
id: brightnessDetailComponent
|
||||||
BrightnessDetail {
|
BrightnessDetail {
|
||||||
currentDeviceName: root.expandedWidgetData?.deviceName || ""
|
initialDeviceName: root.expandedWidgetData?.deviceName || ""
|
||||||
instanceId: root.expandedWidgetData?.instanceId || ""
|
instanceId: root.expandedWidgetData?.instanceId || ""
|
||||||
|
screenName: root.screenName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,8 @@ Column {
|
|||||||
property var expandedWidgetData: null
|
property var expandedWidgetData: null
|
||||||
property var bluetoothCodecSelector: null
|
property var bluetoothCodecSelector: null
|
||||||
property bool darkModeTransitionPending: false
|
property bool darkModeTransitionPending: false
|
||||||
|
property string screenName: ""
|
||||||
|
property var parentScreen: null
|
||||||
|
|
||||||
signal expandClicked(var widgetData, int globalIndex)
|
signal expandClicked(var widgetData, int globalIndex)
|
||||||
signal removeWidget(int index)
|
signal removeWidget(int index)
|
||||||
@@ -182,6 +184,7 @@ Column {
|
|||||||
bluetoothCodecSelector: root.bluetoothCodecSelector
|
bluetoothCodecSelector: root.bluetoothCodecSelector
|
||||||
widgetModel: root.model
|
widgetModel: root.model
|
||||||
collapseCallback: root.requestCollapse
|
collapseCallback: root.requestCollapse
|
||||||
|
screenName: root.screenName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -472,6 +475,8 @@ Column {
|
|||||||
height: 14
|
height: 14
|
||||||
deviceName: widgetData.deviceName || ""
|
deviceName: widgetData.deviceName || ""
|
||||||
instanceId: widgetData.instanceId || ""
|
instanceId: widgetData.instanceId || ""
|
||||||
|
screenName: root.screenName
|
||||||
|
parentScreen: root.parentScreen
|
||||||
property color sliderTrackColor: Theme.surfaceContainerHigh
|
property color sliderTrackColor: Theme.surfaceContainerHigh
|
||||||
|
|
||||||
onIconClicked: {
|
onIconClicked: {
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ DankPopout {
|
|||||||
model: widgetModel
|
model: widgetModel
|
||||||
bluetoothCodecSelector: bluetoothCodecSelector
|
bluetoothCodecSelector: bluetoothCodecSelector
|
||||||
colorPickerModal: root.colorPickerModal
|
colorPickerModal: root.colorPickerModal
|
||||||
|
screenName: root.triggerScreen?.name || ""
|
||||||
|
parentScreen: root.triggerScreen
|
||||||
onExpandClicked: (widgetData, globalIndex) => {
|
onExpandClicked: (widgetData, globalIndex) => {
|
||||||
root.expandedWidgetIndex = globalIndex
|
root.expandedWidgetIndex = globalIndex
|
||||||
root.expandedWidgetData = widgetData
|
root.expandedWidgetData = widgetData
|
||||||
|
|||||||
@@ -8,11 +8,76 @@ import qs.Widgets
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string currentDeviceName: ""
|
property string initialDeviceName: ""
|
||||||
property string instanceId: ""
|
property string instanceId: ""
|
||||||
|
property string screenName: ""
|
||||||
|
|
||||||
signal deviceNameChanged(string newDeviceName)
|
signal deviceNameChanged(string newDeviceName)
|
||||||
|
|
||||||
|
property string currentDeviceName: ""
|
||||||
|
|
||||||
|
function resolveDeviceName() {
|
||||||
|
if (!DisplayService.brightnessAvailable || !DisplayService.devices || DisplayService.devices.length === 0) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if (screenName && screenName.length > 0) {
|
||||||
|
const pins = SettingsData.brightnessDevicePins || {}
|
||||||
|
const pinnedDevice = pins[screenName]
|
||||||
|
if (pinnedDevice && pinnedDevice.length > 0) {
|
||||||
|
const found = DisplayService.devices.find(dev => dev.name === pinnedDevice)
|
||||||
|
if (found) {
|
||||||
|
return found.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (initialDeviceName && initialDeviceName.length > 0) {
|
||||||
|
const found = DisplayService.devices.find(dev => dev.name === initialDeviceName)
|
||||||
|
if (found) {
|
||||||
|
return found.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentDeviceNameFromService = DisplayService.currentDevice
|
||||||
|
if (currentDeviceNameFromService) {
|
||||||
|
const found = DisplayService.devices.find(dev => dev.name === currentDeviceNameFromService)
|
||||||
|
if (found) {
|
||||||
|
return found.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return DisplayService.devices.length > 0 ? DisplayService.devices[0].name : ""
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
currentDeviceName = resolveDeviceName()
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool isPinnedToScreen: {
|
||||||
|
if (!screenName || screenName.length === 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const pins = SettingsData.brightnessDevicePins || {}
|
||||||
|
return pins[screenName] === currentDeviceName
|
||||||
|
}
|
||||||
|
|
||||||
|
function togglePinToScreen() {
|
||||||
|
if (!screenName || screenName.length === 0 || !currentDeviceName || currentDeviceName.length === 0) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const pins = JSON.parse(JSON.stringify(SettingsData.brightnessDevicePins || {}))
|
||||||
|
|
||||||
|
if (isPinnedToScreen) {
|
||||||
|
delete pins[screenName]
|
||||||
|
} else {
|
||||||
|
pins[screenName] = currentDeviceName
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsData.setBrightnessDevicePins(pins)
|
||||||
|
}
|
||||||
|
|
||||||
implicitHeight: brightnessContent.height + Theme.spacingM
|
implicitHeight: brightnessContent.height + Theme.spacingM
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
color: Theme.surfaceContainerHigh
|
color: Theme.surfaceContainerHigh
|
||||||
@@ -61,6 +126,74 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: 40
|
||||||
|
visible: screenName && screenName.length > 0 && DisplayService.devices && DisplayService.devices.length > 1
|
||||||
|
radius: Theme.cornerRadius
|
||||||
|
color: Theme.surfaceContainerHighest
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: Theme.spacingM
|
||||||
|
|
||||||
|
Row {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
name: "monitor"
|
||||||
|
size: Theme.iconSize
|
||||||
|
color: Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: screenName || "Unknown Monitor"
|
||||||
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
|
color: Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
width: pinRow.width + Theme.spacingS * 2
|
||||||
|
height: 28
|
||||||
|
radius: height / 2
|
||||||
|
color: isPinnedToScreen ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.12) : Theme.withAlpha(Theme.surfaceText, 0.05)
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: pinRow
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: 4
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
name: isPinnedToScreen ? "push_pin" : "push_pin"
|
||||||
|
size: 16
|
||||||
|
color: isPinnedToScreen ? Theme.primary : Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
StyledText {
|
||||||
|
text: isPinnedToScreen ? "Pinned" : "Pin"
|
||||||
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
|
color: isPinnedToScreen ? Theme.primary : Theme.surfaceText
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: root.togglePinToScreen()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: DisplayService.devices || []
|
model: DisplayService.devices || []
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
@@ -90,7 +223,7 @@ Rectangle {
|
|||||||
const deviceName = modelData.name || ""
|
const deviceName = modelData.name || ""
|
||||||
|
|
||||||
if (deviceClass === "backlight" || deviceClass === "ddc") {
|
if (deviceClass === "backlight" || deviceClass === "ddc") {
|
||||||
const brightness = modelData.percentage || 50
|
const brightness = DisplayService.getDeviceBrightness(modelData.name)
|
||||||
if (brightness <= 33) return "brightness_low"
|
if (brightness <= 33) return "brightness_low"
|
||||||
if (brightness <= 66) return "brightness_medium"
|
if (brightness <= 66) return "brightness_medium"
|
||||||
return "brightness_high"
|
return "brightness_high"
|
||||||
@@ -106,7 +239,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: (modelData.percentage || 50) + "%"
|
text: Math.round(DisplayService.getDeviceBrightness(modelData.name)) + "%"
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceText
|
color: Theme.surfaceText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ Row {
|
|||||||
|
|
||||||
property string deviceName: ""
|
property string deviceName: ""
|
||||||
property string instanceId: ""
|
property string instanceId: ""
|
||||||
|
property string screenName: ""
|
||||||
|
property var parentScreen: null
|
||||||
|
|
||||||
signal iconClicked()
|
signal iconClicked()
|
||||||
|
|
||||||
@@ -21,6 +23,17 @@ Row {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (screenName && screenName.length > 0) {
|
||||||
|
const pins = SettingsData.brightnessDevicePins || {}
|
||||||
|
const pinnedDevice = pins[screenName]
|
||||||
|
if (pinnedDevice && pinnedDevice.length > 0) {
|
||||||
|
const found = DisplayService.devices.find(dev => dev.name === pinnedDevice)
|
||||||
|
if (found) {
|
||||||
|
return found.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (deviceName && deviceName.length > 0) {
|
if (deviceName && deviceName.length > 0) {
|
||||||
const found = DisplayService.devices.find(dev => dev.name === deviceName)
|
const found = DisplayService.devices.find(dev => dev.name === deviceName)
|
||||||
return found ? found.name : ""
|
return found ? found.name : ""
|
||||||
@@ -76,8 +89,10 @@ Row {
|
|||||||
tooltipLoader.active = true
|
tooltipLoader.active = true
|
||||||
if (tooltipLoader.item) {
|
if (tooltipLoader.item) {
|
||||||
const tooltipText = targetDevice ? "bl device: " + targetDevice.name : "Backlight Control"
|
const tooltipText = targetDevice ? "bl device: " + targetDevice.name : "Backlight Control"
|
||||||
const p = iconArea.mapToItem(null, iconArea.width / 2, 0)
|
const globalPos = iconArea.mapToGlobal(iconArea.width / 2, iconArea.height / 2)
|
||||||
tooltipLoader.item.show(tooltipText, p.x, p.y - 40, null)
|
const screenY = root.parentScreen?.y ?? 0
|
||||||
|
const relativeY = globalPos.y - screenY - 55
|
||||||
|
tooltipLoader.item.show(tooltipText, globalPos.x, relativeY, root.parentScreen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,53 +45,26 @@ BasePill {
|
|||||||
implicitHeight: root.playerAvailable ? root.currentContentHeight : 0
|
implicitHeight: root.playerAvailable ? root.currentContentHeight : 0
|
||||||
opacity: root.playerAvailable ? 1 : 0
|
opacity: root.playerAvailable ? 1 : 0
|
||||||
|
|
||||||
states: [
|
Behavior on opacity {
|
||||||
State {
|
NumberAnimation {
|
||||||
name: "shown"
|
duration: Theme.shortDuration
|
||||||
when: root.playerAvailable
|
easing.type: Theme.standardEasing
|
||||||
PropertyChanges {
|
|
||||||
target: parent
|
|
||||||
opacity: 1
|
|
||||||
implicitWidth: root.currentContentWidth
|
|
||||||
implicitHeight: root.currentContentHeight
|
|
||||||
}
|
|
||||||
},
|
|
||||||
State {
|
|
||||||
name: "hidden"
|
|
||||||
when: !root.playerAvailable
|
|
||||||
PropertyChanges {
|
|
||||||
target: parent
|
|
||||||
opacity: 0
|
|
||||||
implicitWidth: 0
|
|
||||||
implicitHeight: 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
transitions: [
|
|
||||||
Transition {
|
Behavior on implicitWidth {
|
||||||
from: "shown"
|
NumberAnimation {
|
||||||
to: "hidden"
|
duration: Theme.shortDuration
|
||||||
SequentialAnimation {
|
easing.type: Theme.standardEasing
|
||||||
PauseAnimation {
|
|
||||||
duration: 500
|
|
||||||
}
|
|
||||||
NumberAnimation {
|
|
||||||
properties: "opacity,implicitWidth,implicitHeight"
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Transition {
|
|
||||||
from: "hidden"
|
|
||||||
to: "shown"
|
|
||||||
NumberAnimation {
|
|
||||||
properties: "opacity,implicitWidth,implicitHeight"
|
|
||||||
duration: Theme.shortDuration
|
|
||||||
easing.type: Theme.standardEasing
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
|
|
||||||
|
Behavior on implicitHeight {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: Theme.shortDuration
|
||||||
|
easing.type: Theme.standardEasing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: verticalLayout
|
id: verticalLayout
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import Quickshell
|
import Quickshell
|
||||||
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import qs.Common
|
import qs.Common
|
||||||
@@ -20,13 +21,16 @@ Item {
|
|||||||
property real barThickness: 48
|
property real barThickness: 48
|
||||||
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 2 : Theme.spacingS
|
||||||
property Item windowRoot: (Window.window ? Window.window.contentItem : null)
|
property Item windowRoot: (Window.window ? Window.window.contentItem : null)
|
||||||
|
property int _workspaceUpdateTrigger: 0
|
||||||
readonly property var sortedToplevels: {
|
readonly property var sortedToplevels: {
|
||||||
|
_workspaceUpdateTrigger
|
||||||
const toplevels = CompositorService.sortedToplevels
|
const toplevels = CompositorService.sortedToplevels
|
||||||
if (!toplevels)
|
if (!toplevels || toplevels.length === 0)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
if (SettingsData.runningAppsCurrentWorkspace) {
|
if (SettingsData.runningAppsCurrentWorkspace) {
|
||||||
return CompositorService.filterCurrentWorkspace(toplevels, parentScreen?.name) || []
|
const filtered = CompositorService.filterCurrentWorkspace(toplevels, parentScreen?.name)
|
||||||
|
return filtered || []
|
||||||
}
|
}
|
||||||
return toplevels
|
return toplevels
|
||||||
}
|
}
|
||||||
@@ -77,6 +81,37 @@ Item {
|
|||||||
height: isVertical ? calculatedSize : barThickness
|
height: isVertical ? calculatedSize : barThickness
|
||||||
visible: windowCount > 0
|
visible: windowCount > 0
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: NiriService
|
||||||
|
function onAllWorkspacesChanged() {
|
||||||
|
_workspaceUpdateTrigger++
|
||||||
|
}
|
||||||
|
function onWindowsChanged() {
|
||||||
|
_workspaceUpdateTrigger++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Hyprland
|
||||||
|
function onFocusedWorkspaceChanged() {
|
||||||
|
_workspaceUpdateTrigger++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Hyprland.workspaces
|
||||||
|
function onValuesChanged() {
|
||||||
|
_workspaceUpdateTrigger++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Hyprland.toplevels
|
||||||
|
function onValuesChanged() {
|
||||||
|
_workspaceUpdateTrigger++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: visualBackground
|
id: visualBackground
|
||||||
width: root.isVertical ? root.widgetThickness : root.calculatedSize
|
width: root.isVertical ? root.widgetThickness : root.calculatedSize
|
||||||
|
|||||||
Reference in New Issue
Block a user