{"id":19922677,"url":"https://github.com/soundux/iconpp","last_synced_at":"2025-03-01T10:16:48.135Z","repository":{"id":103639813,"uuid":"425362068","full_name":"Soundux/iconpp","owner":"Soundux","description":"📸 A C++17 library that allows you to grab an application's icon on Linux","archived":false,"fork":false,"pushed_at":"2021-11-07T11:48:17.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T00:13:35.089Z","etag":null,"topics":["application-icon","application-icons","cmake","cpp","cpp-library","cpp17","cpp17-library","icons"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soundux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-06T22:28:46.000Z","updated_at":"2021-11-07T14:59:25.000Z","dependencies_parsed_at":"2023-05-24T04:15:24.047Z","dependency_job_id":null,"html_url":"https://github.com/Soundux/iconpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soundux%2Ficonpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soundux%2Ficonpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soundux%2Ficonpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soundux%2Ficonpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soundux","download_url":"https://codeload.github.com/Soundux/iconpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241348358,"owners_count":19948164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-icon","application-icons","cmake","cpp","cpp-library","cpp17","cpp17-library","icons"],"created_at":"2024-11-12T22:11:52.007Z","updated_at":"2025-03-01T10:16:48.113Z","avatar_url":"https://github.com/Soundux.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e 📸 iconpp \u003c/h1\u003e\n\u003cp align=\"center\"\u003e\nA C++17 library that allows you to grab an applications icon on linux\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Soundux/iconpp/actions\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/workflow/status/Soundux/iconpp/Test%20on%20Linux?label=Ubuntu%20Build\u0026style=flat-square\" alt=\"Ubuntu Build\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/Soundux/iconpp/blob/master/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/Soundux/iconpp.svg?style=flat-square\" alt=\"License\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## ⚙️ Configuration\n### Tests\n```cmake\nset(iconpp_tests OFF)\n```\n\u003e If set to `ON`, iconpp will build tests.\n\n\n## 📎 Installation\n- FetchContent\n    ```cmake\n    include(FetchContent)\n    FetchContent_Declare(iconpp GIT_REPOSITORY \"https://github.com/Soundux/iconpp\")\n\n    FetchContent_MakeAvailable(iconpp)\n    target_link_libraries(\u003cYourLibrary\u003e iconpp)\n    ```\n- Git Submodule\n    ```bash\n    git submodule add \"https://github.com/Soundux/iconpp\"\n    ```\n    ```cmake\n    # Somewhere in your CMakeLists.txt\n    add_subdirectory(\"\u003cpath_to_iconpp\u003e\")\n    target_link_libraries(\u003cYourLibrary\u003e iconpp)\n    ```\n\n## 📔 Usage\n\n### Simple example\n```cpp\n#include \u003ciconpp.hpp\u003e\n\nint main()\n{\n    auto by_pid = iconpp::icon::get(0);\n    // Or by name: auto by_name = iconpp::icon::get(\"System Monitor\");\n\n    if (by_pid)\n    {\n        by_pid-\u003esave(\"by_pid.png\");\n        auto raw_image = by_pid-\u003eget_raw();\n        auto base64_img = by_pid-\u003eget_base64();\n    }\n\n    return 0;\n}\n```\n\n## ℹ️ Remarks\nThis library does not link its required libraries at compile time. Instead the dependencies are loaded at runtime.  \nThis is done to ensure that the library will compile everywhere but only grab icons on systems that support it - In order to make the library an optional dependency that will not break builds.\n\n## ⛓️ Dependencies\n- wnck3\n- gdk3\n- glib2\n- [`Catch2`](https://github.com/catchorg/Catch2) _(For tests only!)_\n- [`expected`](https://github.com/TartanLlama/expected)\n  \n## ✅ Tested Systems\n\u003e The following distributions have been confirmed working with the listed dependencies.\n\n| Distribution | Dependencies                                      |\n| ------------ | ------------------------------------------------- |\n| Ubuntu       | `libwnck-3-0` `libglib2.0-0` `libgdk-pixbuf2.0-0` |\n| Arch Linux   | `libwnck3` `gdk-pixbuf2` `glib2`                  |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundux%2Ficonpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoundux%2Ficonpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoundux%2Ficonpp/lists"}