Coder Social home page Coder Social logo

sardemff7 / libnkutils Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 613 KB

Miscellaneous utilities

C 92.65% Makefile 2.94% M4 1.45% Meson 2.97%
c utils-library format-string enum enumeration color color-parser xkbcommon xdg-theme desktop-environment-configuration

libnkutils's Introduction

libnkutils - Miscellaneous utilities

libnkutils is an helper library for almost-but-not-so-trivial features you do not want to write again and again.

Please refer to the developper documentation (or your locally installed version) for details.

If you are a user of an application using libnkutils, please refer to the man page (or man nkutils-<major>) or the developper documentation for formats documentation.

libnkutils's People

Contributors

davedavenport avatar sardemff7 avatar wentasah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wentasah

libnkutils's Issues

nk_xdg_theme_get_icon cannot find icon

Hello, I use on my laptop rofi as application launcher. This project uses your library for search path to icon. I installed application https://zoom.us/ and rofi does not show icon.
Zoom.desktop:

[Desktop Entry]
Name=Zoom
Comment=Zoom Video Conference
Exec=/usr/bin/zoom %U
Icon=Zoom.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Network;Application;
StartupWMClass=Zoom
MimeType=x-scheme-handler/zoommtg;x-scheme-handler/zoomus;x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/zoomphonecall;application/x-zoom
X-KDE-Protocols=zoommtg;zoomus;tel;callto;zoomphonecall;
Name[en_US]=Zoom

I read specification and cannot found specification for field: Icon, but found an algorithm to icon lookup.

I understand that desktop file is not correct for this algorithm, but other application launcher show icon for this desktop file. Maybe is better add empty extension here and after this fix application with extension in icon path will work?

Tests fail with with Adwaita after 3.30.1-1

As reported here: https://aur.archlinux.org/packages/rofi-git/

$ ninja -C build test
ninja: Entering directory `build'
[1/3] Generating nkutils-git-version.ent with a custom command.
[2/3] Generating nkutils-git-version.h with a custom command.
[2/3] Running all tests.
1/8 libnkutils token module tests           OK       0.02 s 
2/8 libnkutils gtk-settings module tests    OK       0.02 s 
3/8 libnkutils xdg-de module tests          OK       0.08 s 
4/8 libnkutils xdg-theme module tests       FAIL     0.09 s (exit status 1)
5/8 libnkutils enum module tests            OK       0.03 s 
6/8 libnkutils colour module tests          OK       0.01 s 
7/8 libnkutils uuid module tests            OK       0.01 s 
8/8 libnkutils bindings module tests        OK       0.37 s 

Ok:                    7
Expected Fail:         0
Fail:                  1
Unexpected Pass:       0
Skipped:               0
Timeout:               0


The output from the failed tests:

4/8 libnkutils xdg-theme module tests       FAIL     0.09 s (exit status 1)

--- command ---
/tmp/libnkutils/build/nk-xdg-theme.test
--- stdout ---
/nkutils/xdg-theme/icon/Adwaita/symbolic/found: OK
/nkutils/xdg-theme/icon/Adwaita/symbolic/not-scalable: FAIL
/nkutils/xdg-theme/icon/Adwaita/symbolic/found-no-symbolic: SKIP
/nkutils/xdg-theme/icon/Adwaita/theme-found/second-choice: SKIP
/nkutils/xdg-theme/icon/Adwaita/theme-found/fallback: OK
/nkutils/xdg-theme/icon/Adwaita/context/exist-no-match: OK
/nkutils/xdg-theme/icon/Adwaita/context/exist-match/1: OK
/nkutils/xdg-theme/icon/Adwaita/context/exist-match/2: OK
/nkutils/xdg-theme/icon/Adwaita/size/best-distance: SKIP
/nkutils/xdg-theme/icon/Adwaita/size/biggest/fixed: FAIL
/nkutils/xdg-theme/icon/Adwaita/size/biggest/svg: OK
/nkutils/xdg-theme/icon/gnome/symbolic/found: OK
/nkutils/xdg-theme/icon/gnome/symbolic/not-scalable: OK
/nkutils/xdg-theme/icon/gnome/symbolic/found-no-symbolic: OK
/nkutils/xdg-theme/icon/gnome/theme-found/fallback: OK
/nkutils/xdg-theme/icon/gnome/context/exist-no-match: OK
/nkutils/xdg-theme/icon/gnome/context/exist-match/1: OK
/nkutils/xdg-theme/icon/gnome/context/exist-match/2: OK
/nkutils/xdg-theme/icon/gnome/size/best-distance: OK
/nkutils/xdg-theme/icon/gnome/size/biggest/fixed: SKIP
/nkutils/xdg-theme/icon/gnome/size/biggest/svg: OK
/nkutils/xdg-theme/icon/no-theme/not-found: OK
/nkutils/xdg-theme/icon/no-theme/threshold/found/1: OK
/nkutils/xdg-theme/icon/no-theme/threshold/found/2: SKIP
/nkutils/xdg-theme/icon/no-theme/size/fallback/hicolor/1: SKIP
/nkutils/xdg-theme/icon/no-theme/size/fallback/pixmaps/1: OK
/nkutils/xdg-theme/icon/no-theme/size/fallback/pixmaps/2: SKIP
/nkutils/xdg-theme/icon/wrong-theme/not-found: OK
/nkutils/xdg-theme/icon/theme/recursive: OK
/nkutils/xdg-theme/sound/found/variant: OK
/nkutils/xdg-theme/sound/fallback/variant: OK
/nkutils/xdg-theme/sound/fallback/freedesktop: OK
/nkutils/xdg-theme/sound/fallback/no-index: SKIP
--- stderr ---
**
ERROR:../tests/xdg-theme.c:502:_nk_uuid_tests_func: assertion failed (file == data->result): ("/usr/share/icons/Adwaita/48x48/legacy/zoom-in.png" == "/usr/share/icons/Adwaita/48x48/actions/zoom-in-symbolic.symbolic.png")
**
ERROR:../tests/xdg-theme.c:502:_nk_uuid_tests_func: assertion failed (file == data->result): ("/usr/share/icons/Adwaita/256x256/legacy/edit-find.png" == "/usr/share/icons/Adwaita/96x96/actions/edit-find-symbolic.symbolic.png")
-------

Full log written to /tmp/libnkutils/build/meson-logs/testlog.txt
FAILED: meson-test 
/usr/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.

format-string tests fail with glib 2.73.1 or later

glib commit 7074122 changed date-time format string padding, including in the default format string, to use U+2007 FIGURE SPACE for padding instead of normal spaces.

This causes the format-string tests, specifically /nkutils/name/prettify/time/default to fail as per this testlog excerpt...

ERROR:../rofi/subprojects/libnkutils/tests/format-string.c:1020:_nk_format_string_tests_func: assertion failed (result == dat
a->result): ("Thu Mar \342\200\2071 13:14:08 2018" == "Thu Mar  1 13:14:08 2018")

...as the tests are still expecting an ordinary space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.