more readable

This commit is contained in:
Leaced 2023-03-26 10:39:57 +02:00 committed by GitHub
parent ea2a9e0b45
commit daf697f269
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ focus) # Screenshot of focused window
swaymsg -t get_tree | swaymsg -t get_tree |
awk ' awk '
BEGIN { ORS=" " }; BEGIN { ORS=" " };
lines_after&&lines_after-- {print $2+0}; #loop over n lines. Print only numbers lines_after&&lines_after-- {print $2};
/focused": true/,/window_rect/ { /focused": true/,/window_rect/ {
if($1=="\"window_rect\":") lines_after=4; if($1=="\"window_rect\":") lines_after=4;
if($1=="\"rect\":") lines_after=2 if($1=="\"rect\":") lines_after=2