is_full_screen

This commit is contained in:
Anthony Axenov 2023-07-23 01:22:02 +00:00
parent e384d15d4b
commit 90455e5dfb

View File

@ -397,6 +397,20 @@ assert_code() {
# Misc
########################################################
# https://askubuntu.com/a/30414
is_full_screen() {
WINDOW=$(echo $(xwininfo -id $(xdotool getactivewindow) -stats | \
egrep '(Width|Height):' | \
awk '{print $NF}') | \
sed -e 's/ /x/')
SCREEN=$(xdpyinfo | grep -m1 dimensions | awk '{print $2}')
if [ "$WINDOW" = "$SCREEN" ]; then
return 0
else
return 1
fi
}
curltime() {
curl -w @- -o /dev/null -s "$@" <<'EOF'
time_namelookup: %{time_namelookup} sec\n