Browse Source

xap/uzbl: Removed along with its dependencies.

slackware-14.2
Damien Goutte-Gattat 3 years ago
parent
commit
1ffe1784be
  1. 1
      l/dbus-python3/dbus-python-1.2.4.tar.gz.sha256
  2. 125
      l/dbus-python3/dbus-python3.SlackBuild
  3. 12
      l/dbus-python3/slack-desc
  4. 1
      l/pyasn1-modules/pyasn1-modules-0.0.8.tar.gz.sha256
  5. 102
      l/pyasn1-modules/pyasn1-modules.SlackBuild
  6. 12
      l/pyasn1-modules/slack-desc
  7. 1
      l/pyasn1/pyasn1-0.1.9.tar.gz.sha256
  8. 103
      l/pyasn1/pyasn1.SlackBuild
  9. 12
      l/pyasn1/slack-desc
  10. 1
      l/pynotify2/notify2-0.3.tar.gz.sha256
  11. 103
      l/pynotify2/pynotify2.SlackBuild
  12. 12
      l/pynotify2/slack-desc
  13. 2
      xap/uzbl/doinst.sh
  14. 12
      xap/uzbl/slack-desc
  15. 933
      xap/uzbl/uzbl-0.9.1-incenp-local.diff
  16. 1264
      xap/uzbl/uzbl-0.9.1-incenp.diff
  17. 133
      xap/uzbl/uzbl.SlackBuild

1
l/dbus-python3/dbus-python-1.2.4.tar.gz.sha256

@ -1 +0,0 @@
e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc dbus-python-1.2.4.tar.gz

125
l/dbus-python3/dbus-python3.SlackBuild

@ -1,125 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014,2016,2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest dbus-python sourcecode is available at:
# <http://dbus.freedesktop.org/releases/dbus-python/>.
#
# Depends: d/python3
# Source package infos
NAMESRC=${NAMESRC:-dbus-python}
VERSION=${VERSION:-1.2.4}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://dbus.freedesktop.org/releases/dbus-python/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-dbus-python3}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
PYTHON=/usr/bin/python3 \
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--docdir=/usr/doc/$NAME
make -j $JOBS
make install-strip DESTDIR=$PKG
# Remove files that do not depend on the Python version,
# and which are already provided by the dbus-python package
# for Python 2.7.
rm -rf $PKG/usr/doc $PKG/usr/lib$LIBDIRSUFFIX/pkgconfig $PKG/usr/include
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat > $PKG/install/slack-required <<EOF
python3
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

12
l/dbus-python3/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-----------------------------------------------------|
dbus-python3: dbus-python3 (Python3 bindings for D-Bus)
dbus-python3:
dbus-python3: This package includes Python3 bindings for the D-Bus message bus.
dbus-python3:
dbus-python3:
dbus-python3:
dbus-python3:
dbus-python3:
dbus-python3:
dbus-python3:
dbus-python3:

1
l/pyasn1-modules/pyasn1-modules-0.0.8.tar.gz.sha256

@ -1 +0,0 @@
10561934f1829bcc455c7ecdcdacdb4be5ffd3696f26f468eb6eb41e107f3837 pyasn1-modules-0.0.8.tar.gz

102
l/pyasn1-modules/pyasn1-modules.SlackBuild

@ -1,102 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014,2016,2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest pyasn1-modules sourcecode is available at:
# <http://pyasn1.sourceforge.net/>.
#
# Depends: l/pyasn1
# Source package infos
NAMESRC=${NAMESRC:-pyasn1-modules}
VERSION=${VERSION:-0.0.8}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://downloads.sourceforge.net/pyasn1/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-pyasn1-modules}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
python3 setup.py build
python3 setup.py install --root=$PKG
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME/examples
install -m 644 CHANGES.txt LICENSE.txt PKG-INFO README.txt $PKG/usr/doc/$NAME
install -m 644 tools/*.py $PKG/usr/doc/$NAME/examples/
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat > $PKG/install/slack-required <<EOF
pyasn1
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

12
l/pyasn1-modules/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-----------------------------------------------------|
pyasn1-modules: pyasn1-modules (ASN.1-based protocols modules for Python)
pyasn1-modules:
pyasn1-modules: A collection of ASN.1 modules expressed in form of pyasn1 classes.
pyasn1-modules: Includes protocols PDUs definition (SNMP, LDAP etc.) and various
pyasn1-modules: data structurs (X.509, PKCS etc.).
pyasn1-modules:
pyasn1-modules: This package is for Python3.
pyasn1-modules:
pyasn1-modules:
pyasn1-modules:
pyasn1-modules:

1
l/pyasn1/pyasn1-0.1.9.tar.gz.sha256

@ -1 +0,0 @@
853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f pyasn1-0.1.9.tar.gz

103
l/pyasn1/pyasn1.SlackBuild

@ -1,103 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014,2016,2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest pyasn1 sourcecode is available at:
# <http://pyasn1.sourceforge.net/>.
#
# Depends: d/python3
# Source package infos
NAMESRC=${NAMESRC:-pyasn1}
VERSION=${VERSION:-0.1.9}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://downloads.sourceforge.net/pyasn1/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-pyasn1}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
python3 setup.py build
python3 setup.py install --root=$PKG
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 CHANGES.txt LICENSE.txt PKG-INFO README.txt THANKS.txt \
TODO.txt $PKG/usr/doc/$NAME
cp -r doc $PKG/usr/doc/$NAME/html
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat > $PKG/install/slack-required <<EOF
python3
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

12
l/pyasn1/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-----------------------------------------------------|
pyasn1: pyasn1 (ASN.1 types and codecs for Python)
pyasn1:
pyasn1: A pure-Python implementation of ASN.1 types and DER/BER/CER codecs
pyasn1: (X.208).
pyasn1:
pyasn1: This package is for Python3.
pyasn1:
pyasn1:
pyasn1:
pyasn1:
pyasn1:

1
l/pynotify2/notify2-0.3.tar.gz.sha256

@ -1 +0,0 @@
684281f91c51fc60bc7909a35bd21d043a2a421f4e269de1ed1f13845d1d6321 notify2-0.3.tar.gz

103
l/pynotify2/pynotify2.SlackBuild

@ -1,103 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014,2016,2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest notify2 sourcecode is available at:
# <https://pypi.python.org/pypi/notify2>.
#
# Optional: l/dbus-python3
# Source package infos
NAMESRC=${NAMESRC:-notify2}
VERSION=${VERSION:-0.3}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://pypi.python.org/packages/7f/be/f749b44ac10ca9e4b9e54a9549e37233b30451bd1c12ece640bec730c0e5/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-pynotify2}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Build
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
python setup.py build
python setup.py install --root=$PKG
# Build Python3 version if Python3 is available
if [ -x /usr/bin/python3 ]; then
rm -rf build
python3 setup.py build
python3 setup.py install --root=$PKG
fi
# Install the documentation
install -D -m 644 PKG-INFO $PKG/usr/doc/$NAME/PKG-INFO
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

12
l/pynotify2/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-----------------------------------------------------|
pynotify2: pynotify2 (Python interfaces to D-Bus notifications)
pynotify2:
pynotify2: This is a pure-Python replacement for notify-python, using
pynotify2: python-dbus to communicate with the notifications server directly.
pynotify2:
pynotify2:
pynotify2:
pynotify2:
pynotify2:
pynotify2:
pynotify2:

2
xap/uzbl/doinst.sh

@ -1,2 +0,0 @@
#!/bin/sh
chmod 755 usr/share/uzbl/incenp.org/data/scripts/*.sh

12
xap/uzbl/slack-desc

@ -1,12 +0,0 @@
|-----handy-ruler-------------------------------------------------------|
uzbl: uzbl (Uzbl web interface tools)
uzbl:
uzbl: Uzbl is a set of web interface tools (a "browser") that adhere to the
uzbl: Unix philosophy.
uzbl:
uzbl: This package provides a customized Uzbl from incenp.org.
uzbl:
uzbl:
uzbl:
uzbl:
uzbl:

933
xap/uzbl/uzbl-0.9.1-incenp-local.diff

@ -1,933 +0,0 @@
diff --git a/Makefile b/Makefile
index 87fee74..3255631 100644
--- a/Makefile
+++ b/Makefile
@@ -280,6 +280,14 @@ install-uzbl-browser: uzbl-browser install-dirs install-uzbl-core install-event-
install-uzbl-tabbed: install-dirs
$(INSTALL) -m755 bin/uzbl-tabbed $(INSTALLDIR)/bin/uzbl-tabbed
+install-uzbl-incenp: install
+ install -m755 incenp.org/bin/uzbl $(INSTALLDIR)/bin/uzbl
+ sed 's#@PREFIX@#$(RUN_PREFIX)#' < incenp.org/bin/uzbl-browser.in > $(INSTALLDIR)/bin/uzbl-browser
+ mkdir -p $(INSTALLDIR)/share/uzbl/incenp.org
+ cp -r incenp.org/config $(INSTALLDIR)/share/uzbl/incenp.org/config
+ cp -r incenp.org/data $(INSTALLDIR)/share/uzbl/incenp.org/data
+ ln -s $(PREFIX)/share/uzbl/examples/data/scripts/follow.js $(INSTALLDIR)/share/uzbl/incenp.org/data/scripts/follow.js
+
# you probably only want to do this manually when testing and/or to the sandbox. not meant for distributors
install-example-data:
$(INSTALL) -d $(DESTDIR)/home/.config/uzbl
diff --git a/incenp.org/bin/uzbl b/incenp.org/bin/uzbl
new file mode 100644
index 0000000..3e46dc5
--- /dev/null
+++ b/incenp.org/bin/uzbl
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Uzbl main launch script
+
+target=$1; shift
+
+# If target points to a local file, transform it into a file:// URL.
+if [ -n "$target" -a -f "$target" ]; then
+ target="file://$(readlink -f $target)"
+fi
+
+# Check if Uzbl is already running.
+uzbl_fifo=$(find ${XDG_RUNTIME_DIR:-/tmp} -maxdepth 1 -user $UID -name 'uzbl_fifo_*' -print | head -n 1)
+
+if [ -p "$uzbl_fifo" ]; then
+ # Open a new tab in the running instance
+ echo "event NEW_TAB $target" > $uzbl_fifo
+else
+ # Launch uzbl-tabbed
+ exec uzbl-tabbed $target $@
+fi
diff --git a/incenp.org/bin/uzbl-browser.in b/incenp.org/bin/uzbl-browser.in
new file mode 100644
index 0000000..289a59e
--- /dev/null
+++ b/incenp.org/bin/uzbl-browser.in
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Uzbl browser launch script
+
+# Directories
+export UZBL_PREFIX=@PREFIX@
+configdir=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl
+cachedir=${XDG_CACHE_HOME:-$HOME/.cache}/uzbl
+datadir=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl
+runtimedir=${XDG_RUNTIME_DIR:-/tmp}
+
+# Helper function
+die()
+{
+ echo "${0##*/}: $@" >&2
+ exit 1
+}
+
+# Check for XDG directories
+for dir in $configdir $cachedir $datadir ; do
+ [ -d $dir ] || mkdir -p $dir || die "cannot create XDG directories"
+done
+
+# Check for config file
+[ -f $configdir/config ] || die "config file missing"
+
+# Starting event manager
+[ -S $runtimedir/uzbl_event_manager.socket ] || uzbl-event-manager \
+ --server-socket $runtimedir/uzbl_event_manager.socket \
+ --pid-file $runtimedir/uzbl_event_manager.pid \
+ --log-file $cachedir/event_manager.log \
+ --auto-close \
+ start
+
+# Start core
+exec uzbl-core \
+ --config $configdir/config \
+ --connect-socket $runtimedir/uzbl_event_manager.socket \
+ "$@"
diff --git a/incenp.org/config/config b/incenp.org/config/config
new file mode 100644
index 0000000..5456aa3
--- /dev/null
+++ b/incenp.org/config/config
@@ -0,0 +1,240 @@
+# Uzbl config file
+# vim: set ft=uzbl:
+
+#######################
+# Paths and directories
+
+set prefix @(echo $UZBL_PREFIX)@
+set conf_dir @(echo ${XDG_CONFIG_HOME:-$HOME/.config})@
+set data_dir @(echo ${XDG_DATA_HOME:-$HOME/.local/share})@
+set runtime_dir @(echo ${XDG_RUNTIME_DIR:-/tmp})@
+
+set fifo_dir @runtime_dir
+set socket_dir @runtime_dir
+set scripts_dir @conf_dir/uzbl:@prefix/share/uzbl/incenp.org/data:scripts
+set local_storage_path @data_dir/uzbl/databases
+
+
+#################
+# Misc parameters
+
+set useragent Uzbl
+set default_encoding UTF-8
+set ssl_ca_file @conf_dir/uzbl/ca-certificates.crt
+set ssl_policy ignore
+set ssl_monkeysphere 0
+set ssl_dane 1
+set ssl_qualitycheck 0
+set ssl_track_certificates 1
+set ssl_tracker_trustonfirstuse 1
+set enable_builtin_auth 0
+
+
+##############
+# GUI settings
+
+set font_size 14
+set show_tablist 0
+set show_gtk_tabs 1
+set gtk_tab_pos left
+set max_title_len 20
+
+# Status bar
+set status_background #909090
+set progress.width 8
+set progress.format %d>%p|%c
+set status_format <span font_family="monospace">[\@mode_indicator] [\@keycmd_prompt\@modcmd \@keycmd \@completion_list] [\@[\@progress.output]\@] [Uri: \@[\@<"\@uri".substring(0,60)>\@]\@] \@<if ('\@tls_status') {'[TLS: \@tls_status]'}>\@ \@<if (\@enable_scripts) {'<span weight="bold" foreground="darkgreen">[JS]</span>'}>\@</span>
+set status_format_right <span font_family="monospace">[Sel: \@[\@SELECTED_URI]\@]</span>
+
+# Custom menu entries
+menu add link Xdg-Open "spawn_sh 'xdg-open \@SELECTED_URI'"
+menu add link Firefox "spawn_sh 'firefox \@SELECTED_URI'"
+menu add link X-Copy "spawn_sh 'echo \@SELECTED_URI | xclip'"
+menu add link De-TinyURL "spawn @scripts_dir/detinyurl.sh \@SELECTED_URI"
+
+
+###############
+# Mode settings
+
+event MODE_CONFIG command mode_indicator Cmd
+event MODE_CONFIG command keycmd_events 1
+event MODE_CONFIG command modcmd_updates 1
+event MODE_CONFIG command forward_keys 0
+
+event MODE_CONFIG insert mode_indicator Ins
+event MODE_CONFIG insert keycmd_events 0
+event MODE_CONFIG insert modcmd_updates 0
+event MODE_CONFIG insert forward_keys 1
+
+event MODE_CONFIG stack mode_indicator Bnd
+event MODE_CONFIG stack keycmd_events 1
+event MODE_CONFIG stack modcmd_updates 1
+event MODE_CONFIG stack forward_keys 0
+
+set default_mode command
+event ON_EVENT ESCAPE set mode
+event ON_EVENT ROOT_ACTIVE set mode
+event ON_EVENT FORM_ACTIVE set mode
+
+
+##############
+# Key bindings
+
+event IGNORE_KEY <ISO_*>
+event IGNORE_KEY <Shift>
+event IGNORE_KEY <Multi_key>
+event IGNORE_KEY <Mod2>
+event IGNORE_KEY <Mod5>
+event IGNORE_KEY <Ctrl>
+event MODMAP <Control> <Ctrl>
+
+# Mode-switching
+event MODE_BIND command i = set mode insert
+event MODE_BIND global <Escape> = event ESCAPE
+
+# Command line editing
+event MODE_BIND global,-insert <Return> = event RETURN
+event MODE_BIND global,-insert <Home> = event SET_CURSOR_POS 0
+event MODE_BIND global,-insert <End> = event SET_CURSOR_POS -1
+event MODE_BIND global,-insert <Left> = event SET_CURSOR_POS -
+event MODE_BIND global,-insert <Right> = event SET_CURSOR_POS +
+event MODE_BIND global,-insert <BackSpace> = event KEYCMD_BACKSPACE
+event MODE_BIND global,-insert <Delete> = event KEYCMD_DELETE
+event MODE_BIND global,-insert <Tab> = event START_COMPLETION
+event MODE_BIND command :_ = %s
+event ON_EVENT RETURN event KEYCMD_EXEC_CURRENT
+event ON_EVENT ESCAPE event KEYCMD_CLEAR
+
+# Page movement
+event MODE_BIND command j = scroll vertical 20
+event MODE_BIND command <Down> = scroll vertical 20
+event MODE_BIND command k = scroll vertical -20
+event MODE_BIND command <Up> = scroll vertical -20
+event MODE_BIND command h = scroll horizontal -20
+event MODE_BIND command l = scroll horizontal 20
+event MODE_BIND command <Page_Up> = scroll vertical -100%
+event MODE_BIND command <Page_Down> = scroll vertical 100%
+event MODE_BIND command << = scroll vertical begin
+event MODE_BIND command >> = scroll vertical end
+event MODE_BIND command ^ = scroll horizontal begin
+event MODE_BIND command $ = scroll horizontal end
+
+# Misc commands
+event MODE_BIND command d = exit
+event MODE_BIND command <F10> = spawn_sh 'urxvt -e sh -c "socat unix-connect:$UZBL_SOCKET -"'
+event MODE_BIND command Tc = spawn @scripts_dir/tls.sh
+
+# Navigation
+event MODE_BIND command o<uri:_> = uri %s
+event MODE_BIND command O<uri:\@uri>_ = uri %s
+event MODE_BIND command b = back
+event MODE_BIND command m = forward
+event MODE_BIND command S = stop
+event MODE_BIND command r = reload cached
+event MODE_BIND command R = reload full
+
+# Clipboard interaction
+event MODE_BIND command p = spawn_sh 'echo "uri `xclip -o`" > $UZBL_FIFO'
+event MODE_BIND command P = spawn_sh 'echo "event NEW_TAB `xclip -o`" > $UZBL_FIFO'
+event MODE_BIND command y = spawn_sh 'echo -n $UZBL_URI | xclip'
+
+# Zoom
+event MODE_BIND command + = zoom in
+event MODE_BIND command - = zoom out
+event MODE_BIND command t = toggle zoom_text_only
+
+# Search inside the page
+event MODE_BIND command /* = search find %s
+event MODE_BIND command ?* = search rfind %s
+event MODE_BIND command n = search next
+event MODE_BIND command N = search prev
+event ON_EVENT ESCAPE = search clear
+
+# Tabbed bindings
+event MODE_BIND command gn = event NEW_TAB
+event MODE_BIND command go<uri:>_ = event NEW_TAB %s
+event MODE_BIND command gt = event NEXT_TAB
+event MODE_BIND command gT = event PREV_TAB
+event MODE_BIND command gd = event EXIT_ALL_TABS
+event ON_EVENT REQ_NEW_WINDOW event NEW_TAB %s
+
+# Search engines
+event MODE_BIND command sg<Google:>_ = uri http://www.google.com/search?q=\@<encodeURIComponent(%r)>\@
+event MODE_BIND command sw<Wikipedia:>_ = uri http://en.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%s)>\@&go=Go
+event MODE_BIND command sW<Wikipedia:>_ = uri http://fr.wikipedia.org/w/index.php?title=Special:Search&search=\@<encodeURIComponent(%s)>\@&go=Go
+event MODE_BIND command sr<RFC:>_ = uri http://tools.ietf.org/html/rfc\@<encodeURIComponent(%r)>\@
+
+
+##########
+# Handlers
+
+set authentication_handler spawn_sync @scripts_dir/auth.sh
+set download_handler spawn_sync @scripts_dir/download.sh
+set navigation_handler spawn_sync @scripts_dir/navigation.sh
+set request_handler spawn_sync @scripts_dir/request.sh
+
+
+####################
+# Cookies management
+
+set cookie_policy always
+spawn @scripts_dir/cookies.sh load
+event MODE_BIND command Ca<uri:\@uri>_ = spawn @scripts_dir/cookies.sh allow %s
+event MODE_BIND command Cd<uri:\@uri>_ = spawn @scripts_dir/cookies.sh disallow %s
+event MODE_BIND command Cc<uri:\@uri>_ = spawn @scripts_dir/cookies.sh clear %s
+
+
+###########
+# Bookmarks
+
+event MODE_BIND command Ba<Bookmark:>_ = spawn @scripts_dir/bookmarks.sh add %s
+event MODE_BIND command Bk<Keyword:>_ = spawn @scripts_dir/bookmarks.sh key %s
+event MODE_BIND command Bl = spawn @scripts_dir/bookmarks.sh list
+event MODE_BIND command Bt<Tag:>_ = spawn @scripts_dir/bookmarks.sh tag %s
+event MODE_BIND command Bs<Search:>_ = spawn @scripts_dir/bookmarks.sh search %s
+event MODE_BIND command Be = spawn @scripts_dir/bookmarks.sh explore
+event MODE_BIND command Bu<Update:\@current_bookmark>_ = spawn @scripts_dir/bookmarks.sh update %s
+
+
+#########
+# History
+
+event ON_EVENT LOAD_FINISH spawn @scripts_dir/history.sh add
+event MODE_BIND command Hs<History:>_ = spawn @scripts_dir/history.sh search %s
+event MODE_BIND command He<Exclude:\@uri>_ = spawn @scripts_dir/history.sh exclude %s
+
+
+#################
+# Script policies
+
+set enable_scripts 0
+event ON_EVENT LOAD_COMMIT spawn @scripts_dir/script.sh query
+event MODE_BIND command Ja = spawn @scripts_dir/script.sh allow
+event MODE_BIND command JA = spawn @scripts_dir/script.sh allow-permanent
+event MODE_BIND command Jd = spawn @scripts_dir/script.sh disallow
+event MODE_BIND command JD = spawn @scripts_dir/script.sh disallow-permanent
+
+
+#############
+# Formfilling
+
+event ON_EVENT LOAD_COMMIT js page file @scripts_dir/formfiller.js
+event MODE_BIND command zn = spawn @scripts_dir/formfiller.sh new "\@< uzbl.formfiller.dump(); >\@"
+event MODE_BIND command ze = spawn @scripts_dir/formfiller.sh edit
+event MODE_BIND command zl = spawn @scripts_dir/formfiller.sh load
+
+
+################
+# Link following
+
+event ON_EVENT LOAD_COMMIT js page file @scripts_dir/follow.js
+event ON_EVENT ESCAPE js page string uzbl.follow.clearHints()
+event MODE_BIND command ff* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followLinks('0123456789', "%s", 'click') >\@
+event MODE_BIND command ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@
+css add file://@conf_dir/uzbl/style.css
+
+
+#################################
+# Per-domain actions and settings
+
+event ON_EVENT LOAD_FINISH spawn @scripts_dir/per-domain.sh
diff --git a/incenp.org/config/style.css b/incenp.org/config/style.css
new file mode 100644
index 0000000..b00089d
--- /dev/null
+++ b/incenp.org/config/style.css
@@ -0,0 +1,24 @@
+#uzbl_link_hints > span {
+ z-index: 1000 !important;
+
+ background-color: #333 !important;
+ margin: 0 !important;
+ padding: 3px !important;
+
+ color: #ccc !important;
+ font-size: 9px !important;
+ line-height: 9px !important;
+ font-weight: bold !important;
+ font-variant: normal !important;
+ text-decoration: none !important;
+
+ -webkit-transform: translate(-5px,-5px);
+ opacity: 0.8;
+ -webkit-border-radius: 6px !important;
+}
+
+.uzbl-follow-text-match {
+ outline: 2px solid invert;
+ background: #333 !important;
+ color: white !important;
+}
diff --git a/incenp.org/data/scripts/auth.sh b/incenp.org/data/scripts/auth.sh
new file mode 100755
index 0000000..981e3e6
--- /dev/null
+++ b/incenp.org/data/scripts/auth.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Authentication handler for Uzbl
+
+host=$1
+realm=$2
+retry=$3
+scheme=$4
+proxy=$5
+port=$6
+save=$7
+
+[ "x$retry" = xinitial ] || exit
+
+if ! forms exist $host ; then
+ forms edit $host <<EOF
+$realm-login:
+$realm-psswd:
+EOF
+fi
+
+login=$(forms get-field $host "$realm-login")
+psswd=$(forms get-field $host "$realm-psswd")
+
+echo >$UZBL_FIFO <<EOF
+AUTH
+$login
+$psswd
+EOF
diff --git a/incenp.org/data/scripts/bookmarks.sh b/incenp.org/data/scripts/bookmarks.sh
new file mode 100755
index 0000000..b10fcf7
--- /dev/null
+++ b/incenp.org/data/scripts/bookmarks.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+# Bookmarks manager for Uzbl
+
+bookmarks=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/bookmarks
+
+dmenu_font='-*-fixed-medium-*-*-*-16-*-*-*-*-*-*-*'
+
+open_bookmark()
+{
+ # $1: bookmark id
+ goto=$(awk -F' ' '$1 == '$1' { print $2 }' $bookmarks)
+ [ -n "$goto" ] || exit
+ echo "set current_bookmark $1" >> $UZBL_FIFO
+ echo "uri $goto" >> $UZBL_FIFO
+}
+
+command=$1; shift
+
+case "$command" in
+add)
+ # Add the current page to the bookmarks
+ # $1: tag1,tag2,tagn:keyword
+ last_id=$(tail -n 1 $bookmarks | cut -d' ' -f1)
+ next_id=$(($last_id + 1))
+ tags=$(echo $1 | cut -d: -f1)
+ keyword=$(echo $1 | cut -d: -f2)
+ echo "$next_id $UZBL_URI $tags $keyword $UZBL_TITLE" >> $bookmarks
+ ;;
+
+key)
+ # Load a bookmark by keyword
+ # $1: keyword to look for
+ id=$(awk -F' ' '$4 == "'$1'" { print $1 }' $bookmarks)
+ [ -n "$id" ] && open_bookmark $id
+ ;;
+
+list)
+ # List all bookmarks in a dmenu, and let the user choose
+ id=$(grep -v ^# $bookmarks | cut -d' ' -f1,5- | dmenu -i -fn $dmenu_font | cut -d' ' -f1)
+ [ -n "$id" ] && open_bookmark $id
+ ;;
+
+tag)
+ # List bookmarks corresponding to the given tag
+ # $1: tag to look for
+ id=$(grep -v ^# $bookmarks | awk -F' ' '$3 ~ /'$1'/ { print }' | cut -d' ' -f1,5- | dmenu -i -fn $dmenu_font | cut -d' ' -f1)
+ [ -n "$id" ] && open_bookmark $id
+ ;;
+
+search)
+ # List bookmarks whose URI or title match the given pattern
+ # $1: pattern to look for
+ subset=$(grep -v ^# $bookmarks | cut -d' ' -f1,2,5- | grep -i "$1")
+ [ -n "$subset" ] || exit
+ id=$(echo "$subset" | cut -d' ' -f1,3- | dmenu -i -fn $dmenu_font | cut -d' ' -f1)
+ [ -n "$id" ] && open_bookmark $id
+ ;;
+
+explore)
+ # Choose one tag
+ tag=$(grep -v ^# $bookmarks | cut -d' ' -f3 | sed -e "s/,/\n/g" | sort -u | dmenu -i -fn $dmenu_font)
+ [ -n "$tag" ] || exit
+ # List corresponding bookmarks
+ id=$(grep -v ^# $bookmarks | awk -F' ' '$3 ~ /'$tag'/ { print }' | cut -d' ' -f1,5- | dmenu -i -fn $dmenu_font | cut -d' ' -f1)
+ [ -n "$id" ] && open_bookmark $id
+ ;;
+
+update)
+ # Replace the bookmark with the given id by the current uri
+ # $1: bookmark id
+ [ -n "$1" ] || exit
+ new_uri=$(echo "$UZBL_URI" | sed -e 's,&,\\&,g')
+ sed -i -r -e 's#^'$1' [^ ]+ ([^ ]*) ([^ ]*) .*$#'$1' '"$new_uri"' \1 \2 '"$UZBL_TITLE"'#' $bookmarks
+ ;;
+esac
diff --git a/incenp.org/data/scripts/cookies.sh b/incenp.org/data/scripts/cookies.sh
new file mode 100755
index 0000000..1be16cf
--- /dev/null
+++ b/incenp.org/data/scripts/cookies.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+# Cookies manager for Uzbl
+
+cookies=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/cookies.txt
+session_cookies=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/session-cookies.txt
+whitelist=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl/cookie.whitelist
+
+command=$1; shift
+
+[ -f $cookies ] || touch $cookies
+[ -f $session_cookies ] || touch $session_cookies
+[ -f $whitelist ] || touch $whitelist
+
+case "$command" in
+load)
+ awk -F \\t '
+BEGIN {
+ scheme["TRUE"] = "https";
+ scheme["FALSE"] = "http";
+}
+$0 ~ /^#HttpOnly_/ {
+ gsub(/@/, "\\@");
+ printf("cookie add \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", substr($1,length("#HttpOnly_")+1, length($1)), $3, $6, $7, scheme[$4], $5);
+}
+$0 !~ /^#/ {
+ gsub(/@/, "\\@");
+ printf("cookie add \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", $1, $3, $6, $7, scheme[$4], $5);
+}
+' $cookies $session_cookies > $UZBL_FIFO
+
+ sed -n 's/^\./event WHITELIST_COOKIE domain /p' $whitelist > $UZBL_FIFO
+ ;;
+
+allow)
+ domain=$(echo "$1" | sed -re 's,https?://([^/]+).*,\1,')
+ [ -n "$domain" ] || exit 1
+
+ if ! grep -q "^\.$domain$" $whitelist ; then
+ echo ".$domain" >> $whitelist
+ echo "event WHITELIST_COOKIE domain .$domain" > $UZBL_FIFO
+ fi
+ ;;
+
+disallow)
+ domain=$(echo "$1" | sed -re 's,https?://([^/]+).*,\1,')
+ [ -n "$domain" ] || exit 1
+
+ sed -i -e "/^\.$domain$/ d" $whitelist
+ echo "event BLACKLIST_COOKIE domain .$domain" > $UZBL_FIFO
+ ;;
+
+clear)
+ if [ -n "$1" ]; then
+ echo "cookie clear domain $1" > $UZBL_FIFO
+ else
+ echo "cookie clear all" > $UZBL_FIFO
+ fi
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/detinyurl.sh b/incenp.org/data/scripts/detinyurl.sh
new file mode 100755
index 0000000..4bb3d61
--- /dev/null
+++ b/incenp.org/data/scripts/detinyurl.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+# "Tiny URLs" resolver for Uzbl
+
+url=$1
+[ -n "$url" ] || exit 0
+
+target=$(wget --server-response --max-redirect=0 "$url" 2>&1 | sed -ne 's/^ Location: //p')
+[ -n "$target" ] || exit 0
+echo "js page string \"alert('Uzbl De-TinyURL-isator: $url -> $target');\"" > $UZBL_FIFO
diff --git a/incenp.org/data/scripts/download.sh b/incenp.org/data/scripts/download.sh
new file mode 100755
index 0000000..9c92322
--- /dev/null
+++ b/incenp.org/data/scripts/download.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+# Download handler for Uzbl
+
+downdir=$HOME/Downloads
+datadir=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl
+dmenu_font='-*-fixed-medium-*-*-*-16-*-*-*-*-*-*-*'
+download_opts="--monitor monitor-download --cookies $datadir/cookies.txt"
+
+url=$1
+filename=$2
+content_type=$3
+total_size=$4
+
+# If there is no suggested filename, use the last part of the URL
+[ -n "$filename" ] || filename=${url##*/}
+
+# Present the user a first possibility to select the destination
+target1=$(echo -e "Default\nChoose\n" | dmenu -fn $dmenu_font -p Destination)
+[ $? -eq 0 ] || exit
+
+case "$target1" in
+Default)
+ # Download in default directory using suggested filename
+ download $download_opts "$url" --out "$filename"
+ ;;
+
+Choose)
+ # Present the user a typical Save-as dialog
+ target2=$(zenity --file-selection --save --filename="$filename")
+ if [ $? -eq 0 ]; then
+ # Strip base download directory
+ target3=$(echo "$target2" | sed -e "s,^$downdir,,")
+ download $download_opts "$url" --out "$target3"
+ fi
+ ;;
+
+*)
+ # Download in the location specified by the user.
+ if [ -d "$downdir/$target1" ] || echo "$target1" | grep -q '/$' ; then
+ # User specified a directory under which store the
+ # downloaded file with its default filename
+ download $download_opts "$url" --out "$target1/$filename"
+ else
+ # User specified the full pathname
+ download $download_opts "$url" --out "$target1"
+ fi
+ ;;
+esac
diff --git a/incenp.org/data/scripts/follow.sh b/incenp.org/data/scripts/follow.sh
new file mode 100755
index 0000000..08fe49d
--- /dev/null
+++ b/incenp.org/data/scripts/follow.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Link follower script for Uzbl
+
+result="$1"
+shift
+
+case "$result" in
+XXXRESET_MODEXXX)
+ # A link was selected and already clicked in follow.js
+ # We just have to reset Uzbl's input mode
+ echo -e 'set mode\nevent KEYCMD_CLEAR' > $UZBL_FIFO
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/formfiller.js b/incenp.org/data/scripts/formfiller.js
new file mode 100644
index 0000000..913bf17
--- /dev/null
+++ b/incenp.org/data/scripts/formfiller.js
@@ -0,0 +1,87 @@
+/* Helper script for Uzbl formfiller */
+
+var uzbl = uzbl || {};
+
+uzbl.formfiller = (function () {
+
+'use strict';
+
+var get_fields = function (nodelist)
+{
+ var res = "";
+
+ for (var i = 0; i < nodelist.length; i++) {
+ if (nodelist[i].type == "text" || nodelist[i].type == "password") {
+ res += nodelist[i].name + ": \n";
+ }
+ }
+
+ return res;
+}
+
+var find_element_in_frames = function (frame, name)
+{
+ var nodelist = frame.document.getElementsByName (name);
+ if (nodelist.length > 0) {
+ return nodelist[0];
+ }
+
+ /* Element not found in frame, try looking for it in subframes. */
+ var element;
+ for (var i = 0; i < frame.frames.length; i++) {
+ element = find_element_in_frames (frame.frames[i], name);
+ if (element) {
+ return element;
+ }
+ }
+
+ return element;
+}
+
+var find_element = function (name)
+{
+ var nodelist = document.getElementsByName (name);
+ if (nodelist.length > 0) {
+ return nodelist[0];
+ }
+
+ /* Element not found in the main frame, try looking for it in frames. */
+ for (var i = 0; i < window.frames.length; i++) {
+ element = find_element_in_frames (window.frames[i], name);
+ if (element) {
+ return element;
+ }
+ }
+
+ return null;
+}
+
+var find_input_in_frames = function (frame)
+{
+ var fields = get_fields (frame.document.getElementsByTagName("input"));
+ for (var i = 0; i < frame.frames.length; i++) {
+ fields += find_input_in_frames (frame.frames[i]);
+ }
+
+ return fields;
+}
+
+return {
+ dump: function () {
+ var output = get_fields (document.getElementsByTagName ("input"));
+ for (var i = 0; i < window.frames.length; i++) {
+ output += find_input_in_frames (window.frames[i]);
+ }
+ return output;
+ },
+
+ insert: function (field) {
+ var args = field.split (": ", 2);
+ var node = find_element (args[0]);
+ if (node != null) {
+ node.value = args[1];
+ }
+ }
+};
+
+}());
diff --git a/incenp.org/data/scripts/formfiller.sh b/incenp.org/data/scripts/formfiller.sh
new file mode 100755
index 0000000..c5da1ae
--- /dev/null
+++ b/incenp.org/data/scripts/formfiller.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+# Form filler for Uzbl
+
+domain=$(echo $UZBL_URI | sed -re 's,https?://([^/]+).*,\1,')
+
+case "$1" in
+new)
+ shift
+ forms add $domain <<< "$@"
+ forms edit $domain
+ ;;
+
+load)
+ forms exist $domain || exit 1
+ forms get $domain | grep '^[^:]\+: .' | sed -e 's/@/\\\\@/' | \
+ while read field ; do
+ echo "js page string \"uzbl.formfiller.insert('$field')\";" > $UZBL_FIFO
+ done
+ ;;
+
+edit)
+ forms edit $domain
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/history.sh b/incenp.org/data/scripts/history.sh
new file mode 100755
index 0000000..a893365
--- /dev/null
+++ b/incenp.org/data/scripts/history.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# History manager for Uzbl
+
+dmenu_font='-*-fixed-medium-*-*-*-16-*-*-*-*-*-*-*'
+histfile=${XDG_DATA_HOME:-$HOME/.local/share}/uzbl/history
+excludes=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl/history.excluded
+
+command=$1; shift
+
+[ -f $histfile ] || touch $histfile
+[ -f $excludes ] || touch $excludes
+
+case "$command" in
+add)
+ # Exclude 'data:' URIs
+ echo "$UZBL_URI" | grep -q ^data: && exit 0
+
+ # Exclude empty URIs
+ [ -z "$UZBL_URI" ] && exit 0
+
+ # Exclude domains in the "no history" list
+ domain=$(echo "$UZBL_URI" | sed -re 's,https?://([^/]+).*,\1,')
+ grep -q ^$domain\$ $excludes && exit 0
+
+ # Exclude URIs already in history
+ [ "$(awk -F ' ' '$3 == "'$UZBL_URI'" { print 1 }' $histfile)" = 1 ] && exit 0
+
+ # Write history entry
+ echo "$(date '+%Y-%m-%d %H:%M:%S') $UZBL_URI $UZBL_TITLE" >> $histfile
+ ;;
+
+search)
+ goto=$(grep -i "$1" $histfile | dmenu -i -l 10 -fn $dmenu_font | cut -d' ' -f3)
+ [ -n "$goto" ] && echo "uri $goto" >> $UZBL_FIFO
+ ;;
+
+exclude)
+ domain=$(echo "$1" | sed -re 's,https?://([^/]+).*,\1,')
+ grep -q ^$domain\$ $excludes && exit 0
+ echo $domain >> $excludes
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/navigation.sh b/incenp.org/data/scripts/navigation.sh
new file mode 100755
index 0000000..6d2cc96
--- /dev/null
+++ b/incenp.org/data/scripts/navigation.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Navigation handler for Uzbl
+
+uri=$1
+src_frame=$2
+dest_frame=$3
+nav_type=$4
+button=$5
+modifiers=$6
+is_gesture=$7
+
+case "$uri" in
+mailto:*)
+ if ! thunderbird -remote 'ping()' 2>/dev/null ; then
+ thunderbird -new-instance &
+ fi
+ thunderbird -remote "mailto($1)"
+ echo USED
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/per-domain.sh b/incenp.org/data/scripts/per-domain.sh
new file mode 100755
index 0000000..b6ee7d3
--- /dev/null
+++ b/incenp.org/data/scripts/per-domain.sh
@@ -0,0 +1,14 @@
+#/bin/bash
+# Apply domain-specific settings
+
+domains_dir=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl/scripts/domains
+[ -d $domains_dir ] || mkdir -p $domains_dir
+[ -f $domains_dir/default ] || touch $domains_dir/default
+
+if echo "$UZBL_URI" | grep ^file: ; then
+ domain=local
+else
+ domain=$(echo "$UZBL_URI" | sed -re 's,https?://([^/]+).*,\1,')
+ [ -f $domains_dir/$domain ] || domain=default
+fi
+. $domains_dir/$domain
diff --git a/incenp.org/data/scripts/request.sh b/incenp.org/data/scripts/request.sh
new file mode 100755
index 0000000..48fca64
--- /dev/null
+++ b/incenp.org/data/scripts/request.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Request handler for Uzbl
+
+uri=$1
+can_display=$2
+frame=$3
+redirect=$4
+
+blacklist=${XDG_CONFIG_HOME:-$HOME/.config}/uzbl/request.blacklist
+
+[ -s $blacklist ] || exit
+
+if echo "$uri" | grep -q -F -f $blacklist ; then
+ echo "about:blank"
+fi
diff --git a/incenp.org/data/scripts/script.sh b/incenp.org/data/scripts/script.sh
new file mode 100755
index 0000000..6c56d5a
--- /dev/null
+++ b/incenp.org/data/scripts/script.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+# Script policies manager for Uzbl
+
+whitelist=${XDG_CONFIG_HOME:-.config}/uzbl/script.whitelist
+[ -f $whitelist ] || touch $whitelist
+
+command=$1
+domain=$(echo "$UZBL_URI" | sed -re 's,https?://([^/]+).*,\1,')
+
+case "$1" in
+allow)
+ echo 'set enable_scripts 1' > $UZBL_FIFO
+ ;;
+
+allow-permanent)
+ echo 'set enable_scripts 1' > $UZBL_FIFO
+ grep -q ^$domain\$ $whitelist || echo $domain >> $whitelist
+ ;;
+
+disallow)
+ echo 'set enable_scripts 0' > $UZBL_FIFO
+ ;;
+
+disallow-permanent)
+ echo 'set enable_scripts 0' > $UZBL_FIFO
+ sed -i "/^$domain$/ d" $whitelist
+ ;;
+
+query)
+ if grep -q ^$domain\$ $whitelist ; then
+ echo 'set enable_scripts 1' > $UZBL_FIFO
+ else
+ echo 'set enable_scripts 0' > $UZBL_FIFO
+ fi
+ ;;
+
+esac
diff --git a/incenp.org/data/scripts/tls.sh b/incenp.org/data/scripts/tls.sh
new file mode 100755
index 0000000..444e1fd
--- /dev/null
+++ b/incenp.org/data/scripts/tls.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+# TLS helper script for Uzbl
+
+host=$(echo $UZBL_URI | sed -nre 's,^.*uzbl\.tls_update\.(.+)\.html$,\1,p')
+[ -n "$host" ] || exit 0
+
+sed -i -re "/[0-9a-f]+ [0-9]+ $host/ d" $XDG_DATA_HOME/uzbl/tls_host_certificates
+echo 'event TLS_TRACKER_RELOAD' >> $UZBL_FIFO

