dotfiles

My dotfiles for Arch Linux
Log | Files | Refs | README

surf_bookmarkurl (349B)


      1 #!/bin/sh
      2 file=~/.surf/bookmarks
      3 tmp_file=~/.surf/bookmarks_new
      4 url=`xprop -id $1 | grep URI | awk '{print $3}' | sed 's/\"//g'`
      5 title=`xprop -id $1 | grep WM_ICON_NAME\(STRING\) | cut -c 40- | sed 's/.$//g'`
      6 echo $url $title | dmenu -c -p 'Add Bookmark' -l 50 -w $1 -fn 'Sans:size=11' >> $file
      7 cat $file | sort -u > $tmp_file && mv $tmp_file $file