sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

surf-xdg-2.0.diff (4683B)


      1 From 0f88df661a00f4b2ea5b0547d23ac07f2f95d12f Mon Sep 17 00:00:00 2001
      2 From: Aidan Hall <aidan.hall@outlook.com>
      3 Date: Mon, 22 Feb 2021 17:21:59 +0000
      4 Subject: [PATCH 1/3] Added xdg icon and menu entries.
      5 
      6 ---
      7  Makefile                     |  8 ++++++++
      8  suckless-surf-open.desktop   | 13 +++++++++++++
      9  suckless-surf-open.directory |  4 ++++
     10  suckless-surf.desktop        | 12 ++++++++++++
     11  suckless-surf.directory      |  4 ++++
     12  5 files changed, 41 insertions(+)
     13  create mode 100644 suckless-surf-open.desktop
     14  create mode 100644 suckless-surf-open.directory
     15  create mode 100644 suckless-surf.desktop
     16  create mode 100644 suckless-surf.directory
     17 
     18 diff --git a/Makefile b/Makefile
     19 index e5d4172..168d2df 100644
     20 --- a/Makefile
     21 +++ b/Makefile
     22 @@ -64,6 +64,11 @@ install: all
     23  	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
     24  	sed "s/VERSION/$(VERSION)/g" < surf.1 > $(DESTDIR)$(MANPREFIX)/man1/surf.1
     25  	chmod 644 $(DESTDIR)$(MANPREFIX)/man1/surf.1
     26 +	cp surf.png suckless-surf.png
     27 +	xdg-icon-resource install --size 128 suckless-surf.png
     28 +	rm suckless-surf.png
     29 +	xdg-desktop-menu install ./suckless-surf.directory ./suckless-surf.desktop
     30 +	xdg-desktop-menu install ./suckless-surf-open.directory ./suckless-surf-open.desktop
     31  
     32  uninstall:
     33  	rm -f $(DESTDIR)$(PREFIX)/bin/surf
     34 @@ -72,5 +77,8 @@ uninstall:
     35  	    rm -f $(DESTDIR)$(LIBDIR)/$$wlib; \
     36  	done
     37  	- rmdir $(DESTDIR)$(LIBDIR)
     38 +	xdg-desktop-menu uninstall suckless-surf.directory suckless-surf.desktop
     39 +	xdg-desktop-menu uninstall suckless-surf-open.directory suckless-surf-open.desktop
     40 +	xdg-icon-resource uninstall --size 128 suckless-surf.png
     41  
     42  .PHONY: all options distclean clean dist install uninstall
     43 diff --git a/suckless-surf-open.desktop b/suckless-surf-open.desktop
     44 new file mode 100644
     45 index 0000000..f8ca41f
     46 --- /dev/null
     47 +++ b/suckless-surf-open.desktop
     48 @@ -0,0 +1,13 @@
     49 +[Desktop Entry]
     50 +Version=2.0
     51 +Name=surf-open
     52 +Icon=suckless-surf
     53 +GenericName=Web Browser
     54 +Comment=A simple web browser based on WebKit2/GTK+, with tabbed.
     55 +Keywords=Internet;WWW;Browser;Web;Explorer
     56 +Exec=/usr/local/bin/surf-open %u
     57 +Terminal=false
     58 +Type=Application
     59 +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
     60 +Categories=Network;WebBrowser;
     61 +
     62 diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
     63 new file mode 100644
     64 index 0000000..e7b298e
     65 --- /dev/null
     66 +++ b/suckless-surf-open.directory
     67 @@ -0,0 +1,4 @@
     68 +[Desktop Entry]
     69 +Name=surf
     70 +Icon=surf
     71 +Type=Directory
     72 diff --git a/suckless-surf.desktop b/suckless-surf.desktop
     73 new file mode 100644
     74 index 0000000..6ba56b6
     75 --- /dev/null
     76 +++ b/suckless-surf.desktop
     77 @@ -0,0 +1,12 @@
     78 +[Desktop Entry]
     79 +Version=2.0
     80 +Name=surf
     81 +Icon=suckless-surf
     82 +GenericName=Web Browser
     83 +Comment=A simple web browser based on WebKit2/GTK+.
     84 +Keywords=Internet;WWW;Browser;Web;Explorer
     85 +Exec=/usr/local/bin/surf %u
     86 +Terminal=false
     87 +Type=Application
     88 +MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;
     89 +Categories=Network;WebBrowser;
     90 diff --git a/suckless-surf.directory b/suckless-surf.directory
     91 new file mode 100644
     92 index 0000000..e7b298e
     93 --- /dev/null
     94 +++ b/suckless-surf.directory
     95 @@ -0,0 +1,4 @@
     96 +[Desktop Entry]
     97 +Name=surf
     98 +Icon=surf
     99 +Type=Directory
    100 -- 
    101 2.30.0
    102 
    103 
    104 From 1068a3506626c4900681154165391f4527a47864 Mon Sep 17 00:00:00 2001
    105 From: Aidan Hall <aidan.hall@outlook.com>
    106 Date: Mon, 22 Feb 2021 17:25:31 +0000
    107 Subject: [PATCH 2/3] Fixed icons for directory files.
    108 
    109 ---
    110  suckless-surf-open.directory | 2 +-
    111  suckless-surf.directory      | 2 +-
    112  2 files changed, 2 insertions(+), 2 deletions(-)
    113 
    114 diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
    115 index e7b298e..53f0fbe 100644
    116 --- a/suckless-surf-open.directory
    117 +++ b/suckless-surf-open.directory
    118 @@ -1,4 +1,4 @@
    119  [Desktop Entry]
    120  Name=surf
    121 -Icon=surf
    122 +Icon=suckless-surf
    123  Type=Directory
    124 diff --git a/suckless-surf.directory b/suckless-surf.directory
    125 index e7b298e..53f0fbe 100644
    126 --- a/suckless-surf.directory
    127 +++ b/suckless-surf.directory
    128 @@ -1,4 +1,4 @@
    129  [Desktop Entry]
    130  Name=surf
    131 -Icon=surf
    132 +Icon=suckless-surf
    133  Type=Directory
    134 -- 
    135 2.30.0
    136 
    137 
    138 From 003e132c154a7aa985a3bb353c5f2ab70cbcb43f Mon Sep 17 00:00:00 2001
    139 From: Aidan Hall <aidan.hall@outlook.com>
    140 Date: Mon, 22 Feb 2021 17:27:30 +0000
    141 Subject: [PATCH 3/3] Fixed name for suckless-surf-open.directory.
    142 
    143 ---
    144  suckless-surf-open.directory | 2 +-
    145  1 file changed, 1 insertion(+), 1 deletion(-)
    146 
    147 diff --git a/suckless-surf-open.directory b/suckless-surf-open.directory
    148 index 53f0fbe..72ab23e 100644
    149 --- a/suckless-surf-open.directory
    150 +++ b/suckless-surf-open.directory
    151 @@ -1,4 +1,4 @@
    152  [Desktop Entry]
    153 -Name=surf
    154 +Name=surf-open
    155  Icon=suckless-surf
    156  Type=Directory
    157 -- 
    158 2.30.0
    159