man | ||
.gitignore | ||
compile_strict | ||
invo.c | ||
LICENSE.txt | ||
README.md |
“Make each program do one thing well.” – Unix Philosophy
This program can get and print the monitor width and height, apply optional multipliers, and then print the result to the standard output.
This can be used as base for size-aware resizing of windows.
Compilation
Arch users might like the AUR package.
Compile using gcc
and pkg-config
:
# Normal compilation
gcc -std=c99 $(pkg-config --cflags gtk+-3.0) -o invo invo.c $(pkg-config --libs gtk+-3.0)
# Optionally compile with a given version string
gcc -std=c99 -Dversion_string=my_cool_version $(pkg-config --cflags gtk+-3.0) -o invo invo.c $(pkg-config --libs gtk+-3.0)
Then copy invo
wherever you like.
There is also a provided POSIX compliant shell script that compiles invo.c
and tests the result. The script strictly compiles C99 code and warns about anything that isn’t strictly C99 code.
# Strict C99 compilation to `invo`
./compile_strict
# Strict C99 compilation to `foobar`
./compile_strict foobar
This script validates if gcc
and pkg-config
are available on your machine, and if so, it compiles invo.c
.
Usage
The simplest call is just providing either --width
or --height
(or both) to print the respective information.
% invo --width
3840
% invo --width --height
3840
2160
You can also use a multiplier to change the printed value.
% invo --height 0.5
1080
A full list of options can be shown with the --help
parameter.
There is also a Manapage available. The Arch package installs it automatically, otherwise just run man ./invo.1
. In case of differences, this readme file has to be seen as the more recent version.