From 7be7f2a900501183ab4e1faea0be437a2d6cc905 Mon Sep 17 00:00:00 2001 From: Rasmus Steinke Date: Fri, 21 Aug 2015 16:26:11 +0200 Subject: [PATCH] remove ugly hack to get urls from browser --- parsers/chromium | 8 -------- parsers/firefox | 5 ----- rofi-pass | 15 +++------------ 3 files changed, 3 insertions(+), 25 deletions(-) delete mode 100755 parsers/chromium delete mode 100755 parsers/firefox diff --git a/parsers/chromium b/parsers/chromium deleted file mode 100755 index ed40b69..0000000 --- a/parsers/chromium +++ /dev/null @@ -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 }' diff --git a/parsers/firefox b/parsers/firefox deleted file mode 100755 index c24d11f..0000000 --- a/parsers/firefox +++ /dev/null @@ -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)}' diff --git a/rofi-pass b/rofi-pass index b01d9ae..0678819 100755 --- a/rofi-pass +++ b/rofi-pass @@ -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="Enter Domain Name or chose one of the Options below" - 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="Enter Domain Name" + domain=$(echo -e "< Return" | _rofi -dmenu -mesg "${HELP}" -p "URL > ") + if [[ $domain == "< Return" ]]; then insertPass elif [[ $domain == "" ]]; then exit