is_full_screen
This commit is contained in:
parent
e384d15d4b
commit
90455e5dfb
@ -397,6 +397,20 @@ assert_code() {
|
|||||||
# Misc
|
# 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() {
|
curltime() {
|
||||||
curl -w @- -o /dev/null -s "$@" <<'EOF'
|
curl -w @- -o /dev/null -s "$@" <<'EOF'
|
||||||
time_namelookup: %{time_namelookup} sec\n
|
time_namelookup: %{time_namelookup} sec\n
|
||||||
|
Loading…
Reference in New Issue
Block a user