From f1758c25358a54bfbc354185829292c011620125 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 12 Aug 2021 21:40:27 +0200 Subject: Apply desktopentry patch --- Makefile | 3 +++ Xresources | 0 config.h | 36 ++++++++++++++++++++++++++++ patches/st-desktopentry-0.8.4.diff | 48 ++++++++++++++++++++++++++++++++++++++ st.desktop | 8 +++++++ 5 files changed, 95 insertions(+) create mode 100644 Xresources create mode 100644 patches/st-desktopentry-0.8.4.diff create mode 100644 st.desktop diff --git a/Makefile b/Makefile index f5b647f..ec2781d 100644 --- a/Makefile +++ b/Makefile @@ -46,9 +46,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)$(PREFIX)/share/applications + cp -f st.desktop $(DESTDIR)$(PREFIX)/share/applications uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/st rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 + rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop .PHONY: all options clean dist install uninstall diff --git a/Xresources b/Xresources new file mode 100644 index 0000000..e69de29 diff --git a/config.h b/config.h index 48169aa..bfd6cb9 100644 --- a/config.h +++ b/config.h @@ -168,6 +168,42 @@ static unsigned int defaultattr = 11; */ static uint forcemousemod = ShiftMask; +/* + * Xresources preferences to load at startup + */ +ResourcePref resources[] = { + { "font", STRING, &font }, + { "color0", STRING, &colorname[0] }, + { "color1", STRING, &colorname[1] }, + { "color2", STRING, &colorname[2] }, + { "color3", STRING, &colorname[3] }, + { "color4", STRING, &colorname[4] }, + { "color5", STRING, &colorname[5] }, + { "color6", STRING, &colorname[6] }, + { "color7", STRING, &colorname[7] }, + { "color8", STRING, &colorname[8] }, + { "color9", STRING, &colorname[9] }, + { "color10", STRING, &colorname[10] }, + { "color11", STRING, &colorname[11] }, + { "color12", STRING, &colorname[12] }, + { "color13", STRING, &colorname[13] }, + { "color14", STRING, &colorname[14] }, + { "color15", STRING, &colorname[15] }, + { "background", STRING, &colorname[256] }, + { "foreground", STRING, &colorname[257] }, + { "cursorColor", STRING, &colorname[258] }, + { "termname", STRING, &termname }, + { "shell", STRING, &shell }, + { "minlatency", INTEGER, &minlatency }, + { "maxlatency", INTEGER, &maxlatency }, + { "blinktimeout", INTEGER, &blinktimeout }, + { "bellvolume", INTEGER, &bellvolume }, + { "tabspaces", INTEGER, &tabspaces }, + { "borderpx", INTEGER, &borderpx }, + { "cwscale", FLOAT, &cwscale }, + { "chscale", FLOAT, &chscale }, +}; + /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. diff --git a/patches/st-desktopentry-0.8.4.diff b/patches/st-desktopentry-0.8.4.diff new file mode 100644 index 0000000..306e86e --- /dev/null +++ b/patches/st-desktopentry-0.8.4.diff @@ -0,0 +1,48 @@ +From b9ce8f6df1d2318d2aa8ec9668ec227cfe327e5c Mon Sep 17 00:00:00 2001 +From: aleks +Date: Wed, 27 May 2020 01:35:15 +0200 +Subject: [PATCH] Create a desktop-entry for st + +Creates a desktop-entry for st. This enables to find st in a graphical +menu and to display it with a nice icon. + +--- + Makefile | 3 +++ + st.desktop | 8 ++++++++ + 2 files changed, 11 insertions(+) + create mode 100644 st.desktop + +diff --git a/Makefile b/Makefile +index fd1321e..6e79a1c 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)$(PREFIX)/share/applications ++ cp -f st.desktop $(DESTDIR)$(PREFIX)/share/applications + + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/st + rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 ++ rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop + + .PHONY: all options clean dist install uninstall +diff --git a/st.desktop b/st.desktop +new file mode 100644 +index 0000000..e4e0714 +--- /dev/null ++++ b/st.desktop +@@ -0,0 +1,8 @@ ++[Desktop Entry] ++Name=st ++Comment=st is a simple terminal implementation for X ++Exec=st ++Icon=utilities-terminal ++Terminal=false ++Type=Application ++Categories=System;TerminalEmulator; +-- +2.31.0 + diff --git a/st.desktop b/st.desktop new file mode 100644 index 0000000..49029d8 --- /dev/null +++ b/st.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=st +Comment=st is a simple terminal implementation for X +Exec=st +Icon=utilities-terminal +Terminal=false +Type=Application +Categories=System;TerminalEmulator; -- cgit v1.2.3-70-g09d2