st-desktopentry-0.8.5.diff - sites - public wiki contents of suckless.org
 (HTM) git clone git://git.suckless.org/sites
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       st-desktopentry-0.8.5.diff (1814B)
       ---
            1 From af28f9df9b0194311c25d60a22d1ecd98bfad2e7 Mon Sep 17 00:00:00 2001
            2 From: aleks <aleks.stier@icloud.com>
            3 Date: Tue, 31 May 2022 00:33:38 +0200
            4 Subject: [PATCH] Create a desktop-entry for st
            5 
            6 Enables to find st in a graphical menu and to display it with a nice
            7 icon.
            8 
            9 If some applications still are not displaying an icon for st try the patch
           10 [netwmicon](../netwmicon/). Programs like tint2 and alttab rely on a hardcoded
           11 icon which has to be stored by st in the \_NET\_WM\_ICON window-property.
           12 ---
           13  Makefile   |  3 +++
           14  config.mk  |  1 +
           15  st.desktop | 12 ++++++++++++
           16  3 files changed, 16 insertions(+)
           17  create mode 100644 st.desktop
           18 
           19 diff --git a/Makefile b/Makefile
           20 index 470ac86..2121877 100644
           21 --- a/Makefile
           22 +++ b/Makefile
           23 @@ -49,9 +49,12 @@ install: st
           24          chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
           25          tic -sx st.info
           26          @echo Please see the README file regarding the terminfo entry of st.
           27 +        mkdir -p $(DESTDIR)$(APPPREFIX)
           28 +        cp -f st.desktop $(DESTDIR)$(APPPREFIX)
           29  
           30  uninstall:
           31          rm -f $(DESTDIR)$(PREFIX)/bin/st
           32 +        rm -f $(DESTDIR)$(APPPREFIX)/st.desktop
           33          rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
           34  
           35  .PHONY: all options clean dist install uninstall
           36 diff --git a/config.mk b/config.mk
           37 index 4c4c5d5..b79c517 100644
           38 --- a/config.mk
           39 +++ b/config.mk
           40 @@ -5,6 +5,7 @@ VERSION = 0.8.5
           41  
           42  # paths
           43  PREFIX = /usr/local
           44 +APPPREFIX = $(PREFIX)/share/applications
           45  MANPREFIX = $(PREFIX)/share/man
           46  
           47  X11INC = /usr/X11R6/include
           48 diff --git a/st.desktop b/st.desktop
           49 new file mode 100644
           50 index 0000000..2d2b76f
           51 --- /dev/null
           52 +++ b/st.desktop
           53 @@ -0,0 +1,12 @@
           54 +[Desktop Entry]
           55 +Type=Application
           56 +Exec=st
           57 +TryExec=st
           58 +Icon=utilities-terminal
           59 +Terminal=false
           60 +Categories=System;TerminalEmulator;
           61 +
           62 +Name=st
           63 +GenericName=Terminal
           64 +Comment=st is a simple terminal implementation for X
           65 +StartupWMClass=st-256color
           66 -- 
           67 2.36.1
           68