diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-07 14:20:10 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-07-07 14:20:10 +1000 |
| commit | 3221ca18583c18e9852c25476adaf2f1f9b7dabc (patch) | |
| tree | 2e145f088415a6aefc12b157b216c670cab2b357 /modules/dashboard/Wrapper.qml | |
| parent | issues: better templates (diff) | |
| download | caelestia-shell-3221ca18583c18e9852c25476adaf2f1f9b7dabc.tar.gz caelestia-shell-3221ca18583c18e9852c25476adaf2f1f9b7dabc.tar.bz2 caelestia-shell-3221ca18583c18e9852c25476adaf2f1f9b7dabc.zip | |
dashboard: fix pfp picker
Fixes caelestia-dots/caelestia#21
Diffstat (limited to 'modules/dashboard/Wrapper.qml')
| -rw-r--r-- | modules/dashboard/Wrapper.qml | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml index 26f6d5b..8b16d5b 100644 --- a/modules/dashboard/Wrapper.qml +++ b/modules/dashboard/Wrapper.qml @@ -1,8 +1,11 @@ pragma ComponentBehavior: Bound -import QtQuick -import Quickshell +import "root:/services" import "root:/config" +import "root:/utils" +import Quickshell +import QtQuick +import QtQuick.Dialogs Item { id: root @@ -10,6 +13,16 @@ Item { required property PersistentProperties visibilities readonly property PersistentProperties state: PersistentProperties { property int currentTab + + readonly property FileDialog facePicker: FileDialog { + title: qsTr("Select a profile picture") + acceptLabel: qsTr("Select") + nameFilters: [`Image files (${Wallpapers.extensions.map(e => `*.${e}`).join(" ")})`] + onAccepted: { + Paths.copy(selectedFile, `${Paths.home}/.face`); + Quickshell.execDetached(["notify-send", "-a", "caelestia-shell", "-u", "low", "-h", `STRING:image-path:${Paths.strip(selectedFile)}`, "Profile picture changed", `Profile picture changed to ${Paths.shortenHome(Paths.strip(selectedFile))}`]); + } + } } visible: height > 0 |