aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsurfraw.sh11
-rwxr-xr-xtmuxRanger.sh5
2 files changed, 16 insertions, 0 deletions
diff --git a/surfraw.sh b/surfraw.sh
new file mode 100755
index 0000000..26ae66d
--- /dev/null
+++ b/surfraw.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Do stuff using surfraw. Take back internet browsing from evil.
+
+search=$(echo "" | dmenu -p "Search:")
+[ "$search" ] || exit 0
+dunstify "Searching $search"
+target="$(ddgr --json "$search" | grep -E '"title": |"url": ' | sed '/"title": / N;s/\n//g' | awk '-F ["]' '{print $3 "[" $5 "]" }' | sed 's/"//g;s/,\s*\[/ \[/' | dmenu -i -l 10 -p "Target:" | awk '-F [[]' '{print $2}' | sed 's/]\s*$//')"
+dunstify "Trying to play result of $target"
+dunstify "Url: $target"
+mpv "$target" || qutebrowser "$target" || dunstify "URL not valid."
diff --git a/tmuxRanger.sh b/tmuxRanger.sh
new file mode 100755
index 0000000..0f81ab0
--- /dev/null
+++ b/tmuxRanger.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Opens a file with nvim in a new tmux pane
+
+tmux new-window -a -t 0 -n nvim "nvim $1"