diff options
author | lvgx <l@vgx.fr> | 2020-03-31 22:59:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-01 02:29:21 +0530 |
commit | 6e6d3cba0ddacc30a52409ccd0c4a51e63b48136 (patch) | |
tree | b12d47f1cabccbcf01faa65e07497594a9161cd2 | |
parent | 47ec05565120a9637ec6d94fd1889b82d9fd93a0 (diff) | |
download | nnn-6e6d3cba0ddacc30a52409ccd0c4a51e63b48136.tar.gz |
Add .desktop file for XDG compatible DEs (#501)
Install with `make install-desktop`
It now appears in application menus, search, etc. in XDG compatible
desktop environments (like GNOME, KDE, ...).
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | misc/desktop/nnn.desktop | 10 |
2 files changed, 20 insertions, 1 deletions
@@ -2,6 +2,7 @@ VERSION = $(shell grep -m1 VERSION $(SRC) | cut -f 2 -d'"') PREFIX ?= /usr/local MANPREFIX ?= $(PREFIX)/share/man +DESKTOPPREFIX ?= $(PREFIX)/share/applications STRIP ?= strip PKG_CONFIG ?= pkg-config INSTALL ?= install @@ -81,6 +82,7 @@ DISTFILES = src nnn.1 Makefile README.md LICENSE SRC = src/nnn.c HEADERS = src/nnn.h BIN = nnn +DESKTOPFILE = misc/desktop/nnn.desktop all: $(BIN) @@ -92,6 +94,13 @@ debug: $(BIN) norl: $(BIN) noloc: $(BIN) +install-desktop: $(DESKTOPFILE) + $(INSTALL) -m 0755 -d $(DESTDIR)$(DESKTOPPREFIX) + $(INSTALL) -m 0644 $(DESKTOPFILE) $(DESTDIR)$(DESKTOPPREFIX) + +uninstall-desktop: + $(RM) $(DESTDIR)$(DESKTOPPREFIX)/$(DESKTOPFILE) + install: all $(INSTALL) -m 0755 -d $(DESTDIR)$(PREFIX)/bin $(INSTALL) -m 0755 $(BIN) $(DESTDIR)$(PREFIX)/bin @@ -135,4 +144,4 @@ clean: skip: ; -.PHONY: all install uninstall strip static dist sign upload-local clean +.PHONY: all install uninstall strip static dist sign upload-local clean install-desktop uninstall-desktop diff --git a/misc/desktop/nnn.desktop b/misc/desktop/nnn.desktop new file mode 100644 index 0000000..48cb0d5 --- /dev/null +++ b/misc/desktop/nnn.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=nnn +Comment=Terminal file manager +Exec=nnn +Terminal=true +Icon=utilities-terminal +MimeType=inode/directory +Categories=System;FileTools;FileManager;ConsoleOnly +Keywords=File;Manager;Management;Explorer;Launcher |