fns-find-icon(1)
================
:doctype: manpage

NAME
----

fns-find-icon - command line tool to get the iconpath of an application 
or the icon of an application


SYNOPSIS
--------

fns-find-icon [-h|--help] [--version] [-n NAME] [-i W_ID] [-p EXTEND_PATH
] [-s ICON_SIZE] [--svg] [-c CATEGORY] [-t THEME] [--notdesk]



DESCRIPTION
-----------
*fns-find-icon* is used to find the correct icon path listed in the desktop 
file of an application in /usr/share/applications/ or the icon path of an 
application depending on the used theme in fvwm-menu-desktop-config.fpl. 
Default theme is 'gnome'.


OPTIONS
-------
These command line options are recognized by *fns-find-icon*:

*-n* 'NAME'::
+
Find the appropriate icon path of an application listed in its desktop file.
Or if *--notdesk* is given find the icon in /usr/share/icons/.
+
Example for .desktop file search:
+
------
$ fns-find-icon -n meld
------
+
Desktop file of meld:
+
------
[Desktop Entry]
Encoding=UTF-8
Name=Meld
GenericName=Diff Viewer
X-GNOME-FullName=Meld Diff Viewer
Comment=Compare and merge your files
Exec=meld
Terminal=false
Type=Application
Icon=meld
StartupNotify=true
Categories=GNOME;Application;Development;
------
+
First *fns-find-icon* tries to find the full path. If only the name is given
in the .desktop file it searches for the used theme in $FVWM_USERDIR/.FvwmForm-Desktop-Config. 
If $FVWM_USERDIR/.FvwmForm-Desktop-Config doesn't exist it uses the default theme 'gnome'. 
If the icon not found it searches in $FVWM_USERDIR/.menu lastly. 
If the search was successfully it converts the icon to the needed size 
(if the icon found in $FVWM_USERDIR/.menu only).
+
Example for normal icon search:
+
------
$ fns-find-icon -n 'system-log-out' -s 24 -c 'actions' --notdesk
------
+
Here *fns-find-icon* tries to find the icon "system-log-out" with a 
size of "24x24" in category "actions". The *--notdesk* tolds *fns-find-icon* 
not to search in desktop files directories but in $HOME/.icons and /usr/share/icons/. 
+
First it gets the used theme, then it searches in the category with the 
stated size. If it find the icon it returns the full path. If not returns 
nothing.

*-i* 'W_ID'::
+
It is possible to search for an icon for a specific window with its window id. 
*fns-find-icon* uses for this 'xprop'. It asks 'xprop' over 'WM_CLASS' for the 
used name and then makes the same steps as in *-n* 'NAME' described.

*-p* 'EXTEND_PATH'::
+
Sometimes it is needed to told *fns-find-icon* to search in other paths, too. 
The defaults are:
+
------
$HOME/.icons/[theme]/[icon-size]/[category]/
$HOME/.icons/[theme]/[category]/[icon-size]/
/usr/share/icons/[theme]/[icon-size]/[category]/
/usr/share/icons/[theme]/[category]/[icon-size]/
/usr/share/icons/hicolor/[icon-size]/[category]/
/usr/share/pixmaps/
------
+
You can extend the defaults with this option. Different paths are sperated 
with a ":".

*-s* 'ICON_SIZE'::
+
The 'ICON_SIZE' defines the the icon size to search for. Default is '48'.

*--svg*::
+
Prefer svg instead of bitmaps and if found add :<size>x<size> at the 
end of the path. Else bitmap path is returned.

*-c* 'CATEGORY'::
+
'CATEGORY' defines the category in the theme to search for an icon. 
Default is 'apps'.

*-t* 'THEME'::
+
'THEME' defines the icon theme name. Default is the theme used in 
fvwm-menu-desktop-config/fns-menu-config. To search trough all themes use 'all'.
+
[NOTE]
===============================
'all' returns the first icon ever which matches the made choice!
===============================

*--notdesk*::
+
Search not for an icon found in a .desktop file but for a specific one.

*--version*::
+
Shows program's version number and exit.

*-h | --help*::
+
Shows short help and exit.

AUTHOR
------

(C) 2013 - 2016 Thomas Funk <t.funk@web.de>


