fullscreen-message 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fullscreen_message-1.0.0/PKG-INFO +55 -0
- fullscreen_message-1.0.0/README.md +30 -0
- fullscreen_message-1.0.0/fullscreen_message/__init__.py +0 -0
- fullscreen_message-1.0.0/fullscreen_message/main.py +100 -0
- fullscreen_message-1.0.0/fullscreen_message.egg-info/PKG-INFO +55 -0
- fullscreen_message-1.0.0/fullscreen_message.egg-info/SOURCES.txt +9 -0
- fullscreen_message-1.0.0/fullscreen_message.egg-info/dependency_links.txt +1 -0
- fullscreen_message-1.0.0/fullscreen_message.egg-info/entry_points.txt +2 -0
- fullscreen_message-1.0.0/fullscreen_message.egg-info/top_level.txt +1 -0
- fullscreen_message-1.0.0/pyproject.toml +37 -0
- fullscreen_message-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fullscreen-message
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A command-line tool to show big messages across the entire screen in a GUI
|
|
5
|
+
Author-email: "@readwithai" <talwrii@googlemail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/talwrii/fullscreen-message
|
|
8
|
+
Project-URL: Issues, https://github.com/talwrii/fullscreen-message/issues
|
|
9
|
+
Keywords: notification,message,fullscreen,alert,display
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.7
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# fullscreen-message
|
|
27
|
+
**@readwithai** - [X](https://x.com/readwithai) - [blog](https://readwithai.substack.com/) - [machine-aided reading](https://www.reddit.com/r/machineAidedReading/) - [📖](https://readwithai.substack.com/p/what-is-reading-broadly-defined
|
|
28
|
+
)[⚡️](https://readwithai.substack.com/s/technical-miscellany)[🖋️](https://readwithai.substack.com/p/note-taking-with-obsidian-much-of)
|
|
29
|
+
|
|
30
|
+
A command-line tool to show big messages across the entire screen which can be closed with any key press.
|
|
31
|
+
|
|
32
|
+
## Motivation
|
|
33
|
+
Finding notifications at the side of your screen can be a pain. It *is* useful when multitasking but sometimes you want somethign simple.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
You can install fullscreen-message using [pipx](https://github.com/pypa/pipx):
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
Show hello world across the whole screen:
|
|
40
|
+
```
|
|
41
|
+
fullscreen-message 'Hello world'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Alternatives and prior work
|
|
45
|
+
I found a PyPI package called [fullscreen-alert](https://pypi.org/project/fullscreen-alert/) which does somethign similar, but it didn't have my documentation and seemed to be a module rather than a command-line tool.
|
|
46
|
+
|
|
47
|
+
For the shell, you tools like [figlet](http://www.figlet.org/) to draw big messages.
|
|
48
|
+
|
|
49
|
+
## About me
|
|
50
|
+
I am **@readwithai**. I create tools for reading, research and agency sometimes using the markdown editor [Obsidian](https://readwithai.substack.com/p/what-exactly-is-obsidian).
|
|
51
|
+
|
|
52
|
+
I also create a [stream of tools](https://readwithai.substack.com/p/my-productivity-tools) that are related to carrying out my work.
|
|
53
|
+
|
|
54
|
+
I write about lots of things - including tools like this - on [X](https://x.com/readwithai).
|
|
55
|
+
My [blog](https://readwithai.substack.com/) is more about reading and research and agency.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# fullscreen-message
|
|
2
|
+
**@readwithai** - [X](https://x.com/readwithai) - [blog](https://readwithai.substack.com/) - [machine-aided reading](https://www.reddit.com/r/machineAidedReading/) - [📖](https://readwithai.substack.com/p/what-is-reading-broadly-defined
|
|
3
|
+
)[⚡️](https://readwithai.substack.com/s/technical-miscellany)[🖋️](https://readwithai.substack.com/p/note-taking-with-obsidian-much-of)
|
|
4
|
+
|
|
5
|
+
A command-line tool to show big messages across the entire screen which can be closed with any key press.
|
|
6
|
+
|
|
7
|
+
## Motivation
|
|
8
|
+
Finding notifications at the side of your screen can be a pain. It *is* useful when multitasking but sometimes you want somethign simple.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
You can install fullscreen-message using [pipx](https://github.com/pypa/pipx):
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
Show hello world across the whole screen:
|
|
15
|
+
```
|
|
16
|
+
fullscreen-message 'Hello world'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Alternatives and prior work
|
|
20
|
+
I found a PyPI package called [fullscreen-alert](https://pypi.org/project/fullscreen-alert/) which does somethign similar, but it didn't have my documentation and seemed to be a module rather than a command-line tool.
|
|
21
|
+
|
|
22
|
+
For the shell, you tools like [figlet](http://www.figlet.org/) to draw big messages.
|
|
23
|
+
|
|
24
|
+
## About me
|
|
25
|
+
I am **@readwithai**. I create tools for reading, research and agency sometimes using the markdown editor [Obsidian](https://readwithai.substack.com/p/what-exactly-is-obsidian).
|
|
26
|
+
|
|
27
|
+
I also create a [stream of tools](https://readwithai.substack.com/p/my-productivity-tools) that are related to carrying out my work.
|
|
28
|
+
|
|
29
|
+
I write about lots of things - including tools like this - on [X](https://x.com/readwithai).
|
|
30
|
+
My [blog](https://readwithai.substack.com/) is more about reading and research and agency.
|
|
File without changes
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Display fullscreen messages that close on keypress."""
|
|
3
|
+
import tkinter as tk
|
|
4
|
+
import tkinter.font as tkfont
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def find_optimal_font_size(text, screen_width, screen_height, font_family='Arial'):
|
|
9
|
+
"""Find the largest font size that fits the text on screen.
|
|
10
|
+
|
|
11
|
+
Args:
|
|
12
|
+
text: Text to display
|
|
13
|
+
screen_width: Screen width in pixels
|
|
14
|
+
screen_height: Screen height in pixels
|
|
15
|
+
font_family: Font family to use
|
|
16
|
+
|
|
17
|
+
Returns:
|
|
18
|
+
Optimal font size in points
|
|
19
|
+
"""
|
|
20
|
+
# Target: fill 80% of screen width and 60% of height
|
|
21
|
+
target_width = screen_width * 0.8
|
|
22
|
+
target_height = screen_height * 0.6
|
|
23
|
+
|
|
24
|
+
# Binary search for optimal font size
|
|
25
|
+
min_size = 10
|
|
26
|
+
max_size = 1000
|
|
27
|
+
optimal_size = min_size
|
|
28
|
+
|
|
29
|
+
# Create a temporary root for font measurements
|
|
30
|
+
temp_root = tk.Tk()
|
|
31
|
+
temp_root.withdraw()
|
|
32
|
+
|
|
33
|
+
while min_size <= max_size:
|
|
34
|
+
mid_size = (min_size + max_size) // 2
|
|
35
|
+
|
|
36
|
+
# Create font and measure text
|
|
37
|
+
font = tkfont.Font(family=font_family, size=mid_size, weight='bold')
|
|
38
|
+
text_width = font.measure(text)
|
|
39
|
+
text_height = font.metrics('linespace')
|
|
40
|
+
|
|
41
|
+
# Check if it fits
|
|
42
|
+
if text_width <= target_width and text_height <= target_height:
|
|
43
|
+
optimal_size = mid_size
|
|
44
|
+
min_size = mid_size + 1
|
|
45
|
+
else:
|
|
46
|
+
max_size = mid_size - 1
|
|
47
|
+
|
|
48
|
+
temp_root.destroy()
|
|
49
|
+
|
|
50
|
+
return optimal_size
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def show_fullscreen_message(message, bg_color="black", text_color="white"):
|
|
54
|
+
"""Display a fullscreen message that closes on any key press.
|
|
55
|
+
|
|
56
|
+
Args:
|
|
57
|
+
message: Text to display
|
|
58
|
+
bg_color: Background color (default: black)
|
|
59
|
+
text_color: Text color (default: white)
|
|
60
|
+
"""
|
|
61
|
+
root = tk.Tk()
|
|
62
|
+
root.attributes('-fullscreen', True)
|
|
63
|
+
root.configure(background=bg_color)
|
|
64
|
+
|
|
65
|
+
# Get screen dimensions
|
|
66
|
+
screen_width = root.winfo_screenwidth()
|
|
67
|
+
screen_height = root.winfo_screenheight()
|
|
68
|
+
|
|
69
|
+
# Find optimal font size
|
|
70
|
+
font_size = find_optimal_font_size(message, screen_width, screen_height)
|
|
71
|
+
|
|
72
|
+
# Close on any key press or Escape
|
|
73
|
+
root.bind('<Key>', lambda e: root.destroy())
|
|
74
|
+
root.bind('<Escape>', lambda e: root.destroy())
|
|
75
|
+
|
|
76
|
+
# Create label with message
|
|
77
|
+
label = tk.Label(
|
|
78
|
+
root,
|
|
79
|
+
text=message,
|
|
80
|
+
font=('Arial', font_size, 'bold'),
|
|
81
|
+
bg=bg_color,
|
|
82
|
+
fg=text_color
|
|
83
|
+
)
|
|
84
|
+
label.pack(expand=True)
|
|
85
|
+
|
|
86
|
+
root.mainloop()
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def main():
|
|
90
|
+
"""Main entry point for the CLI."""
|
|
91
|
+
if len(sys.argv) > 1:
|
|
92
|
+
message = ' '.join(sys.argv[1:])
|
|
93
|
+
else:
|
|
94
|
+
message = "PRESS ANY KEY"
|
|
95
|
+
|
|
96
|
+
show_fullscreen_message(message)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
if __name__ == "__main__":
|
|
100
|
+
main()
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fullscreen-message
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A command-line tool to show big messages across the entire screen in a GUI
|
|
5
|
+
Author-email: "@readwithai" <talwrii@googlemail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/talwrii/fullscreen-message
|
|
8
|
+
Project-URL: Issues, https://github.com/talwrii/fullscreen-message/issues
|
|
9
|
+
Keywords: notification,message,fullscreen,alert,display
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.7
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# fullscreen-message
|
|
27
|
+
**@readwithai** - [X](https://x.com/readwithai) - [blog](https://readwithai.substack.com/) - [machine-aided reading](https://www.reddit.com/r/machineAidedReading/) - [📖](https://readwithai.substack.com/p/what-is-reading-broadly-defined
|
|
28
|
+
)[⚡️](https://readwithai.substack.com/s/technical-miscellany)[🖋️](https://readwithai.substack.com/p/note-taking-with-obsidian-much-of)
|
|
29
|
+
|
|
30
|
+
A command-line tool to show big messages across the entire screen which can be closed with any key press.
|
|
31
|
+
|
|
32
|
+
## Motivation
|
|
33
|
+
Finding notifications at the side of your screen can be a pain. It *is* useful when multitasking but sometimes you want somethign simple.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
You can install fullscreen-message using [pipx](https://github.com/pypa/pipx):
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
Show hello world across the whole screen:
|
|
40
|
+
```
|
|
41
|
+
fullscreen-message 'Hello world'
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Alternatives and prior work
|
|
45
|
+
I found a PyPI package called [fullscreen-alert](https://pypi.org/project/fullscreen-alert/) which does somethign similar, but it didn't have my documentation and seemed to be a module rather than a command-line tool.
|
|
46
|
+
|
|
47
|
+
For the shell, you tools like [figlet](http://www.figlet.org/) to draw big messages.
|
|
48
|
+
|
|
49
|
+
## About me
|
|
50
|
+
I am **@readwithai**. I create tools for reading, research and agency sometimes using the markdown editor [Obsidian](https://readwithai.substack.com/p/what-exactly-is-obsidian).
|
|
51
|
+
|
|
52
|
+
I also create a [stream of tools](https://readwithai.substack.com/p/my-productivity-tools) that are related to carrying out my work.
|
|
53
|
+
|
|
54
|
+
I write about lots of things - including tools like this - on [X](https://x.com/readwithai).
|
|
55
|
+
My [blog](https://readwithai.substack.com/) is more about reading and research and agency.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
fullscreen_message/__init__.py
|
|
4
|
+
fullscreen_message/main.py
|
|
5
|
+
fullscreen_message.egg-info/PKG-INFO
|
|
6
|
+
fullscreen_message.egg-info/SOURCES.txt
|
|
7
|
+
fullscreen_message.egg-info/dependency_links.txt
|
|
8
|
+
fullscreen_message.egg-info/entry_points.txt
|
|
9
|
+
fullscreen_message.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fullscreen_message
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fullscreen-message"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "A command-line tool to show big messages across the entire screen in a GUI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.7"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "@readwithai", email = "talwrii@googlemail.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["notification", "message", "fullscreen", "alert", "display"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Intended Audience :: End Users/Desktop",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.7",
|
|
24
|
+
"Programming Language :: Python :: 3.8",
|
|
25
|
+
"Programming Language :: Python :: 3.9",
|
|
26
|
+
"Programming Language :: Python :: 3.10",
|
|
27
|
+
"Programming Language :: Python :: 3.11",
|
|
28
|
+
"Programming Language :: Python :: 3.12",
|
|
29
|
+
"Topic :: Utilities",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
Homepage = "https://github.com/talwrii/fullscreen-message"
|
|
34
|
+
Issues = "https://github.com/talwrii/fullscreen-message/issues"
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
fullscreen-message = "fullscreen_message.main:main"
|