feat: ignore items which start with underscore
This commit is contained in:
@@ -21,8 +21,8 @@ case $ACTION in
|
|||||||
esac;;
|
esac;;
|
||||||
icon)
|
icon)
|
||||||
case $ITEM in
|
case $ITEM in
|
||||||
"") cat Dyn-icon.png;; # Main menu icon
|
"") cat _icons/draw.png;; # Main menu icon
|
||||||
"Item 1") cat Dyn-icon.png;;
|
"Item 1") cat _icons/draw.png;; # relative to root scripts dir
|
||||||
*Status) status green;;
|
*Status) status green;;
|
||||||
esac;;
|
esac;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
@@ -248,7 +248,9 @@ func listDir(_ path: String) -> [Entry] {
|
|||||||
}
|
}
|
||||||
// else: static menu
|
// else: static menu
|
||||||
for url in (try? FileManager.default.contentsOfDirectory(at: target, includingPropertiesForKeys: [.isDirectoryKey, .isExecutableKey])) ?? [] {
|
for url in (try? FileManager.default.contentsOfDirectory(at: target, includingPropertiesForKeys: [.isDirectoryKey, .isExecutableKey])) ?? [] {
|
||||||
if url.hasDirectoryPath || FileManager.default.isExecutableFile(atPath: url.path) {
|
if url.hasDirectoryPath || FileManager.default.isExecutableFile(atPath: url.path),
|
||||||
|
!url.lastPathComponent.hasPrefix("_")
|
||||||
|
{
|
||||||
rv.append(Entry(url))
|
rv.append(Entry(url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user