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