scrolllock-led-daemon 1.0.0__py3-none-any.whl
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.
- scrolllock_led_daemon-1.0.0.dist-info/METADATA +236 -0
- scrolllock_led_daemon-1.0.0.dist-info/RECORD +7 -0
- scrolllock_led_daemon-1.0.0.dist-info/WHEEL +5 -0
- scrolllock_led_daemon-1.0.0.dist-info/entry_points.txt +2 -0
- scrolllock_led_daemon-1.0.0.dist-info/licenses/LICENSE +674 -0
- scrolllock_led_daemon-1.0.0.dist-info/top_level.txt +1 -0
- scrolllock_led_daemon.py +604 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scrolllock-led-daemon
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Daemon that synchronizes the Scroll Lock key with the keyboard LED on Linux.
|
|
5
|
+
Author: Alan Santos
|
|
6
|
+
License: GPL-3.0-or-later
|
|
7
|
+
Project-URL: Homepage, https://github.com/alan-n7x/scrolllock-led-daemon
|
|
8
|
+
Project-URL: Repository, https://github.com/alan-n7x/scrolllock-led-daemon
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/alan-n7x/scrolllock-led-daemon/issues
|
|
10
|
+
Keywords: scrolllock,led,daemon,keyboard,linux
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: System :: Hardware
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: evdev>=1.9.2
|
|
26
|
+
Provides-Extra: test
|
|
27
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# Scroll Lock LED Daemon
|
|
31
|
+
|
|
32
|
+
Daemon for Linux that synchronizes a key press with the keyboard LED.
|
|
33
|
+
|
|
34
|
+
## Features
|
|
35
|
+
|
|
36
|
+
- Auto-detects keyboard and Scroll Lock LED
|
|
37
|
+
- Listens for key presses and toggles the LED
|
|
38
|
+
- Runs as a systemd service (`Type=notify`)
|
|
39
|
+
- Auto-reconnects if the keyboard is disconnected
|
|
40
|
+
- One-shot mode: `--set on/off` and `--toggle` for scripts
|
|
41
|
+
- Configurable key (`--key`) and LED (`--led`)
|
|
42
|
+
- Configuration file support
|
|
43
|
+
- Very low CPU usage (event driven, not polling)
|
|
44
|
+
- `--doctor` for system diagnostics
|
|
45
|
+
|
|
46
|
+
## Requirements
|
|
47
|
+
|
|
48
|
+
- Linux
|
|
49
|
+
- Python 3.10+
|
|
50
|
+
- python3-evdev
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
### Pacote .deb (Debian/Ubuntu — recomendado)
|
|
55
|
+
|
|
56
|
+
Baixe o `.deb` da [página de releases](https://github.com/alan-n7x/scrolllock-led-daemon/releases):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
sudo apt install ./scrolllock-led-daemon_*.deb
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Instala automaticamente como serviço systemd com start imediato.
|
|
63
|
+
|
|
64
|
+
### PyPI (pip)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install scrolllock-led-daemon
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Apenas o binário — você precisa configurar o systemd e udev manualmente.
|
|
71
|
+
|
|
72
|
+
### Script manual (desenvolvimento)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git clone https://github.com/alan-n7x/scrolllock-led-daemon.git
|
|
76
|
+
cd scrolllock-led-daemon
|
|
77
|
+
./scripts/install.sh
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Instala em `/usr/local/`:
|
|
81
|
+
- `/usr/local/bin/scrolllock-led-daemon`
|
|
82
|
+
- `/etc/systemd/system/scrolllock-led-daemon.service`
|
|
83
|
+
- `/usr/local/share/man/man8/scrolllock-led-daemon.8`
|
|
84
|
+
- `/etc/udev/rules.d/99-scrolllock-led-daemon.rules`
|
|
85
|
+
- `/usr/share/bash-completion/completions/scrolllock-led-daemon.bash`
|
|
86
|
+
- `/etc/scrolllock-led-daemon.conf`
|
|
87
|
+
|
|
88
|
+
### Dependências
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
sudo apt install python3-evdev
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Usage
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Usage: scrolllock-led-daemon [OPTIONS]
|
|
98
|
+
|
|
99
|
+
Options:
|
|
100
|
+
--device PATH Keyboard device path (overrides auto-detection)
|
|
101
|
+
--led PATH|NAME LED brightness file or name (scrolllock, capslock, numlock)
|
|
102
|
+
--key NAME Key to listen for (default: KEY_SCROLLLOCK)
|
|
103
|
+
--set on|off Set LED state and exit (one-shot mode)
|
|
104
|
+
--toggle Toggle LED state and exit (one-shot mode)
|
|
105
|
+
--list List available input devices and exit
|
|
106
|
+
--doctor Run system diagnostics
|
|
107
|
+
--config PATH Path to configuration file
|
|
108
|
+
--verbose Enable debug logs
|
|
109
|
+
--version Show version
|
|
110
|
+
--help Show help
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Daemon mode (default)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
sudo systemctl start scrolllock-led-daemon
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### One-shot mode
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
scrolllock-led-daemon --set on
|
|
123
|
+
scrolllock-led-daemon --set off
|
|
124
|
+
scrolllock-led-daemon --toggle
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### List devices
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
scrolllock-led-daemon --list
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Diagnostics
|
|
134
|
+
|
|
135
|
+
Run a system health check:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
scrolllock-led-daemon --doctor
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Custom device
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
scrolllock-led-daemon --device /dev/input/event9 --led scrolllock
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Custom key
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
scrolllock-led-daemon --key KEY_F12 --led capslock
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Configuration
|
|
154
|
+
|
|
155
|
+
Settings can be persisted in `/etc/scrolllock-led-daemon.conf`
|
|
156
|
+
or `~/.config/scrolllock-led-daemon/scrolllock-led-daemon.conf`:
|
|
157
|
+
|
|
158
|
+
```ini
|
|
159
|
+
[daemon]
|
|
160
|
+
device = /dev/input/event4
|
|
161
|
+
led = scrolllock
|
|
162
|
+
key = KEY_SCROLLLOCK
|
|
163
|
+
verbose = false
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
CLI arguments override config file values.
|
|
167
|
+
|
|
168
|
+
## Troubleshooting
|
|
169
|
+
|
|
170
|
+
### Permission denied
|
|
171
|
+
|
|
172
|
+
If you see:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Permission denied while accessing /dev/input/event*
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Run with `sudo` or install the udev rules:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
sudo ./scripts/install.sh
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The udev rules give your user access to input devices without root.
|
|
185
|
+
|
|
186
|
+
### No keyboard found
|
|
187
|
+
|
|
188
|
+
If auto-detection fails, list available devices:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
scrolllock-led-daemon --list
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Then use the exact path:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
scrolllock-led-daemon --device /dev/input/event4
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Development
|
|
201
|
+
|
|
202
|
+
### Dependencies
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
pip install ".[test]"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Tests
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
make test # or: python -m pytest tests/ -v
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Syntax check
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
make lint # or: python -m py_compile src/scrolllock_led_daemon.py
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Uninstall
|
|
221
|
+
|
|
222
|
+
### Via .deb
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
sudo apt remove scrolllock-led-daemon
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Via script manual
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
./scripts/uninstall.sh
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
GNU General Public License v3.0
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
scrolllock_led_daemon.py,sha256=jAEcR594NPnreRoz2zDuBwBbZ1RebnWeLjCMaRoEZCM,16526
|
|
2
|
+
scrolllock_led_daemon-1.0.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
3
|
+
scrolllock_led_daemon-1.0.0.dist-info/METADATA,sha256=seeKwn_maRrRdNtlrJhdJEN2ACBc2ErqMC6_UjYGBco,5199
|
|
4
|
+
scrolllock_led_daemon-1.0.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
5
|
+
scrolllock_led_daemon-1.0.0.dist-info/entry_points.txt,sha256=WlAm-_0rBAjXM0hy2DRpE8WxUBIXaaFqYQYePSztD4s,69
|
|
6
|
+
scrolllock_led_daemon-1.0.0.dist-info/top_level.txt,sha256=c_3D5_yAEUfNRa09ffS_rJsWD5tqQcqwo3ha1dqnij0,22
|
|
7
|
+
scrolllock_led_daemon-1.0.0.dist-info/RECORD,,
|