Created
June 16, 2020 20:26
-
-
Save trygveaa/4487f57759246ab9733616bb9199b302 to your computer and use it in GitHub Desktop.
Kitty kitten to download an image url and display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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