Tag Archives: uzbl

Transparent-background icons for Tor, Uzbl, Irssi

I made these from files available on the net.

tor onion icon

uzbl web broser logo

irssi irc client logo

uzbl follow.js: link following with settable keys

EDIT: this script is no longer up-to-date and won’t work with the current version of uzbl.

This is a diff to current follow_Numbers.js. The new script, which I called follow.js, is more versatile, since the characters used for labels and key navigation can be set using the hintKeys variable.

2d1
<  * Its pretty stable, only using numbers to navigate.
12a12,14
> //This string should be 10 characters long. Play around!
> var hintKeys = 'asdfghjkl;';
> 
24c26
< //Make onlick-links "clickable"
---
> //Make onclick-links "clickable"
195a198,216
> //Map 0123456789 to hintKeys
> function mapNumToHintKeys(label) {
>     label = label + '';
>     for (var j = 0; j < label.length; j++) {
>     var pos = parseInt(label[j]);
>     label = label.replace(label[j], hintKeys[pos]);
>     }
>     return label;
> }
> //Map hintKeys to 0123456789
> function mapHintKeysToNum(label) {
>     label = label + '';
>     for (var j = 0; j < label.length; j++) {
>     var pos = hintKeys.search(label[j]);
>     if (pos < 0 || pos > 9) return;  // bad input, key not in hintKeys
>     label = label.replace(label[j], pos+'');
>     }
>     return parseInt(label);
> }
199c220
<     var linknr = parseInt(follow, 10);
---
>     var linknr = mapHintKeysToNum(follow);
216a238
>         label = mapNumToHintKeys(label);

Tor on per-tab basis

I have just had this idea: since uzbl_tabbed.py in fact reads the config file for every new tab (i.e. every new uzbl instance), it should be very easy to allow tor be enabled on a per-tab basis, something I wanted badly for Firefox. Nais!

uzbl_tabbed.py: commands to FIFO

The list is on line 782 (ATM) of uzbl_tabbed.py. The FIFO location is determined by your settings (top of file for defaults, possibly overridden from config). It’s like this:

782     def parse_command(self, cmd):
783         '''Parse instructions from uzbl child processes.'''
784
785         # Commands ( [] = optional, {} = required )
786         # new [uri]
787         #   open new tab and head to optional uri.
788         # close [tab-num]
789         #   close current tab or close via tab id.
790         # next [n-tabs]
791         #   open next tab or n tabs down. Supports negative indexing.
...

So, to open a new tab in uzbl_tabbed from newsbeuter, you need a script like newtab.sh:

#!/bin/sh
echo "new $1" > `ls -1 /tmp/uzbltabbed_*`

Then call it from newsbeuter – put this in ~.newsbeuter/config:

browser "~/.local/share/uzbl/scripts/newtab.sh %u"