missingIconsFinder: also scan share/pixmaps
This commit is contained in:
@@ -5,25 +5,23 @@ import re
|
||||
import subprocess
|
||||
from collections import defaultdict
|
||||
|
||||
# nix-locate -r "share/icons/hicolor/[^/]+/apps/.*\.*" --all | awk '{print substr($4, length($4) - 3 + 1)}' | sort -u
|
||||
# nix-locate -r "share/(icons/hicolor/[^/]+/apps|pixmaps)/.*\.[^/]+" --all | awk '{print substr($4, length($4) - 3 + 1)}' | sort -u
|
||||
ICON_SUFFIXES = [
|
||||
'bmp',
|
||||
'cns',
|
||||
'eep',
|
||||
'gif',
|
||||
'icns'
|
||||
'ico',
|
||||
'jpeg',
|
||||
'jpg',
|
||||
'nse',
|
||||
'png',
|
||||
'svg',
|
||||
'vgz',
|
||||
'svgz',
|
||||
'xpm',
|
||||
]
|
||||
|
||||
ICON_SUFFIXES += [x.upper() for x in ICON_SUFFIXES]
|
||||
|
||||
LOCATE_REGEX = f'share/(applications/[^/]+\\.desktop|icons/hicolor/[^/]+/apps/[^/]+\\.({'|'.join(ICON_SUFFIXES)}))'
|
||||
LOCATE_REGEX = f'share/(applications/[^/]+\\.desktop|pixmaps/[^/]+\\.({'|'.join(ICON_SUFFIXES)})|icons/hicolor/[^/]+/apps/[^/]+\\.({'|'.join(ICON_SUFFIXES)}))'
|
||||
|
||||
result = subprocess.run(['nix-locate', '-r', LOCATE_REGEX, '--all'], capture_output=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user