diff --git a/Configs/.config/hypr/windowrules.conf b/Configs/.config/hypr/windowrules.conf index d203af97fe..8c59206f96 100644 --- a/Configs/.config/hypr/windowrules.conf +++ b/Configs/.config/hypr/windowrules.conf @@ -92,6 +92,7 @@ windowrule = float true,match:title ^(Friends List)$ # Steam Friends List windowrule = float true,match:title ^(Steam Settings)$ # Steam Settings windowrule = float true,match:initial_title ^(Image Editor)$,match:class ^(blender)$ # Blender Render windowrule = size (monitor_w*0.5) (monitor_h*0.5),match:initial_title ^(Image Editor)$,match:class ^(blender)$ +windowrule = float true, match:initial_title ^(Ghidra: NO ACTIVE PROJECT) #Ghidra Project manager # workaround for jetbrains IDEs dropdowns/popups cause flickering windowrule = no_initial_focus true,match:class ^(.*jetbrains.*)$,match:title ^(win[0-9]+)$ diff --git a/Configs/.local/lib/hyde/keybinds/hint-hyprland.py b/Configs/.local/lib/hyde/keybinds/hint-hyprland.py index 27c5d31fbc..09ceeab534 100755 --- a/Configs/.local/lib/hyde/keybinds/hint-hyprland.py +++ b/Configs/.local/lib/hyde/keybinds/hint-hyprland.py @@ -1,4 +1,5 @@ #! /usr/bin/env python3 +import re import subprocess import json import argparse @@ -13,16 +14,12 @@ def get_hyprctl_binds(): result = subprocess.run( ["hyprctl", "binds", "-j"], capture_output=True, text=True, check=True ) - while result.returncode != 0: - print("Waiting for hyprctl command to succeed...") - time.sleep(1) - result = subprocess.run( - ["hyprctl", "binds", "-j"], - capture_output=True, - text=True, - check=True, - ) - binds = json.loads(result.stdout) + + clean_json = result.stdout + clean_json = re.sub(r'("keycode":\s*)([^"\s,\}]+)(\s*[,}])', r'\1"\2"\3', clean_json) + clean_json = re.sub(r'("allow_input_capture":\s*)([^"\n]+?)(,\s*\n)', r'\1"\2"\3', clean_json) + + binds = json.loads(clean_json) return binds except subprocess.CalledProcessError as e: print(f"Error executing hyprctl: {e}") @@ -72,7 +69,7 @@ def map_codeDisplay(keycode, key): 81: "KP_9", 90: "KP_0", } - return code_map.get(keycode, key) + return code_map.get(keycode, keycode) def map_modDisplay(modmask): @@ -353,7 +350,7 @@ def expand_meta_data(binds_data): parser.add_argument( "--format", choices=["json", "md", "dmenu", "rofi"], - default="json", + default="rofi", help="Output format", ) args = parser.parse_args()