vincentaxhe has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: resolve current theme icon path
by marto (Cardinal) on Sep 01, 2024 at 12:09 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: resolve current theme icon path
by NERDVANA (Priest) on Sep 02, 2024 at 05:48 UTC
    what perl do with
    use FreeDesktop::Icons; my $iconlib = new FreeDesktop::Icons; $iconlib->theme('WhiteSur-red'); $iconlib->size('16'); my $imagefile = $iconlib->get('xfsm-shutdown'); print $imagefile;
    it's slow and inadequate

    That module was first uploaded to CPAN in May. The author probably published it as soon as it met his needs. If you ask nicely, maybe he could help add a feature to do what you need, too.

    gi.require_version('Gtk', '3.0') from gi.repository import Gtk
    If Python solves this with the Gtk 3 library, did you look at Perl's Gtk3 library?

    I just need to embrace python
    Did you want help from perl people, or just irritate us?

    Many perl module just fill up CPAN, and help little.
    This is true, and unfortunately it will never get better with the current design of CPAN where anyone can upload any module of any quality. One way to improve it is to find a module that does almost what you need, and politely send the author a request to add more features. You could even use Devel::NYTProf to find out why the module is slow, and send the author a patch to make it faster.
      I'm frustrated on perl pdf module once Re^6: use PDF::API2 to add pdf bookmark, perl should not fail me on resolve icon path. Gtk3::Image seems promising, I do some search and check on 'Gtk' and icon theme related and missed Gtk3. I love perl, he has the ability to enpower individual, I'm learning Raku too.
        perl should not fail me on resolve icon path

        You mean CPAN. Perl can do anything you want, if you write out the full program. You want someone else to solve the problem and post a complete module for you, for all tasks you can think of? There are many many things that Perl does not have a CPAN module for, and yes, Python has more modules to solve the latest problems because Python has more people.

        We at perlmonks use perl because we like the language, not because it has the most problems already solved in a module.

Re: resolve current theme icon path
by harangzsolt33 (Deacon) on Sep 02, 2024 at 03:38 UTC
    Can you give an example of what kind of path your program expects?

    On my computer, for example, the Windows system icons are stored mostly in C:\Windows\System32\Shell32.dll and also in C:\Windows\System32\moricons.dll and C:\Windows\Explorer.exe. But by modifying the Windows registry, you can change the system icons to a different theme. Unfortunately, Windows registry is kind of messy, and changing the icon theme on a system is a nightmare if you try to do it one by one. There are hundreds of registry entries that have to be changed. There is a program called Icon Tweaker and another one called Stardock IconPackager. The latter one is paid software. They both let you change the icon theme set of Windows with just one or two clicks.

    I'm not sure if this answer is what you're looking for.

    You didn't specify what operating system your question is related to. Are you talking about Linux icons or Windows icons or Apple MacBook icons or Android icons? You did not mention if you were referring to icons within a certain program. For example, you can change the icon set within Explorer in Windows. You can change the icon set within your web browser toolbar or the possibilities are endless. Your question is incomplete. It feels like you are expecting people to be able to read your mind and give you a precise answer just like Nebuchadnezzar in the Bible wanted the astrologers and wise men to tell him what his dream was.

      see my updated demo