[wiki] [sites] [surf][xdg] added xdg patch || Aidan Hall
commit f6321df80b8cf51ee83d3032070716d4fe71a781
Author: Aidan Hall <aidan.hall_AT_outlook.com>
Date: Mon Feb 22 17:44:45 2021 +0000
[surf][xdg] added xdg patch
diff --git a/surf.suckless.org/patches/xdg/index.md b/surf.suckless.org/patches/xdg/index.md
new file mode 100644
index 00000000..04c0a0e5
--- /dev/null
+++ b/surf.suckless.org/patches/xdg/index.md
_AT_@ -0,0 +1,18 @@
+XDG
+===
+
+Description
+-----------
+Adds xdg desktop entries for surf and surf-open.sh,
+and installs surf.png as the icon 'suckless-surf.png'.
+
+Note that surf-open.sh must be installed to '/usr/local/bin/surf-open'
+for the surf-open desktop entry to work.
+
+Download
+--------
+* [surf-xdg-2.0.diff](surf-xdg-2.0.diff)
+
+Author
+------
+* Aidan Hall <aidan.hall_AT_outlook.com>
diff --git a/surf.suckless.org/patches/xdg/surf-xdg-2.0.diff b/surf.suckless.org/patches/xdg/surf-xdg-2.0.diff
new file mode 100644
index 00000000..044c28bd
--- /dev/null
+++ b/surf.suckless.org/patches/xdg/surf-xdg-2.0.diff
_AT_@ -0,0 +1,159 @@
+From 0f88df661a00f4b2ea5b0547d23ac07f2f95d12f Mon Sep 17 00:00:00 2001
+From: Aidan Hall <aidan.hall_AT_outlook.com>
+Date: Mon, 22 Feb 2021 17:21:59 +0000
+Subject: [PATCH 1/3] Added xdg icon and menu entries.
+
+---
+ Makefile | 8 ++++++++
+ suckless-surf-open.desktop | 13 +++++++++++++
+ suckless-surf-open.directory | 4 ++++
+ suckless-surf.desktop | 12 ++++++++++++
+ suckless-surf.directory | 4 ++++
+ 5 files changed, 41 insertions(+)
+ create mode 100644 suckless-surf-open.desktop
+ create mode 100644 suckless-surf-open.directory
+ create mode 100644 suckless-surf.desktop
+ create mode 100644 suckless-surf.directory
+
+diff --git a/Makefile b/Makefile
+index e5d4172..168d2df 100644
+--- a/Makefile
++++ b/Makefile
+_AT_@ -64,6 +64,11 @@ install: all
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ sed "s/VERSION/$(VERSION)/g" < surf.1 > $(DESTDIR)$(MANPREFIX)/man1/surf.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/surf.1
++ cp surf.png suckless-surf.png
++ xdg-icon-resource install --size 128 suckless-surf.png
++ rm suckless-surf.png
++ xdg-desktop-menu install ./suckless-surf.directory ./suckless-surf.desktop
++ xdg-desktop-menu install ./suckless-surf-open.directory ./suckless-surf-open.desktop
+
+ uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/surf
+_AT_@ -72,5 +77,8 @@ uninstall:
+ rm -f $(DESTDIR)$(LIBDIR)/$$wlib; \
+ done
+ - rmdir $(DESTDIR)$(LIBDIR)
++ xdg-desktop-menu uninstall suckless-surf.directory suckless-surf.desktop
++ xdg-desktop-menu uninstall suckless-surf-open.directory suckless-surf-open.desktop
++ xdg-icon-resource uninstall --size 128 suckless-surf.png
+
+ .PHONY: all options distclean clean dist install uninstall
+diff --git a/suckless-surf-open.desktop b/suckless-surf-open.desktop
+new file mode 100644
+index 0000000..f8ca41f
+--- /dev/null
++++ b/suckless-surf-open.desktop
+_AT_@ -0,0 +1,13 @@
++[Desktop Entry]
++Version=2.0
++Name=surf-open
++Icon=suckless-surf
++GenericName=Web Browser
++Comment=A simple web browser based on WebKit2/GTK+, with tabbed.
++Keywords=Internet;WWW;Browser;Web;Explorer
++Exec=/usr/local/bin/surf-open %u
++Terminal=false
++Type=Application
++MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
++Categories=Network;WebBrowser;
++
+diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
+new file mode 100644
+index 0000000..e7b298e
+--- /dev/null
++++ b/suckless-surf-open.directory
+_AT_@ -0,0 +1,4 @@
++[Desktop Entry]
++Name=surf
++Icon=surf
++Type=Directory
+diff --git a/suckless-surf.desktop b/suckless-surf.desktop
+new file mode 100644
+index 0000000..6ba56b6
+--- /dev/null
++++ b/suckless-surf.desktop
+_AT_@ -0,0 +1,12 @@
++[Desktop Entry]
++Version=2.0
++Name=surf
++Icon=suckless-surf
++GenericName=Web Browser
++Comment=A simple web browser based on WebKit2/GTK+.
++Keywords=Internet;WWW;Browser;Web;Explorer
++Exec=/usr/local/bin/surf %u
++Terminal=false
++Type=Application
++MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
++Categories=Network;WebBrowser;
+diff --git a/suckless-surf.directory b/suckless-surf.directory
+new file mode 100644
+index 0000000..e7b298e
+--- /dev/null
++++ b/suckless-surf.directory
+_AT_@ -0,0 +1,4 @@
++[Desktop Entry]
++Name=surf
++Icon=surf
++Type=Directory
+--
+2.30.0
+
+
+From 1068a3506626c4900681154165391f4527a47864 Mon Sep 17 00:00:00 2001
+From: Aidan Hall <aidan.hall_AT_outlook.com>
+Date: Mon, 22 Feb 2021 17:25:31 +0000
+Subject: [PATCH 2/3] Fixed icons for directory files.
+
+---
+ suckless-surf-open.directory | 2 +-
+ suckless-surf.directory | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
+index e7b298e..53f0fbe 100644
+--- a/suckless-surf-open.directory
++++ b/suckless-surf-open.directory
+_AT_@ -1,4 +1,4 @@
+ [Desktop Entry]
+ Name=surf
+-Icon=surf
++Icon=suckless-surf
+ Type=Directory
+diff --git a/suckless-surf.directory b/suckless-surf.directory
+index e7b298e..53f0fbe 100644
+--- a/suckless-surf.directory
++++ b/suckless-surf.directory
+_AT_@ -1,4 +1,4 @@
+ [Desktop Entry]
+ Name=surf
+-Icon=surf
++Icon=suckless-surf
+ Type=Directory
+--
+2.30.0
+
+
+From 003e132c154a7aa985a3bb353c5f2ab70cbcb43f Mon Sep 17 00:00:00 2001
+From: Aidan Hall <aidan.hall_AT_outlook.com>
+Date: Mon, 22 Feb 2021 17:27:30 +0000
+Subject: [PATCH 3/3] Fixed name for suckless-surf-open.directory.
+
+---
+ suckless-surf-open.directory | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
+index 53f0fbe..72ab23e 100644
+--- a/suckless-surf-open.directory
++++ b/suckless-surf-open.directory
+_AT_@ -1,4 +1,4 @@
+ [Desktop Entry]
+-Name=surf
++Name=surf-open
+ Icon=suckless-surf
+ Type=Directory
+--
+2.30.0
+
Received on Mon Feb 22 2021 - 18:48:53 CET
This archive was generated by hypermail 2.3.0
: Mon Feb 22 2021 - 18:49:00 CET