Add Readme, fix build

This commit is contained in:
Saphire 2024-01-29 22:04:38 +06:00
parent e49f9ab8f0
commit 8f074b5948
Signed by: Saphire
GPG Key ID: B26EB7A1F07044C4
2 changed files with 11 additions and 1 deletions

View File

@ -5,6 +5,6 @@ find_package(PkgConfig REQUIRED)
pkg_check_modules(glib REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(glib-unix REQUIRED IMPORTED_TARGET gio-unix-2.0)
add_executable(giotest test.c)
add_executable(giotest gio_dump_info.c)
target_link_libraries(giotest PkgConfig::glib PkgConfig::glib-unix)

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# GIO file associations info print
Just a little utility to query GIO's GAppInfo "database" for what application is responsible for a given mimetype.
Ideally it would be nice to print the subclass/alias info from the relevant XML(s) but GIO does not export the header files for its own handling of xdgmime XML and such.
Usage:
- Compile with CMake (e.g. `mkdir build && cd build && cmake .. && make`)
- `giotest application/rss+xml`
- Tada! Question why the application at the very top handles this mimetype (e.g. Firefox using defaults to open RSS and being one to handle that so it opens it again and again)