diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..028eb16 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +INSTALL = /bin/install -c +DESTDIR = +PREFIX = /usr/local +BINDIR = /bin +CSSDIR = /share/feedr/css +XSLDIR = /share/feedr/xsl + +all: install + +install: + mkdir -p $(DESTDIR)$(CSSDIR) + mkdir -p $(DESTDIR)$(XSLDIR) + $(INSTALL) -m644 css/* $(DESTDIR)$(PREFIX)$(CSSDIR)/ + $(INSTALL) -m644 xsl/* $(DESTDIR)$(PREFIX)$(XSLDIR)/ + $(INSTALL) -m644 LICENSE $(DESTDIR)$(PREFIX)/share/licenses/feedr/ + $(INSTALL) -m644 README.md $(DESTDIR)$(PREFIX)/share/doc/feedr/ + $(INSTALL) -m755 feedr.desktop $(DESTDIR)$(PREFIX)/share/applications/feedr.desktop + $(INSTALL) -m755 feedr.sh $(DESTDIR)$(PREFIX)$(BINDIR)/feedr diff --git a/README.md b/README.md index 03e57ae..8ce6bca 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,14 @@ files directly from your desktop. ## Functionality -With a click, Feedr will open and render given XML based syndication files of -type Atom Syndication Format, RDF, and RSS. +Feedr will open and render given XML based syndication files of type Atom +Syndication Format, RDF, and RSS, upon a click on a file. + +## Installation + +``` +make PREFIX=/usr/local install +``` ## Customization diff --git a/feedr.sh b/feedr.sh index db8aac4..ff550a9 100644 --- a/feedr.sh +++ b/feedr.sh @@ -6,12 +6,6 @@ if [ $# -ne 1 ]; then exit 1 fi -function browser() { - local URL="$1"; - xdg-open $URL || sensible-browser $URL || x-www-browser $URL || gnome-open $URL; -} - - # Get the XML file and stylesheet file from the arguments XML_FILE="$1" XML_FILENAME=$(basename $XML_FILE) @@ -52,11 +46,18 @@ fi export WEBKIT_DISABLE_DMABUF_RENDERER=1 +for browser in $BROWSER falkon otter-browser qupzilla konqueror palemoon badwolf qutebrowser opera opera-beta opera-developer vivaldi vivaldi-beta vivaldi-snapshot chromium chrome luakit midori epiphany lynx w3m elinks vimb surf iceweasel waterfox firefox-aurora firefox; do + if command -v $browser > /dev/null 2>&1; then + exec $browser "$XML_FILE_TMP" + fi +done + + #badwolf "$XML_FILE_TMP" #chrome --new-window "$XML_FILE_TMP" #falkon "$XML_FILE_TMP" --new-window #firefox --new-window "$XML_FILE_TMP" #luakit "$XML_FILE_TMP" -otter-browser "$XML_FILE_TMP" -qutebrowser "$XML_FILE_TMP" +#otter-browser "$XML_FILE_TMP" +#qutebrowser "$XML_FILE_TMP" #xdg-open "$XML_FILE_TMP"