mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-26 14:32:52 -05:00
feat: New Notepad widget w/Autosave
- IPC: qs -c dms ipc call notepad toggle
This commit is contained in:
37
shell.qml
37
shell.qml
@@ -283,6 +283,16 @@ ShellRoot {
|
||||
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: notepadModalLoader
|
||||
|
||||
active: false
|
||||
|
||||
NotepadModal {
|
||||
id: notepadModal
|
||||
}
|
||||
}
|
||||
|
||||
LazyLoader {
|
||||
id: powerMenuModalLoader
|
||||
|
||||
@@ -373,6 +383,33 @@ ShellRoot {
|
||||
target: "processlist"
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function open() {
|
||||
notepadModalLoader.active = true
|
||||
if (notepadModalLoader.item)
|
||||
notepadModalLoader.item.show()
|
||||
|
||||
return "NOTEPAD_OPEN_SUCCESS"
|
||||
}
|
||||
|
||||
function close() {
|
||||
if (notepadModalLoader.item)
|
||||
notepadModalLoader.item.hide()
|
||||
|
||||
return "NOTEPAD_CLOSE_SUCCESS"
|
||||
}
|
||||
|
||||
function toggle() {
|
||||
notepadModalLoader.active = true
|
||||
if (notepadModalLoader.item)
|
||||
notepadModalLoader.item.toggle()
|
||||
|
||||
return "NOTEPAD_TOGGLE_SUCCESS"
|
||||
}
|
||||
|
||||
target: "notepad"
|
||||
}
|
||||
|
||||
Variants {
|
||||
model: SettingsData.getFilteredScreens("toast")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user