feat: ignore items which start with underscore

This commit is contained in:
relikd
2026-02-07 12:25:08 +01:00
parent 284eb1aa5c
commit 6867488a4a
3 changed files with 5 additions and 3 deletions

View File

@@ -21,8 +21,8 @@ case $ACTION in
esac;;
icon)
case $ITEM in
"") cat Dyn-icon.png;; # Main menu icon
"Item 1") cat Dyn-icon.png;;
"") cat _icons/draw.png;; # Main menu icon
"Item 1") cat _icons/draw.png;; # relative to root scripts dir
*Status) status green;;
esac;;
*)

View File

Before

Width:  |  Height:  |  Size: 616 B

After

Width:  |  Height:  |  Size: 616 B

View File

@@ -248,7 +248,9 @@ func listDir(_ path: String) -> [Entry] {
}
// else: static menu
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))
}
}