Skip to content

Commit

Permalink
Merge 2d9d64e into 168c753
Browse files Browse the repository at this point in the history
  • Loading branch information
filantus committed Apr 27, 2024
2 parents 168c753 + 2d9d64e commit 4c61a04
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ahk/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,21 @@ class Warn(Directive):

class WinActivateForce(Directive):
pass


class TrayTip(Directive):
def __init__(self, text: str, **kwargs: Any):
if not isinstance(text, str):
raise TypeError('Parameter "text" must be a string.')

self.text: str = text.replace('"', '').replace('\n', ' ')

super().__init__(**kwargs)

def __str__(self) -> str:
return f'A_IconTip := "{self.text}"'


class ExecutorTrayTip(TrayTip):
def __init__(self, text: str, **kwargs: Any):
super().__init__(text=text, **kwargs, apply_to_hotkeys_process=True)

0 comments on commit 4c61a04

Please sign in to comment.