Skip to content

How to use relative paths for icon? #7

Answered by GitHub30
qianxuu asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for your comment. You can make it an absolute path with Pathlib.

from pathlib import Path
from win11toast import toast

toast('icon', icon=str(Path('RazerIcon.ico').resolve()))

or use http url

from win11toast import toast

toast(icon='https://raw.githubusercontent.com/iTZUNAMI/ahk-razersynapse3-deamon/master/RazerIcon.ico', app_id='Microsoft.WindowsTerminal_8wekyb3d8bbwe!App')

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
2 replies
@qianxuu
Comment options

@GitHub30
Comment options

Answer selected by qianxuu
Comment options

You must be logged in to vote
6 replies
@gmandian
Comment options

@GitHub30
Comment options

@gmandian
Comment options

@GitHub30
Comment options

@gmandian
Comment options

Comment options

You must be logged in to vote
2 replies
@SurajBhari
Comment options

@SurajBhari
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants