Skip to content

Commit

Permalink
Fix get_focused_window xprop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lainiwa committed Dec 15, 2023
1 parent 7dfd5bc commit e53ac9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion screenshot
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ get_focused_window() {
if has xdotool; then
xdotool getwindowfocus -f
elif has xprop sed; then
printf '%d\n' "$(xprop -root |sed 's/.*# \([0-9a-fx]*\).*/\1/')"
printf '%d\n' "$(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"
else
printf "Internal error!\n" >&2
exit 1
Expand Down

0 comments on commit e53ac9a

Please sign in to comment.