diff --git a/src/xdgmenumaker b/src/xdgmenumaker index 869915e..8060a21 100755 --- a/src/xdgmenumaker +++ b/src/xdgmenumaker @@ -28,6 +28,7 @@ submenu = True pekwmdynamic = False twmtitles = False max_icon_size = False +icontheme = 'hicolor' # the following line gets changed by the Makefile. If it is set to # 'not_set' it looks in the currect directory tree for the .directory @@ -163,6 +164,7 @@ def main(argv): global pekwmdynamic global twmtitles global max_icon_size + global icontheme try: opts, args = getopt.getopt(argv, "hins:f:", ["help", "icons", "no-submenu", @@ -171,7 +173,8 @@ def main(argv): "max-icon-size", "no-svg", "size=", - "format="]) + "format=", + "icon-theme="]) except getopt.GetoptError: usage() sys.exit(2) @@ -211,6 +214,8 @@ def main(argv): nosvg = True elif opt in ("-f", "--format"): desktop = arg + elif opt == "--icon-theme": + icontheme = arg if not desktop: usage() sys.exit('ERROR: You must specify the output format with -f') @@ -257,6 +262,7 @@ def usage(): print(' --max-icon-size restrict the icon sizes to the specified size') print(' --pekwm-dynamic generate dynamic menus for pekwm') print(' --twm-titles show menu titles in twm menus') + print(' --icon-theme XDG icon theme to lookup icons in (default: hicolor)') print(' -h, --help show this help message') print(' You have to specify the output format using the -f switch.') print() @@ -292,7 +298,7 @@ def icon_max_size(icon): def icon_full_path(icon): args = { 'size': iconsize, - 'theme': 'hicolor' + 'theme': icontheme } lookup_svg = True if not desktop == "jwm" or nosvg: