st-desktopentry-0.8.5.diff 1.8 KB

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