Ubuntuの通知はDeleteで消す.md
This file contains hidden or 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
| import os | |
| import pathlib | |
| import datetime | |
| os.chdir(os.path.dirname(os.path.realpath(__file__))) | |
| pathlib.Path(datetime.datetime.now().strftime("%Y%m%dT%H%M%S")).touch() |
This file contains hidden or 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
| import winsdk.windows.ui.notifications as notifications | |
| import winsdk.windows.data.xml.dom as dom | |
| from winsdk.windows.ui.notifications import ToastActivatedEventArgs, ToastDismissedEventArgs, ToastFailedEventArgs | |
| # create notifier | |
| nManager = notifications.ToastNotificationManager | |
| notifier = nManager.create_toast_notifier() | |
| # define your notification as string | |
| tString = """ |
This file contains hidden or 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 win10toast import ToastNotifier | |
| toaster = ToastNotifier() | |
| toaster.show_toast("Example two", | |
| "This notification is in it's own thread!", | |
| icon_path=None, | |
| duration=5, | |
| threaded=True) |
This file contains hidden or 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
| # pip install winsdk_toast | |
| from winsdk_toast import Notifier, Toast | |
| notifier = Notifier('程序名 applicationId') | |
| toast = Toast() | |
| toast.add_text('第一行 1st line') | |
| toast.add_action('Button') | |
| notifier.show(toast, handle_activated=lambda x: print(x)) |
This file contains hidden or 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
| xml.match(/github.com\/[\w-]+\/[\w-]+/g) | |
| xml.match(/github.io/g) |
This file contains hidden or 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
| // https://github.com/search?q=applicationServerKey+publicKey&type=code | |
| // https://github.com/gauntface/simple-push-demo/blob/bee57021049dbfbba987a74de5bd01d5a9e96a0f/frontend/scripts/encryption/helpers.js | |
| function base64UrlToUint8Array(base64UrlData) { | |
| const padding = '='.repeat((4 - base64UrlData.length % 4) % 4); | |
| const base64 = (base64UrlData + padding) | |
| .replace(/-/g, '+') | |
| .replace(/_/g, '/'); | |
| const rawData = window.atob(base64); |
This file contains hidden or 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
| Notification.requestPermission() | |
| new Notification("こんにちは!") |
- バックグラウンドアプリ すべてオフ
- パフォーマンスオプション - カスタム
- スクリーンフォントの縁を滑らかにする
- スタートアップアプリ すべてオフ