Skip to content

Commit d28cdbd

Browse files
committed
fix: screenshot method not working in plasma 6.5 and later
refs: #276
1 parent b222ae6 commit d28cdbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kde_material_you_colors/utils/kwin_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def get_desktop_window_id(screen: int = 0) -> str | None:
170170
"--output",
171171
"cat",
172172
"-g",
173-
"js: KMYC-desktop-window-id",
173+
"KMYC-desktop-window-id",
174174
]
175175

176176
# Execute the command using subprocess.run
@@ -184,7 +184,7 @@ def get_desktop_window_id(screen: int = 0) -> str | None:
184184

185185
# The output is now stored in result.stdout
186186
output = result.stdout.strip()
187-
win_id = output.split(" ")[2]
187+
win_id = output.split(" ").pop()
188188
except subprocess.CalledProcessError as e:
189189
error = f"Script id {script_id} didn't return a desktop id for screen {screen}: {e}"
190190
# Replace time to make notify show the error only one time

0 commit comments

Comments
 (0)