mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
dwl: don't always show tag 1
This commit is contained in:
@@ -36,6 +36,27 @@ BasePill {
|
||||
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 {
|
||||
visible: SettingsData.launcherLogoMode === "compositor" && (CompositorService.isNiri || CompositorService.isHyprland || CompositorService.isDwl || CompositorService.isSway)
|
||||
anchors.centerIn: parent
|
||||
@@ -60,8 +81,12 @@ BasePill {
|
||||
saturation: 0
|
||||
colorization: 1
|
||||
colorizationColor: Theme.effectiveLogoColor
|
||||
brightness: SettingsData.launcherLogoBrightness
|
||||
contrast: SettingsData.launcherLogoContrast
|
||||
brightness: {
|
||||
SettingsData.launcherLogoBrightness
|
||||
}
|
||||
contrast: {
|
||||
SettingsData.launcherLogoContrast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Item {
|
||||
return getHyprlandActiveWorkspace()
|
||||
} else if (CompositorService.isDwl) {
|
||||
const activeTags = getDwlActiveTags()
|
||||
return activeTags.length > 0 ? activeTags[0] : 0
|
||||
return activeTags.length > 0 ? activeTags[0] : -1
|
||||
} else if (CompositorService.isSway) {
|
||||
return getSwayActiveWorkspace()
|
||||
}
|
||||
@@ -280,12 +280,12 @@ Item {
|
||||
|
||||
function getDwlTags() {
|
||||
if (!DwlService.dwlAvailable) {
|
||||
return [{"tag": 0}, {"tag": 1}]
|
||||
return []
|
||||
}
|
||||
|
||||
const output = DwlService.getOutputState(root.screenName)
|
||||
if (!output || !output.tags || output.tags.length === 0) {
|
||||
return [{"tag": 0}]
|
||||
return []
|
||||
}
|
||||
|
||||
if (SettingsData.dwlShowAllTags) {
|
||||
@@ -306,11 +306,11 @@ Item {
|
||||
|
||||
function getDwlActiveTags() {
|
||||
if (!DwlService.dwlAvailable) {
|
||||
return [0]
|
||||
return []
|
||||
}
|
||||
|
||||
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))
|
||||
|
||||
@@ -86,7 +86,7 @@ Item {
|
||||
id: logoModeGroup
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
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) {
|
||||
modes.push("niri")
|
||||
} else if (CompositorService.isHyprland) {
|
||||
@@ -104,8 +104,9 @@ Item {
|
||||
currentIndex: {
|
||||
if (SettingsData.launcherLogoMode === "apps") return 0
|
||||
if (SettingsData.launcherLogoMode === "os") return 1
|
||||
if (SettingsData.launcherLogoMode === "compositor") return 2
|
||||
if (SettingsData.launcherLogoMode === "custom") return 3
|
||||
if (SettingsData.launcherLogoMode === "dank") return 2
|
||||
if (SettingsData.launcherLogoMode === "compositor") return 3
|
||||
if (SettingsData.launcherLogoMode === "custom") return 4
|
||||
return 0
|
||||
}
|
||||
onSelectionChanged: (index, selected) => {
|
||||
@@ -115,8 +116,10 @@ Item {
|
||||
} else if (index === 1) {
|
||||
SettingsData.setLauncherLogoMode("os")
|
||||
} else if (index === 2) {
|
||||
SettingsData.setLauncherLogoMode("compositor")
|
||||
SettingsData.setLauncherLogoMode("dank")
|
||||
} else if (index === 3) {
|
||||
SettingsData.setLauncherLogoMode("compositor")
|
||||
} else if (index === 4) {
|
||||
SettingsData.setLauncherLogoMode("custom")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user