Skip to content

Instantly share code, notes, and snippets.

@trygveaa
Created June 16, 2020 20:26
Show Gist options
  • Save trygveaa/4487f57759246ab9733616bb9199b302 to your computer and use it in GitHub Desktop.
Save trygveaa/4487f57759246ab9733616bb9199b302 to your computer and use it in GitHub Desktop.
Kitty kitten to download an image url and display
from kittens.hints.main import main as hints
from kittens.icat.main import main as icat
from kitty.utils import screen_size_function
import time
screen_size = screen_size_function()
def main(args):
ss = screen_size()
hints_result = hints('')
url = hints_result['match'][0]
icat(['', '--place', f'{ss.cols}x{ss.rows}@0x0', url])
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment