remove system keybind loading

This commit is contained in:
Daniel Bulant 2025-06-20 23:15:53 +02:00
parent 60f8ecf9b5
commit 91c9ea9df6
No known key found for this signature in database

View file

@ -16,13 +16,13 @@ import Quickshell.Hyprland
Singleton { Singleton {
id: root id: root
property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/hyprland/get_keybinds.py`) property string keybindParserPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/scripts/hyprland/get_keybinds.py`)
property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/keybinds.conf`) // property string defaultKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland/keybinds.conf`)
property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland.conf`) property string userKeybindConfigPath: FileUtils.trimFileProtocol(`${Directories.config}/hypr/hyprland.conf`)
property var defaultKeybinds: {"children": []} // property var defaultKeybinds: {"children": []}
property var userKeybinds: {"children": []} property var userKeybinds: {"children": []}
property var keybinds: ({ property var keybinds: ({
children: [ children: [
...(defaultKeybinds.children ?? []), // ...(defaultKeybinds.children ?? []),
...(userKeybinds.children ?? []), ...(userKeybinds.children ?? []),
] ]
}) })
@ -32,27 +32,27 @@ Singleton {
function onRawEvent(event) { function onRawEvent(event) {
if (event.name == "configreloaded") { if (event.name == "configreloaded") {
getDefaultKeybinds.running = true // getDefaultKeybinds.running = true
getUserKeybinds.running = true getUserKeybinds.running = true
} }
} }
} }
Process { // Process {
id: getDefaultKeybinds // id: getDefaultKeybinds
running: true // running: true
command: ["python3", root.keybindParserPath, "--path", root.defaultKeybindConfigPath,] // command: ["python3", root.keybindParserPath, "--path", root.defaultKeybindConfigPath,]
stdout: SplitParser { // stdout: SplitParser {
onRead: data => { // onRead: data => {
try { // try {
root.defaultKeybinds = JSON.parse(data) // root.defaultKeybinds = JSON.parse(data)
} catch (e) { // } catch (e) {
console.error("[CheatsheetKeybinds] Error parsing keybinds:", e) // console.error("[CheatsheetKeybinds] Error parsing keybinds:", e)
} // }
} // }
} // }
} // }
Process { Process {
id: getUserKeybinds id: getUserKeybinds