forked from solderpunk/AV-98
Put bookmark and rc files in same location as certificates.
This commit is contained in:
parent
34cfa54de6
commit
0d49b3e859
10
av98.py
10
av98.py
|
@ -1085,17 +1085,17 @@ Use 'ls -l' to see URLs."""
|
||||||
@needs_gi
|
@needs_gi
|
||||||
def do_add(self, line):
|
def do_add(self, line):
|
||||||
"""Add the current URL to the bookmarks menu.
|
"""Add the current URL to the bookmarks menu.
|
||||||
Bookmarks are stored in the ~/.av98-bookmarks.txt file.
|
Bookmarks are stored in the ~/.av98/bookmarks.txt file.
|
||||||
Optionally, specify the new name for the bookmark."""
|
Optionally, specify the new name for the bookmark."""
|
||||||
with open(os.path.expanduser("~/.av98-bookmarks.txt"), "a") as fp:
|
with open(os.path.expanduser("~/.av98/bookmarks.txt"), "a") as fp:
|
||||||
fp.write(self.gi.to_map_line(line))
|
fp.write(self.gi.to_map_line(line))
|
||||||
|
|
||||||
def do_bookmarks(self, line):
|
def do_bookmarks(self, line):
|
||||||
"""Show or access the bookmarks menu.
|
"""Show or access the bookmarks menu.
|
||||||
'bookmarks' shows all bookmarks.
|
'bookmarks' shows all bookmarks.
|
||||||
'bookmarks n' navigates immediately to item n in the bookmark menu.
|
'bookmarks n' navigates immediately to item n in the bookmark menu.
|
||||||
Bookmarks are stored in the ~/.av98-bookmarks.txt file using the 'add' command."""
|
Bookmarks are stored in the ~/.av98/bookmarks.txt file using the 'add' command."""
|
||||||
bm_file = os.path.expanduser("~/.av98-bookmarks.txt")
|
bm_file = os.path.expanduser("~/.av98/bookmarks.txt")
|
||||||
if not os.path.exists(bm_file):
|
if not os.path.exists(bm_file):
|
||||||
print("You need to 'add' some bookmarks, first!")
|
print("You need to 'add' some bookmarks, first!")
|
||||||
return
|
return
|
||||||
|
@ -1169,7 +1169,7 @@ current gemini browsing session."""
|
||||||
|
|
||||||
# Config file finder
|
# Config file finder
|
||||||
def get_rcfile():
|
def get_rcfile():
|
||||||
rc_paths = ("~/.config/av98/av98rc", "~/.config/.av98rc", "~/.av98rc")
|
rc_paths = ("~/.config/av98/av98rc", "~/.av98/av98rc")
|
||||||
for rc_path in rc_paths:
|
for rc_path in rc_paths:
|
||||||
rcfile = os.path.expanduser(rc_path)
|
rcfile = os.path.expanduser(rc_path)
|
||||||
if os.path.exists(rcfile):
|
if os.path.exists(rcfile):
|
||||||
|
|
Loading…
Reference in New Issue