remove ugly hack to get urls from browser

This commit is contained in:
Rasmus Steinke 2015-08-21 16:26:11 +02:00
parent 6f575cfe1a
commit 7be7f2a900
3 changed files with 3 additions and 25 deletions

View File

@ -1,8 +0,0 @@
# get active URL from browser
# Chose the one for your browser or create your own.
# chromium - needs url in title extension
# https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb
# set string to "{protocol}://{hostname}{port}/{path}/{args}"
wmctrl -l | grep Chromium | awk '{ print $4 }'

View File

@ -1,5 +0,0 @@
# firefox - needs Add URL to Window Title extension
# https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/
# set delimiter to "::"
wmctrl -l | grep Firefox | grep "::" | awk '{print $(NF-3)}'

View File

@ -9,12 +9,6 @@ shopt -s nullglob globstar
# read global config file
source /etc/rofi-pass.conf
# import parsers to local config directory
if [[ ! -d $HOME/.config/rofi-pass/parsers ]]; then
mkdir $HOME/.config/rofi-pass/parsers
cp /usr/share/doc/rofi-pass/parsers/* $HOME/.config/rofi-pass/parsers
fi
# check if local config exists and load it
if [[ -f $HOME/.config/rofi-pass/config ]]; then
source $HOME/.config/rofi-pass/config
@ -278,12 +272,9 @@ insertPass () {
insertPass
elif [[ $menu == "2 URL"* ]]; then
HELP="<span color='$help_color'>Enter Domain Name or chose one of the Options below</span>"
domain=$(echo -e "< Return\n---\nGet URL from active Browser Tab" | _rofi -dmenu -mesg "${HELP}" -p "URL > ")
if [[ $domain == "Get URL from active Browser Tab" ]]; then
domain=$($HOME/.config/rofi-pass/parsers/$BROWSER)
insertPass
elif [[ $domain == "< Return" ]]; then
HELP="<span color='$help_color'>Enter Domain Name</span>"
domain=$(echo -e "< Return" | _rofi -dmenu -mesg "${HELP}" -p "URL > ")
if [[ $domain == "< Return" ]]; then
insertPass
elif [[ $domain == "" ]]; then
exit