file-browser: more icons

This commit is contained in:
K. Lange 2018-11-21 21:22:27 +09:00
parent 831490a759
commit f9ecde5548
4 changed files with 10 additions and 6 deletions

View File

@ -403,6 +403,16 @@ static void load_directory(const char * path) {
} else if (has_extension(f, ".bmp")) {
sprintf(f->icon, "image");
sprintf(f->launcher, "exec imgviewer");
} else if (has_extension(f, ".tgz") || has_extension(f, ".tar") || has_extension(f, ".tar.gz")) {
/* Or dozens of others... */
sprintf(f->icon, "package");
/* TODO: Archive tool? Extract locally? */
} else if (has_extension(f, ".sh")) {
sprintf(f->icon, "sh");
if (statbuf.st_mode & 0111) {
/* Make executable */
sprintf(f->launcher, "SELF");
}
} else if (statbuf.st_mode & 0111) {
/* Executable files - use their name for their icon, and launch themselves. */
sprintf(f->icon, "%s", f->name);

View File

@ -1 +0,0 @@
utilities-terminal,terminal,Terminal

View File

@ -1,5 +0,0 @@
utilities-terminal,terminal,Terminal
drawlines,drawlines,Draw Lines
julia,julia,Julia Fractals
plasma,plasma,Plasma
star,about,About ToaruOS

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB