You are not logged in.

#226 2009-05-04 13:29:54

dusanx
Member
Registered: 2008-11-28
Posts: 132

Re: uzbl. A browser that adheres to the unix philosophy.

ent wrote:

When I click a link that's supposed to open a tab/new window, it opens the new window twice. It's only happened on my igoogle page, so it's possible it's a problem with their page.

JS links are not completely finished. Some may not open at all, some may open twice. We are working on that.


Gnome -> Openbox -> Awesome -> XMonad -> dwm .
http://github.com/dusanx/uzbl/

Offline

#227 2009-05-04 14:15:42

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

great tip I just come to think of! Don't call the "tabs" tabs, call them buffers instead. And handle them like vim handles buffers. much more convinient imo.


RTFM or GTFO
hax0r.se

Offline

#228 2009-05-04 17:24:36

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: uzbl. A browser that adheres to the unix philosophy.

ent wrote:

also, how hard would it be to implement a customized css-changer? (stylish is the firefox equivalent). I don't think it should be added in, but if it isn't a daunting task then I might try and have a go at it for personal use. (it'd be a good excuse for me to learn more C wink )

no idea.  it may be possible to easily use custom stylesheets with webkit but I'm not sure.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#229 2009-05-05 06:47:05

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: uzbl. A browser that adheres to the unix philosophy.

Dieter@be wrote:
ent wrote:

also, how hard would it be to implement a customized css-changer? (stylish is the firefox equivalent). I don't think it should be added in, but if it isn't a daunting task then I might try and have a go at it for personal use. (it'd be a good excuse for me to learn more C wink )

no idea.  it may be possible to easily use custom stylesheets with webkit but I'm not sure.

Midori has custom style sheets I believe, and that is web-kit based.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#230 2009-05-05 14:49:56

dimigon
Member
Registered: 2009-03-07
Posts: 139
Website

Re: uzbl. A browser that adheres to the unix philosophy.

Hello guys, first of all good luck with your project. I have one recommendation, would it be sensible to drop gtk as a dependency and rewrite the code using only xlib?

Offline

#231 2009-05-05 15:56:27

Shunpike
Member
From: France
Registered: 2009-01-28
Posts: 47

Re: uzbl. A browser that adheres to the unix philosophy.

dimigon wrote:

Hello guys, first of all good luck with your project. I have one recommendation, would it be sensible to drop gtk as a dependency and rewrite the code using only xlib?

As far as I know, Xlib doesn't provide anyway to draw widgets (buttons, dropdowns, etc.) which are required by WebKit.
That's why WebKit relies on graphical toolkits, and has several ports (one for GTK, one for QT, one for Cocoa, etc.)

Offline

#232 2009-05-05 18:08:18

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: uzbl. A browser that adheres to the unix philosophy.

Shunpike wrote:
dimigon wrote:

Hello guys, first of all good luck with your project. I have one recommendation, would it be sensible to drop gtk as a dependency and rewrite the code using only xlib?

As far as I know, Xlib doesn't provide anyway to draw widgets (buttons, dropdowns, etc.) which are required by WebKit.
That's why WebKit relies on graphical toolkits, and has several ports (one for GTK, one for QT, one for Cocoa, etc.)

actually it was brought to my attention that there a (complete or incomplete?) port of webkit to the EFL toolkit, which is supposed to be quite lightweight.
http://codeposts.blogspot.com/2008/12/w … patch.html


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#233 2009-05-05 20:58:16

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

the problem is that the EFL toolkit relies heavily upon E17 libraries. No problem if you use E17 but for me as an example who only use CLI/Ncurses apps it's yet another toolkit I need to have installed. I've narrowed it down to GTK1/2 so far and intend to keep it that way. I'd rather see something with XLib(although I know this isn't probable). XLib is sooo much nicer/faster/awesomer than GTK. If you were to use XLib you would also solve whole theming issue. Just make a simple implementation of themes with fg/bg/marked and maybe a text field entry. I really like the way this project is going and don't want it to be yet another minimalbutstillbloated browser.


RTFM or GTFO
hax0r.se

Offline

#234 2009-05-05 21:21:38

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: uzbl. A browser that adheres to the unix philosophy.

Xlib doesn't do widgets
There's a fltk implementation somewhere in the net. fltk rules

Last edited by Wra!th (2009-05-05 21:23:46)


MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#235 2009-05-06 06:25:40

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

can't you "force" Xlib to make widgets? Or what is awesome using to draw it's widgets? Maybe this would be a good solution.


RTFM or GTFO
hax0r.se

Offline

#236 2009-05-06 06:39:12

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: uzbl. A browser that adheres to the unix philosophy.

dunz0r wrote:

can't you "force" Xlib to make widgets? Or what is awesome using to draw it's widgets? Maybe this would be a good solution.

Awesome uses cairo.

Offline

#237 2009-05-06 08:29:30

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: uzbl. A browser that adheres to the unix philosophy.

dunz0r wrote:

can't you "force" Xlib to make widgets? Or what is awesome using to draw it's widgets? Maybe this would be a good solution.

You can't "force" it to draw widgets. You can write working widgets but it's serious pain. Xlib only handles raw X stuff. You would need to draw every widget "by hand" and make it recognize events passed to them etc. It's like writing your own GUI toolkit. FLTK is awesome..and really lightweight compared to gtk 1/2

edit

Here's an example of buttons: http://www.cs.odu.edu/~cs476/xwindows/xlib/xbuttons.c

But none of this will work for uzbl because you need a way of incorporating the webkit window too. I do believe that would require some serious webkit hacks

Last edited by Wra!th (2009-05-06 08:58:57)


MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#238 2009-05-06 16:07:58

ent
Member
Registered: 2008-12-15
Posts: 53

Re: uzbl. A browser that adheres to the unix philosophy.

I kinda missed the vimperator address bar (with the search engines etc.) so I threw this together using dmenu and thought I'd post it for anyone interested

addressbar.sh

#!/bin/bash
# if called like "addressbar.sh n", opens in new window

# forgive the variable names, I'm unimaginative in that regard

CONFIGDIR="$XDG_CONFIG_HOME"
HISTORYFILE="$CONFIGDIR/uzbl/address.history"
MAXHISTORYLENGTH=25 # max number of entries to log

# search engines
DEFAULT="http://www.google.com/search?q="
WIKIPEDIA="http://en.wikipedia.org/wiki/Special:Search?search="
WIKIKEY="w"
ARCHWIKI="http://wiki.archlinux.org/index.php/Special:Search?search="
ARCHWIKIKEY="aw"
AUR="http://aur.archlinux.org/packages.php?O=0&K="
AURKEY="aur"

# a few other ones that I use sometimes
LASTFM="http://www.last.fm/search?m=all&q="
LASTFMKEY="lastfm"
ISOHUNT="http://isohunt.com/torrents/?ihq="
ISOHUNTKEY="iso"

if [ ! -e "$HISTORYFILE" ]; then
    touch $HISTORYFILE
fi

# clean up history file (remove blank lines, duplicates, etc)
tac $HISTORYFILE | awk '/./' | awk '!x[$0]++' | tac > $CONFIGDIR/uzbl/historytmp
mv $CONFIGDIR/uzbl/historytmp $HISTORYFILE
CURRENTLINES=`wc -l "$HISTORYFILE" | awk '{print $1}'`
if [ $CURRENTLINES -gt $MAXHISTORYLENGTH ]; then
    awk 'NR>1' $HISTORYFILE > $CONFIGDIR/uzbl/historytmp
    mv $CONFIGDIR/uzbl/historytmp $HISTORYFILE
fi

WHOLE=`tac $HISTORYFILE | dmenu -b -i`
echo "$WHOLE" >> $HISTORYFILE




if [ "`echo $WHOLE | awk '$0 ~ /^[ ]*$/ {print 1}'`" != 1 ]; then
    FIRST=`echo $WHOLE | awk '{print $1}'`
    SECOND=`echo $WHOLE | awk '{$1="";print}'`

    # figure out what the output should be
    if [ "$SECOND" = "" ]; then
        if [ "`echo $FIRST | awk '$1 ~ /.*\..*/ {print 1}'`" = 1 ]; then
            OUTPUT="$FIRST"
        else
            OUTPUT="$DEFAULT$WHOLE"
        fi
    else
        case "$FIRST" in
        $WIKIKEY     ) OUTPUT="$WIKIPEDIA$SECOND" ;;
        $ARCHWIKIKEY ) OUTPUT="$ARCHWIKI$SECOND"  ;;
        $AURKEY      ) OUTPUT="$AUR$SECOND"       ;;

        $LASTFMKEY   ) OUTPUT="$LASTFM$SECOND"    ;;
        $ISOHUNTKEY  ) OUTPUT="$ISOHUNT$SECOND"   ;;

        *            ) OUTPUT="$DEFAULT$WHOLE"    ;;
        esac
    fi

    # send the output to uzbl / uzblctrl
    if [ "$1" = "n" ]; then
        uzbl -u "$OUTPUT" &
    else    uzblctrl -s $5 -c "uri $OUTPUT" &
    fi
fi

it has a bunch of search engines as well as command history.
my bash skills are less than stellar, so modifications / improvements / cleanups are more than welcome

Last edited by ent (2009-05-06 16:08:38)

Offline

#239 2009-05-06 16:24:58

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

Can't we use cairo then? Cairo seems pretty nice imo. Maybe get rid of webkit(yes I know this would mean writing all from scratch) and make a "clean" browser. Would imo be totally awesome. This would mean I wouldn't need any widgetkits except ncurses installed.


RTFM or GTFO
hax0r.se

Offline

#240 2009-05-06 16:50:43

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: uzbl. A browser that adheres to the unix philosophy.

dunz0r wrote:

Can't we use cairo then? Cairo seems pretty nice imo. Maybe get rid of webkit(yes I know this would mean writing all from scratch) and make a "clean" browser. Would imo be totally awesome. This would mean I wouldn't need any widgetkits except ncurses installed.

Cairo IS simpler to use than drawing stuff with Xlib directly..but as with doing it manually,it just handles drawing stuff, not signals etc.You can use Cairo to draw the widgets, but you still need to write a functional widget library for this. All Cairo does is add an extra dependency to the equation.
Also getting rid of webkit is not really a good thing to do. It's by far the simplest complete html rendering engine you can find. Try using Gecko big_smile

Last edited by Wra!th (2009-05-06 16:51:20)


MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#241 2009-05-06 17:12:27

cinan
Member
From: Slovakia
Registered: 2008-07-04
Posts: 251
Website

Re: uzbl. A browser that adheres to the unix philosophy.

uzbl seems to be very cool smile
What about 'activity indicator'? Just change cursor when loading page.

Offline

#242 2009-05-06 17:16:11

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: uzbl. A browser that adheres to the unix philosophy.

Seems like someone made an fltk fork of webkit. http://terryxu2008.blogspot.com/2008/08 … -fltk.html

But frankly, I rather have a gtk dep and be reasonably assured that things work as they are supposed to then having to rely on some fork/patchset that one or two people once wrote, might be buggy, lacking functionality etc.

Seriously, installing gtk on your system is not gonna kill you.

cinan wrote:

uzbl seems to be very cool smile
What about 'activity indicator'? Just change cursor when loading page.

Rob M. wrote a statusbar .  See http://omploader.org/vMW1vcg  . This will be merged in my tree.
If you can write a small, clean patch to update the mouse when loading and restoring it back after loading, I'll merge it in.

Last edited by Dieter@be (2009-05-06 17:27:03)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#243 2009-05-06 17:32:51

Wra!th
Member
Registered: 2009-03-31
Posts: 342

Re: uzbl. A browser that adheres to the unix philosophy.

Dieter@be wrote:

Rob M. wrote a statusbar .  See http://omploader.org/vMW1vcg  . This will be merged in my tree.
If you can write a small, clean patch to update the mouse when loading and restoring it back after loading, I'll merge it in.

If Rob M. is who I think he is then he's the creator of dzen2


MacGregor DESPITE THEM!
7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00

Offline

#244 2009-05-06 18:22:45

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: uzbl. A browser that adheres to the unix philosophy.

ent wrote:

I kinda missed the vimperator address bar (with the search engines etc.) so I threw this together using dmenu and thought I'd post it for anyone interested

addressbar.sh

#!/bin/bash
# if called like "addressbar.sh n", opens in new window

# forgive the variable names, I'm unimaginative in that regard

CONFIGDIR="$XDG_CONFIG_HOME"
HISTORYFILE="$CONFIGDIR/uzbl/address.history"
MAXHISTORYLENGTH=25 # max number of entries to log

# search engines
DEFAULT="http://www.google.com/search?q="
WIKIPEDIA="http://en.wikipedia.org/wiki/Special:Search?search="
WIKIKEY="w"
ARCHWIKI="http://wiki.archlinux.org/index.php/Special:Search?search="
ARCHWIKIKEY="aw"
AUR="http://aur.archlinux.org/packages.php?O=0&K="
AURKEY="aur"

# a few other ones that I use sometimes
LASTFM="http://www.last.fm/search?m=all&q="
LASTFMKEY="lastfm"
ISOHUNT="http://isohunt.com/torrents/?ihq="
ISOHUNTKEY="iso"

if [ ! -e "$HISTORYFILE" ]; then
    touch $HISTORYFILE
fi

# clean up history file (remove blank lines, duplicates, etc)
tac $HISTORYFILE | awk '/./' | awk '!x[$0]++' | tac > $CONFIGDIR/uzbl/historytmp
mv $CONFIGDIR/uzbl/historytmp $HISTORYFILE
CURRENTLINES=`wc -l "$HISTORYFILE" | awk '{print $1}'`
if [ $CURRENTLINES -gt $MAXHISTORYLENGTH ]; then
    awk 'NR>1' $HISTORYFILE > $CONFIGDIR/uzbl/historytmp
    mv $CONFIGDIR/uzbl/historytmp $HISTORYFILE
fi

WHOLE=`tac $HISTORYFILE | dmenu -b -i`
echo "$WHOLE" >> $HISTORYFILE




if [ "`echo $WHOLE | awk '$0 ~ /^[ ]*$/ {print 1}'`" != 1 ]; then
    FIRST=`echo $WHOLE | awk '{print $1}'`
    SECOND=`echo $WHOLE | awk '{$1="";print}'`

    # figure out what the output should be
    if [ "$SECOND" = "" ]; then
        if [ "`echo $FIRST | awk '$1 ~ /.*\..*/ {print 1}'`" = 1 ]; then
            OUTPUT="$FIRST"
        else
            OUTPUT="$DEFAULT$WHOLE"
        fi
    else
        case "$FIRST" in
        $WIKIKEY     ) OUTPUT="$WIKIPEDIA$SECOND" ;;
        $ARCHWIKIKEY ) OUTPUT="$ARCHWIKI$SECOND"  ;;
        $AURKEY      ) OUTPUT="$AUR$SECOND"       ;;

        $LASTFMKEY   ) OUTPUT="$LASTFM$SECOND"    ;;
        $ISOHUNTKEY  ) OUTPUT="$ISOHUNT$SECOND"   ;;

        *            ) OUTPUT="$DEFAULT$WHOLE"    ;;
        esac
    fi

    # send the output to uzbl / uzblctrl
    if [ "$1" = "n" ]; then
        uzbl -u "$OUTPUT" &
    else    uzblctrl -s $5 -c "uri $OUTPUT" &
    fi
fi

it has a bunch of search engines as well as command history.
my bash skills are less than stellar, so modifications / improvements / cleanups are more than welcome

note that you can do something similar, if you define keybinds like so:
gwiki _ = http://wiki.archlinux.org/index.php/Spe … h=%s&go=Go
gg _ = uri http://www.google.com/search?q=%s
giso _ = ..

with this approach you would type "gg foobar<enter>" to google for foobar.  You don't have history like with your script but I don't think that's really needed for searches. (as long as the pages you actually visit are logged)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#245 2009-05-06 18:50:55

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

Wra!th wrote:
dunz0r wrote:

Can't we use cairo then? Cairo seems pretty nice imo. Maybe get rid of webkit(yes I know this would mean writing all from scratch) and make a "clean" browser. Would imo be totally awesome. This would mean I wouldn't need any widgetkits except ncurses installed.

Cairo IS simpler to use than drawing stuff with Xlib directly..but as with doing it manually,it just handles drawing stuff, not signals etc.You can use Cairo to draw the widgets, but you still need to write a functional widget library for this. All Cairo does is add an extra dependency to the equation.
Also getting rid of webkit is not really a good thing to do. It's by far the simplest complete html rendering engine you can find. Try using Gecko big_smile

read some about webkit and yeah... you're right. although it would be really cool to write your own from the ground up smile


RTFM or GTFO
hax0r.se

Offline

#246 2009-05-06 18:58:18

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: uzbl. A browser that adheres to the unix philosophy.

dunz0r wrote:

read some about webkit and yeah... you're right. although it would be really cool to write your own from the ground up smile

yeah, and years of work wink


ᶘ ᵒᴥᵒᶅ

Offline

#247 2009-05-06 19:34:22

dunz0r
Member
From: Sweden
Registered: 2009-03-30
Posts: 258
Website

Re: uzbl. A browser that adheres to the unix philosophy.

yup. prolly


RTFM or GTFO
hax0r.se

Offline

#248 2009-05-07 00:11:47

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: uzbl. A browser that adheres to the unix philosophy.

Well, im having three issues with uzbl, but i really like it so far, im reallly amazed how fast you guys get to this point smile

1. its weird, i configured uzbl to use ~/.uzbl/scripts dir in ~/.config/uzbl/config but if i press "B" in uzbl it doesn't save the bookmarks in /home/aleyscha/.uzbl/bookmarks

2. The SHIFT+Ins key combination or mid-mouse-button key doesn't work to paste text copied from selecting with the mouse

3. Dark-gtk-theme issue, i dont know what file i need to copy to get readable text boxes, and buttons

thank you guys in advance

# example uzbl config. in a real config, we should obey the xdg spec

# all keys in the behavior group are optional.  if not set, the corresponding behavior is disabed.
# bindings_internal denote keys to trigger actions internally in uzbl
# bindings_external denote keys to trigger scripts outside uzbl

# keyboard behavior is vimstyle by default (all actions -> 1 key). set
# always_insert_mode to always be in insert mode and disable going out of it.
# if you do this, make sure you've set a modkey so you can reach the actions
# from insert mode by combining them with the modkey

[behavior]
history_handler = /home/aleyscha/.uzbl/scripts/history.sh
download_handler = /home/aleyscha/.uzbl/scripts/download.sh
fifo_dir = /tmp
socket_dir = /tmp
always_insert_mode = 0
modkey = Mod1
show_status = 1
status_top = 0

[bindings]
# scroll down/up/left/right
j = scroll_vert 20
k = scroll_vert -20
h = scroll_horz -20
l = scroll_horz 20
b = back
m = forward
s = stop
r = refresh
R = reload
f = follow_link_here
F = follow_link_new_tab
w = follow_link_new_window
+ = zoom_in
- = zoom_out
t = toggle_status
gh      = uri http://www.uzbl.org
o _     = uri %s
:wiki _ = uri http://wiki.archlinux.org/index.php/Special:Search?search=%s&go=Go
gg _    = uri http://www.google.com/search?q=%s
i = insert_mode
B = spawn /home/aleyscha/.uzbl/scripts/insert_bookmark.sh
u = spawn /home/aleyscha/.uzbl/scripts/load_url_from_history.sh
U = spawn /home/aleyscha/.uzbl/scripts/load_url_from_bookmarks.sh
ZZ = exit


[network]
proxy_server = 
#values 0-3
http_debug = 0
user-agent = uzbl
max_conns =
max_conns_per_host =

And /home/aleyscha/.uzbl/scripts/insert_bookmark.sh

#!/bin/bash
# you probably want your bookmarks file in your $XDG_DATA_HOME ( eg $HOME/.local/share/uzbl/bookmarks)

if [ -f $HOME/.uzbl/bookmarks ]
then
    file=$HOME/.uzbl/bookmarks # you will probably get permission denied errors here. pick a file in your ~
else
    file=./examples/bookmarks #useful when developing
fi

which zenity &>/dev/null || exit 2

entry=`zenity --entry --text="Add bookmark. add tags at the end, separated by commas" --entry-text="$6"`
url=`awk '{print $1}' <<< $entry`
# TODO: check if already exists, if so, and tags are different: ask if you want to replace tags
echo "$entry" >> $file

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#249 2009-05-07 20:35:09

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: uzbl. A browser that adheres to the unix philosophy.

leo2501 wrote:

1. its weird, i configured uzbl to use ~/.uzbl/scripts dir in ~/.config/uzbl/config but if i press "B" in uzbl it doesn't save the bookmarks in /home/aleyscha/.uzbl/bookmarks

Maybe you should touch the bookmarks file .


English is not my native language .

Offline

#250 2009-05-07 22:15:24

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: uzbl. A browser that adheres to the unix philosophy.

Nezmer wrote:
leo2501 wrote:

1. its weird, i configured uzbl to use ~/.uzbl/scripts dir in ~/.config/uzbl/config but if i press "B" in uzbl it doesn't save the bookmarks in /home/aleyscha/.uzbl/bookmarks

Maybe you should touch the bookmarks file .

i tried that and same behavior


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

Board footer

Powered by FluxBB