diff --git a/.config/bootstrap/config_common b/.config/bootstrap/config_common index 6a25cd4..6966954 100644 --- a/.config/bootstrap/config_common +++ b/.config/bootstrap/config_common @@ -48,6 +48,7 @@ ttf-font-awesome-5 ttf-material-icons-git ttf-symbola ttf-weather-icons +unzip usb_modeswitch vim vscodium-bin diff --git a/.config/i3/scripts/screenshot.py b/.config/i3/scripts/screenshot.py index 008bec1..94e2907 100755 --- a/.config/i3/scripts/screenshot.py +++ b/.config/i3/scripts/screenshot.py @@ -90,7 +90,7 @@ def upload_image(client, album_id, binary_img, img_format): return client.add_photo(binary_img, str(uuid.uuid4()) + '.' + img_format, album_id) def get_image_direct_link(client, image_id): - return SCREENSHOT_CONFIG['base_url'] + '/' + client.get_photo(image_id)['url'] + return 'https://pic.chosto.me' + '/' + client.get_photo(image_id)['size_variants']['original']['url'] def main(argv): upload, save, path = read_args(argv) @@ -108,8 +108,8 @@ def main(argv): if upload: s = login() album_id = get_album_id(s, SCREENSHOT_CONFIG['album_name']) - image_id = upload_image(s, album_id, img, img_format) - image_link = get_image_direct_link(s, image_id) + image_info = upload_image(s, album_id, img, img_format) + image_link = get_image_direct_link(s, image_info['id']) pyperclip.copy(image_link) subprocess.run(['notify-send', '-u', 'low', '-i', 'Info', '-a', 'Screenchost', 'Screenshot uploaded', 'Link copied to clipboard!']) except subprocess.CalledProcessError as e: