瀏覽代碼

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, ...).
master
lvgx GitHub 4 年之前
父節點
當前提交
6e6d3cba0d
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 20 行新增1 行删除
  1. +10
    -1
      Makefile
  2. +10
    -0
      misc/desktop/nnn.desktop

+ 10
- 1
Makefile 查看文件

@@ -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

+ 10
- 0
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

Loading…
取消
儲存