mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
Compare commits
No commits in common. "0d82ed488bdbb1c3612c437c8d57f5dc3ecb812f" and "e5d942e860c653ee44b473b4cd9552e7802b83c1" have entirely different histories.
0d82ed488b
...
e5d942e860
2 changed files with 23 additions and 25 deletions
|
@ -63,27 +63,26 @@ def emote_downloader_and_iterator():
|
|||
chosen_index = common_script_utils.run_chooser(
|
||||
emote_downloader_and_iterator(), prompt="emote", async_read=True
|
||||
)
|
||||
if chosen_index >= 0:
|
||||
chosen_emote = emotes[chosen_index]
|
||||
chosen_emote = emotes[chosen_index]
|
||||
|
||||
emote_url = urllib.parse.urlparse(chosen_emote["url"])
|
||||
emote_url_query = urllib.parse.parse_qs(emote_url.query)
|
||||
emote_url = urllib.parse.urlparse(chosen_emote["url"])
|
||||
emote_url_query = urllib.parse.parse_qs(emote_url.query)
|
||||
|
||||
if config.getboolean("default", "add_emote_name_to_url", fallback=False):
|
||||
emote_url_query["name"] = [chosen_emote["name"]]
|
||||
if config.getboolean("default", "add_emote_name_to_url", fallback=False):
|
||||
emote_url_query["name"] = [chosen_emote["name"]]
|
||||
|
||||
default_emote_image_size = config.getint(
|
||||
"default", "default_emote_image_size", fallback=None
|
||||
)
|
||||
if default_emote_image_size is not None:
|
||||
emote_url_query["size"] = [str(default_emote_image_size)]
|
||||
default_emote_image_size = config.getint(
|
||||
"default", "default_emote_image_size", fallback=None
|
||||
)
|
||||
if default_emote_image_size is not None:
|
||||
emote_url_query["size"] = [str(default_emote_image_size)]
|
||||
|
||||
emote_url_query = urllib.parse.urlencode(emote_url_query, doseq=True)
|
||||
emote_url = urllib.parse.urlunparse(emote_url._replace(query=emote_url_query))
|
||||
emote_url_query = urllib.parse.urlencode(emote_url_query, doseq=True)
|
||||
emote_url = urllib.parse.urlunparse(emote_url._replace(query=emote_url_query))
|
||||
|
||||
common_script_utils.set_clipboard(emote_url)
|
||||
common_script_utils.set_clipboard(emote_url)
|
||||
|
||||
common_script_utils.send_notification(
|
||||
os.path.basename(__file__),
|
||||
"copied URL of {} to clipboard!".format(chosen_emote["ref"]),
|
||||
)
|
||||
common_script_utils.send_notification(
|
||||
os.path.basename(__file__),
|
||||
"copied URL of {} to clipboard!".format(chosen_emote["ref"]),
|
||||
)
|
||||
|
|
|
@ -110,11 +110,10 @@ chosen_index = common_script_utils.run_chooser(
|
|||
chooser_entries_iter(), prompt="bookmark"
|
||||
)
|
||||
|
||||
if chosen_index >= 0:
|
||||
_title, url, _folder_path_str = chooser_entries[chosen_index]
|
||||
print(url)
|
||||
_title, url, _folder_path_str = chooser_entries[chosen_index]
|
||||
print(url)
|
||||
|
||||
common_script_utils.set_clipboard(url)
|
||||
common_script_utils.send_notification(
|
||||
os.path.basename(__file__), "bookmark URL copied to clipboard!", url
|
||||
)
|
||||
common_script_utils.set_clipboard(url)
|
||||
common_script_utils.send_notification(
|
||||
os.path.basename(__file__), "bookmark URL copied to clipboard!", url
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue