aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar lvgx <l@vgx.fr>2020-05-01 17:58:07 +0200
committerGravatar GitHub <noreply@github.com>2020-05-01 21:28:07 +0530
commite68d0db9496deb9414b4bd5f05494109d9964f23 (patch)
treeeab5cb4868d21ac76c23b4a862ede7837cd7bee1
parent1a78ad4afffed0970891d784348b50ac14ff68f7 (diff)
downloadnnn-e68d0db9496deb9414b4bd5f05494109d9964f23.tar.gz
Install logo to desktop icons (#542)
This shows the "n³" logo as icon in application menus, when desktop file is installed (using `install-desktop` make target).
-rw-r--r--Makefile9
-rw-r--r--misc/desktop/nnn.desktop2
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6a4aaa8..3c0e08a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ VERSION = $(shell grep -m1 VERSION $(SRC) | cut -f 2 -d'"')
PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
DESKTOPPREFIX ?= $(PREFIX)/share/applications
+DESKTOPICONPREFIX ?= $(PREFIX)/share/icons/hicolor
STRIP ?= strip
PKG_CONFIG ?= pkg-config
INSTALL ?= install
@@ -83,6 +84,8 @@ SRC = src/nnn.c
HEADERS = src/nnn.h
BIN = nnn
DESKTOPFILE = misc/desktop/nnn.desktop
+LOGOSVG = misc/logo/logo.svg
+LOGO64X64 = misc/logo/logo-64x64.png
all: $(BIN)
@@ -97,9 +100,15 @@ noloc: $(BIN)
install-desktop: $(DESKTOPFILE)
$(INSTALL) -m 0755 -d $(DESTDIR)$(DESKTOPPREFIX)
$(INSTALL) -m 0644 $(DESKTOPFILE) $(DESTDIR)$(DESKTOPPREFIX)
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(DESKTOPICONPREFIX)/scalable/apps
+ $(INSTALL) -m 0644 $(LOGOSVG) $(DESTDIR)$(DESKTOPICONPREFIX)/scalable/apps/nnn.svg
+ $(INSTALL) -m 0755 -d $(DESTDIR)$(DESKTOPICONPREFIX)/64x64/apps
+ $(INSTALL) -m 0644 $(LOGO64X64) $(DESTDIR)$(DESKTOPICONPREFIX)/64x64/apps/nnn.png
uninstall-desktop:
$(RM) $(DESTDIR)$(DESKTOPPREFIX)/$(DESKTOPFILE)
+ $(RM) $(DESTDIR)$(DESKTOPICONPREFIX)/scalable/apps/nnn.svg
+ $(RM) $(DESTDIR)$(DESKTOPICONPREFIX)/64x64/apps/nnn.png
install: all
$(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin
diff --git a/misc/desktop/nnn.desktop b/misc/desktop/nnn.desktop
index 48cb0d5..14f8ece 100644
--- a/misc/desktop/nnn.desktop
+++ b/misc/desktop/nnn.desktop
@@ -4,7 +4,7 @@ Name=nnn
Comment=Terminal file manager
Exec=nnn
Terminal=true
-Icon=utilities-terminal
+Icon=nnn
MimeType=inode/directory
Categories=System;FileTools;FileManager;ConsoleOnly
Keywords=File;Manager;Management;Explorer;Launcher