set title detection in config file
This commit is contained in:
parent
9e23626764
commit
19689bd4b3
@ -16,8 +16,21 @@ BROWSER='chromium'
|
|||||||
|
|
||||||
help_color="#0C73C2"
|
help_color="#0C73C2"
|
||||||
|
|
||||||
## rofi expects a root directory in your basedir
|
# get active URL from browser
|
||||||
## underneath this directory all your password groups
|
# Chose the one for your browser or create your own.
|
||||||
## are stored inside directories.
|
|
||||||
## if you don't want to separate roots, enable this setting
|
# chromium - needs url in title extension
|
||||||
#root=.
|
# https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb
|
||||||
|
# set string to "{protocol}://{hostname}{port}/{path}/{args}"
|
||||||
|
domain () {
|
||||||
|
wmctrl -l | grep Chromium | awk '{print $(NF-2)}'
|
||||||
|
}
|
||||||
|
|
||||||
|
# firefox - needs Add URL to Window Title extension
|
||||||
|
# https://addons.mozilla.org/en-US/firefox/addon/add-url-to-window-title/
|
||||||
|
# set delimiter to "::"
|
||||||
|
|
||||||
|
# domain () {
|
||||||
|
# wmctrl -l | grep Firefox | grep "::" | awk '{print $(NF-3)}'
|
||||||
|
# }
|
||||||
|
|
||||||
|
13
rofi-pass
13
rofi-pass
@ -215,16 +215,9 @@ insertPass2 () {
|
|||||||
|
|
||||||
elif [[ $menu == "2 URL"* ]]; then
|
elif [[ $menu == "2 URL"* ]]; then
|
||||||
HELP="<span color='$help_color'>Enter Domain Name or chose one of the Options below</span>"
|
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 Chromium Tab\nGet URL from active Firefox Tab" | rofi -dmenu -mesg "${HELP}" -p "URL > ")
|
domain=$(echo -e "< Return\n---\nGet URL from active Browser Tab" | rofi -dmenu -mesg "${HELP}" -p "URL > ")
|
||||||
if [[ $domain == "Get URL from active Chromium Tab" ]]; then
|
if [[ $domain == "Get URL from active Browser Tab" ]]; then
|
||||||
# use url in title chrome extension with format: "{protocol}://{hostname}{port}/{path}/{args}"
|
domain=$(domain)
|
||||||
# https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb?utm_source=chrome-app-launcher-info-dialog
|
|
||||||
domain=$(wmctrl -l | grep Chromium | awk '{print $(NF-2)}')
|
|
||||||
insertPass2
|
|
||||||
elif [[ $domain == "Get URL from active Firefox Tab" ]]; then
|
|
||||||
# https://addons.mozilla.org/en-uS/firefox/addon/add-url-to-window-title/
|
|
||||||
# set "Show full URL" in preferences and separator to "::"
|
|
||||||
domain=$(wmctrl -l | grep Firefox | grep "::" | awk '{print $(NF-3)}')
|
|
||||||
insertPass2
|
insertPass2
|
||||||
elif [[ $domain == "< Return" ]]; then
|
elif [[ $domain == "< Return" ]]; then
|
||||||
insertPass2
|
insertPass2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user