mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
fixing spotify app id in top levels
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
import QtQuick
|
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
QtObject {
|
import Quickshell
|
||||||
|
import QtQuick
|
||||||
|
|
||||||
|
Singleton {
|
||||||
id: modalManager
|
id: modalManager
|
||||||
|
|
||||||
signal closeAllModalsExcept(var excludedModal)
|
signal closeAllModalsExcept(var excludedModal)
|
||||||
|
|||||||
@@ -45,4 +45,11 @@ Singleton {
|
|||||||
function copy(from: url, to: url): void {
|
function copy(from: url, to: url): void {
|
||||||
Quickshell.execDetached(["cp", strip(from), strip(to)])
|
Quickshell.execDetached(["cp", strip(from), strip(to)])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ! Spotify and maybe some other apps report the wrong app id in toplevels, hardcode special case
|
||||||
|
function moddedAppId(appId: string): string {
|
||||||
|
if (appId === "Spotify")
|
||||||
|
return "spotify-launcher"
|
||||||
|
return appId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ Item {
|
|||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
implicitSize: 40
|
implicitSize: 40
|
||||||
source: Quickshell.iconPath(DesktopEntries.byId(appData.appId).icon, true)
|
source: Quickshell.iconPath(DesktopEntries.byId(Paths.moddedAppId(appData.appId)).icon, true)
|
||||||
mipmap: true
|
mipmap: true
|
||||||
smooth: true
|
smooth: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: 18
|
width: 18
|
||||||
height: 18
|
height: 18
|
||||||
source: Quickshell.iconPath(DesktopEntries.byId(appId).icon, true)
|
source: Quickshell.iconPath(DesktopEntries.byId(Paths.moddedAppId(appId)).icon, true)
|
||||||
smooth: true
|
smooth: true
|
||||||
mipmap: true
|
mipmap: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
@@ -125,9 +125,7 @@ Rectangle {
|
|||||||
|
|
||||||
// Fallback text if no icon found
|
// Fallback text if no icon found
|
||||||
Text {
|
Text {
|
||||||
anchors.left: parent.left
|
anchors.centerIn: parent
|
||||||
anchors.leftMargin: SettingsData.runningAppsCompactMode ? (parent.width - 18) / 2 : Theme.spacingXS
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
visible: !iconImg.visible
|
visible: !iconImg.visible
|
||||||
text: {
|
text: {
|
||||||
if (!appId)
|
if (!appId)
|
||||||
|
|||||||
@@ -278,6 +278,10 @@ Theme mode control (light/dark mode switching).
|
|||||||
- Switch to dark theme mode
|
- Switch to dark theme mode
|
||||||
- Returns: "dark"
|
- Returns: "dark"
|
||||||
|
|
||||||
|
**`getMode`**
|
||||||
|
- Returns current mode
|
||||||
|
- Returns: "dark" or "light"
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
```bash
|
```bash
|
||||||
qs -c dms ipc call theme toggle
|
qs -c dms ipc call theme toggle
|
||||||
|
|||||||
Reference in New Issue
Block a user