1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-30 00:12:50 -05:00

dwl: don't always show tag 1

This commit is contained in:
bbedward
2025-10-30 21:58:26 -04:00
parent b27f362b44
commit 1fb4eb33aa
4 changed files with 41 additions and 13 deletions

View File

@@ -36,6 +36,27 @@ BasePill {
contrastOverride: SettingsData.launcherLogoContrast contrastOverride: SettingsData.launcherLogoContrast
} }
IconImage {
visible: SettingsData.launcherLogoMode === "dank"
anchors.centerIn: parent
width: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset)
height: Theme.barIconSize(root.barThickness, SettingsData.launcherLogoSizeOffset)
smooth: true
mipmap: true
asynchronous: true
source: "file://" + Theme.shellDir + "/assets/danklogo.svg"
layer.enabled: Theme.effectiveLogoColor !== ""
layer.smooth: true
layer.mipmap: true
layer.effect: MultiEffect {
saturation: 0
colorization: 1
colorizationColor: Theme.effectiveLogoColor
brightness: 0.55
contrast: 0.5
}
}
IconImage { IconImage {
visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway) visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway)
anchors.centerIn: parent anchors.centerIn: parent
@@ -60,8 +81,12 @@ BasePill {
saturation: 0 saturation: 0
colorization: 1 colorization: 1
colorizationColor: Theme.effectiveLogoColor colorizationColor: Theme.effectiveLogoColor
brightness: SettingsData.launcherLogoBrightness brightness: {
contrast: SettingsData.launcherLogoContrast SettingsData.launcherLogoBrightness
}
contrast: {
SettingsData.launcherLogoContrast
}
} }
} }

View File

@@ -37,7 +37,7 @@ Item {
return getHyprlandActiveWorkspace() return getHyprlandActiveWorkspace()
} else if (CompositorService.isDwl) { } else if (CompositorService.isDwl) {
const activeTags = getDwlActiveTags() const activeTags = getDwlActiveTags()
return activeTags.length > 0 ? activeTags[0] : 0 return activeTags.length > 0 ? activeTags[0] : -1
} else if (CompositorService.isSway) { } else if (CompositorService.isSway) {
return getSwayActiveWorkspace() return getSwayActiveWorkspace()
} }
@@ -280,12 +280,12 @@ Item {
function getDwlTags() { function getDwlTags() {
if (!DwlService.dwlAvailable) { if (!DwlService.dwlAvailable) {
return [{"tag": 0}, {"tag": 1}] return []
} }
const output = DwlService.getOutputState(root.screenName) const output = DwlService.getOutputState(root.screenName)
if (!output || !output.tags || output.tags.length === 0) { if (!output || !output.tags || output.tags.length === 0) {
return [{"tag": 0}] return []
} }
if (SettingsData.dwlShowAllTags) { if (SettingsData.dwlShowAllTags) {
@@ -306,11 +306,11 @@ Item {
function getDwlActiveTags() { function getDwlActiveTags() {
if (!DwlService.dwlAvailable) { if (!DwlService.dwlAvailable) {
return [0] return []
} }
const activeTags = DwlService.getActiveTags(root.screenName) const activeTags = DwlService.getActiveTags(root.screenName)
return activeTags.length > 0 ? activeTags : [0] return activeTags
} }
readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30)) readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30))

View File

@@ -86,7 +86,7 @@ Item {
id: logoModeGroup id: logoModeGroup
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
model: { model: {
const modes = [I18n.tr("Apps Icon"), I18n.tr("OS Logo")] const modes = [I18n.tr("Apps Icon"), I18n.tr("OS Logo"), I18n.tr("Dank")]
if (CompositorService.isNiri) { if (CompositorService.isNiri) {
modes.push("niri") modes.push("niri")
} else if (CompositorService.isHyprland) { } else if (CompositorService.isHyprland) {
@@ -104,8 +104,9 @@ Item {
currentIndex: { currentIndex: {
if (SettingsData.launcherLogoMode === "apps") return 0 if (SettingsData.launcherLogoMode === "apps") return 0
if (SettingsData.launcherLogoMode === "os") return 1 if (SettingsData.launcherLogoMode === "os") return 1
if (SettingsData.launcherLogoMode === "compositor") return 2 if (SettingsData.launcherLogoMode === "dank") return 2
if (SettingsData.launcherLogoMode === "custom") return 3 if (SettingsData.launcherLogoMode === "compositor") return 3
if (SettingsData.launcherLogoMode === "custom") return 4
return 0 return 0
} }
onSelectionChanged: (index, selected) => { onSelectionChanged: (index, selected) => {
@@ -115,8 +116,10 @@ Item {
} else if (index === 1) { } else if (index === 1) {
SettingsData.setLauncherLogoMode("os") SettingsData.setLauncherLogoMode("os")
} else if (index === 2) { } else if (index === 2) {
SettingsData.setLauncherLogoMode("compositor") SettingsData.setLauncherLogoMode("dank")
} else if (index === 3) { } else if (index === 3) {
SettingsData.setLauncherLogoMode("compositor")
} else if (index === 4) {
SettingsData.setLauncherLogoMode("custom") SettingsData.setLauncherLogoMode("custom")
} }
} }

View File

@@ -243,10 +243,10 @@ Singleton {
function getVisibleTags(outputName) { function getVisibleTags(outputName) {
const output = getOutputState(outputName) const output = getOutputState(outputName)
if (!output || !output.tags) { if (!output || !output.tags) {
return [0] return []
} }
const visibleTags = new Set([0]) const visibleTags = new Set()
output.tags.forEach(tag => { output.tags.forEach(tag => {
if (tag.state === 1 || tag.clients > 0) { if (tag.state === 1 || tag.clients > 0) {