1264
xap/uzbl/uzbl-0.9.1-incenp.diff

File diff suppressed because it is too large

133
xap/uzbl/uzbl.SlackBuild

@ -1,133 +0,0 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2013,2014,2015,2016,2018 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest (incenp.org's) uzbl sourcecode is available at:
# <http://www.incenp.org/gitweb/?p=uzbl.git;a=summary>.
#
# Depends: d/python3, l/webkit, l/pynotify2, l/pyasn1-modules
# Depends: l/python-six
# Source package infos
NAMESRC=${NAMESRC:-uzbl}
VERSION=${VERSION:-0.9.1}
PATCH=${PATCH:-icp1}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
REPOS=${REPOS:-git://github.com/uzbl/uzbl.git}
REVISION=${REVISION:-981a45e848c779a3f7b49ce157e3f6df2f561099}
# Build infos
NAMEPKG=${NAMEPKG:-uzbl}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
git clone $REPOS $NAMESRC
cd $NAMESRC
git archive --prefix=$NAMESRC-$VERSION/ $REVISION | gzip > ../$ARCHIVE
cd ..
rm -rf $NAMESRC
fi
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAMESRC-$VERSION
patch -p 1 < $CWD/uzbl-0.9.1-incenp.diff
patch -p 1 < $CWD/uzbl-0.9.1-incenp-local.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
make \
DESTDIR=$PKG \
PREFIX=/usr \
DOCDIR=$PKG/usr/doc/$NAMESRC-$VERSION$PATCH \
MANDIR=$PKG/usr/man \
ENABLE_WEBKIT2=no \
install-uzbl-incenp
# Strip binaries
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Add dependency infos
cat > $PKG/install/slack-required <<EOF
pyasn1-modules
pynotify2
python-six
python3
webkit
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION$PATCH-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAMESRC-$VERSION
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
Loading…
Cancel
Save