diff --git a/neofetch b/neofetch index 5528338d..3b1112c1 100755 --- a/neofetch +++ b/neofetch @@ -3975,14 +3975,14 @@ get_window_size() { if type -p xdo &>/dev/null; then current_window="$(xdo id)" + elif type -p xprop &>/dev/null; then + current_window="$(xprop -root _NET_ACTIVE_WINDOW)" + current_window="${current_window##* }" + elif type -p xdpyinfo &>/dev/null; then current_window="$(xdpyinfo | grep -F "focus:")" current_window="${current_window/*window }" current_window="${current_window/,*}" - - elif type -p xprop &>/dev/null; then - current_window="$(xprop -root _NET_ACTIVE_WINDOW)" - current_window="${current_window##* }" fi # If the ID was found get the window size.