commit 7245a6cb53c4b1acd2e741b1d443cd95d8ed3c14
Author: efe <efe_AT_efe.kim>
Date: Thu Dec 13 09:44:26 2018 -0500
dmenu/scripts: remove my script since I now host it on my website
diff --git a/tools.suckless.org/dmenu/scripts/dmenu_websearch b/tools.suckless.org/dmenu/scripts/dmenu_websearch
deleted file mode 100755
index 5f3ecef7..00000000
--- a/tools.suckless.org/dmenu/scripts/dmenu_websearch
+++ /dev/null
_AT_@ -1,71 +0,0 @@
-#!/bin/sh
-
-# title: dmenu_websearch
-# license: CC0
-# author: Sunur Efe Vural <efe_AT_efe.kim>
-# version: 28/11/2018
-# some dependencies: dmenu, xdotool, hexdump, xprop, pstree, setxkbmap
-
-# dmenu_websearch is a browser-independent address bar with bookmark
-# support. If the cursor is focused on a web browser it acts as the
-# address bar of that browser.
-
-browser="$TERMINAL -e $BROWSERCLI"
-homepage=$WWW_HOME
-bookmarks_file=$HOME/.bookmarks #url per line
-search_engine="
https://duckduckgo.com/lite/?q=%s"
-
-openchoice() {
- if [ "$windowid" != "notabrowser" ]
- then
- #change layout to us cuz xdotool spasms with non-latin layouts
- layout=`setxkbmap -query | awk '/^layout:/{ print $2 }'`
- setxkbmap -layout us
- xdotool key --clearmodifiers $shortcut\
- type --clearmodifiers --delay 2 "$choice"
- xdotool key --clearmodifiers Return
- setxkbmap -layout $layout
- else $browser $choice
- fi
-}
-
-searchweb() {
- #convert search term to percent encoding
- choice=`echo $choice | hexdump -v -e '/1 " %02x"' | sed 's/ 0a$//'`
- #insert search term into the search engine url
- choice=`echo $search_engine | sed "s/%s/$choice/;y/ /%/"`
- openchoice
-}
-
-#get termprocess for text browsers and windowclass for gui browsers.
-windowid=`xprop -root _NET_ACTIVE_WINDOW | awk '{print $5}'`
-if [ "$windowid" != "" ]
-then
- processid=`xprop -id "$windowid" _NET_WM_PID | awk '{print $3}'`
- termprocess=`pstree -Al "$processid" | awk -F "---" '{print $NF}'`
- windowclass=`xprop -id "$windowid" WM_CLASS | grep -o '".*"'`
-fi
-
-#get the shortcut to open address bar for each browser
-if echo "$windowclass" | grep -i \
-"firefox\|chromium\|vivaldi\|opera\|chrome\|netsurf\|arora\|epiphany\
-\|midori\|dillo\|konqueror\|brave\|palemoon\|iceweasel\|icecat"
-then shortcut="ctrl+l"
-elif echo "$windowclass" | grep -i "luakit\|qutebrowser\|uzbl"
-then shortcut="o"
-elif echo "$windowclass $termprocess" | grep -i "links\|lynx\|conkeror"
-then shortcut="g"
-elif echo "$termprocess" | grep -i "w3m"
-then shortcut="U"
-else windowid=notabrowser
-fi
-
-choice=`grep -v "^#" $bookmarks_file\
- | dmenu -i -w $windowid -p "Enter URL or search term:"` || exit 1
-
-if echo "$choice" | grep -EZ\
- "^(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*"
-then choice=`echo $choice | awk -F" " '{ print $1 }'`
- openchoice
-else searchweb
-fi
diff --git a/tools.suckless.org/dmenu/scripts/index.md b/tools.suckless.org/dmenu/scripts/index.md
index 64980fa4..6c7b8a6e 100644
--- a/tools.suckless.org/dmenu/scripts/index.md
+++ b/tools.suckless.org/dmenu/scripts/index.md
_AT_@ -26,4 +26,4 @@ Download
dmenu_run alternative with command history
* [dbdb.sh](dbdb.sh): dmenu-based directory browser
* [via](
https://github.com/xalexalex/via): simple dmenu-based launcher for apps, files, folders and shell commands
-* [dmenu_websearch](dmenu_websearch): browser independent address bar
+* [dmenu_websearch](
http://efe.kim/files/scripts/dmenu_websearch): browser independent address bar
Received on Thu Dec 13 2018 - 15:47:53 CET