summaryrefslogtreecommitdiffstats
path: root/viewdactyl
diff options
context:
space:
mode:
Diffstat (limited to 'viewdactyl')
-rwxr-xr-xviewdactyl13
1 files changed, 13 insertions, 0 deletions
diff --git a/viewdactyl b/viewdactyl
new file mode 100755
index 0000000..323fa07
--- /dev/null
+++ b/viewdactyl
@@ -0,0 +1,13 @@
+#!/bin/zsh
+url="$1"
+hurl="$2"
+hurl=$hurl:t
+line=$(/usr/bin/w3m -dump $url | awk "/$hurl/ { print NR; exit; }")
+[[ -z $line ]] && line=30
+echo $hurl | xclip -i
+if pidof w3m;then
+ winum=$(~/bin/tux tnum w3m)
+ tmux send-keys -t uake:$winum 'C-c' 'T' "$url" 'Enter' ":$line" 'Enter'
+else
+ tmux new-window -t uake "/usr/bin/w3m +$line $url"
+fi