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

profile image ipc

This commit is contained in:
bbedward
2025-08-24 21:59:06 -04:00
parent f3c42f7f93
commit 08cc026c1f
3 changed files with 64 additions and 0 deletions

View File

@@ -14,6 +14,10 @@ Singleton {
property bool settingsPortalAvailable: false
property int systemColorScheme: 0 // 0=default, 1=prefer-dark, 2=prefer-light
function init() {
// Stub just to force IPC registration
}
function getSystemProfileImage() {
systemProfileCheckProcess.running = true
}
@@ -176,4 +180,34 @@ Singleton {
}
}
}
IpcHandler {
target: "profile"
function getImage(): string {
return root.profileImage
}
function setImage(path: string): string {
if (!path) {
return "ERROR: No path provided"
}
var absolutePath = path.startsWith(
"/") ? path : StandardPaths.writableLocation(
StandardPaths.HomeLocation) + "/" + path
try {
root.setProfileImage(absolutePath)
return "SUCCESS: Profile image set to " + absolutePath
} catch (e) {
return "ERROR: Failed to set profile image: " + e.toString()
}
}
function clearImage(): string {
root.setProfileImage("")
return "SUCCESS: Profile image cleared"
}
}
}

View File

@@ -234,6 +234,32 @@ qs -c dms ipc call wallpaper get
qs -c dms ipc call wallpaper set /path/to/image.jpg
```
## Target: `profile`
User profile image management.
### Functions
**`getImage`**
- Get current profile image path
- Returns: Full path to profile image or empty string if not set
**`setImage <path>`**
- Set profile image to specified path
- Parameters: `path` - Absolute or relative path to image file
- Returns: Success message with path or error message
**`clearImage`**
- Clear the profile image
- Returns: Success confirmation message
### Examples
```bash
qs -c dms ipc call profile getImage
qs -c dms ipc call profile setImage /path/to/avatar.png
qs -c dms ipc call profile clearImage
```
## Target: `theme`
Theme mode control (light/dark mode switching).

View File

@@ -23,6 +23,10 @@ import qs.Common
ShellRoot {
id: root
Component.onCompleted: {
PortalService.init()
}
WallpaperBackground {}
Lock {