feat(linux): улучшения трея - статус-кружок, уведомления, автозапуск, диалог обновления#854
Open
f4rceful wants to merge 18 commits into
Open
feat(linux): улучшения трея - статус-кружок, уведомления, автозапуск, диалог обновления#854f4rceful wants to merge 18 commits into
f4rceful wants to merge 18 commits into
Conversation
32f6e38 to
27a4516
Compare
Contributor
Author
|
иконка не появлялась - _imagingtk был исключён из бандла в linux.spec |
- add add_status_dot() to overlay colored dot on base icon at 256px - add _load_dot_image() with PNG support from assets/ folder - add ProxyStatus enum (STOPPED/IDLE/ACTIVE) - add StatusManager with 2s debounce for icon updates - add is_proxy_running() helper - add assets/ folder for custom dot PNG files
- status dot reflects proxy state: idle (amber), active (green), stopped (red) - StatusManager polls every 1s with 2s debounce to prevent icon flickering - crash balloon notification via Shell_NotifyIconW with hBalloonIcon - uses pystray internal _hwnd for direct Win32 API call - _pil_to_hicon converts PIL image to HICON for high-quality balloon icon
- tooltip shows active connections, upload/download speed (bytes/s) - DC ping measured via TCP connect to port 443, updated every 30s - ping shown on separate line: DC2: 45ms DC4: 120ms - pings visible in idle state too, not just when connections are active
- import StatusManager, ProxyStatus, add_status_dot, is_proxy_running - _notify_send() sends desktop notifications via notify-send subprocess - _start_dc_pinger() measures TCP latency to each DC every 30s - _start_icon_updater() updates tray icon dot (idle/active/stopped) and tooltip with connection count, speed and DC pings via StatusManager - crash notification fires on STOPPED transition with reason from _crash_reason
…, scroll fix, update dialog
27a4516 to
262ce67
Compare
Owner
|
Почему в pr для линукса изменены файлы для винды? |
Contributor
Author
|
забыл переключить ветку изменения windows.ру случайно попали сюда из PR #829, убрал |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Портировал улучшения из #829 на Linux и добавил несколько Linux-специфичных вещей, которых не хватало
Что добавил
StatusManager, обновляется каждую секундуnotify-sendпри падении прокси - отдельные сообщения для "порт занят" и общего крашаxdg-openвместо просто копирования в буфер; буфер - только как fallback_show_info/_show_error→notify-send,_ask_yes_no→zenity --questionс иконкой приложения (если zenity не установлен — fallback на notify-send).desktopфайл в~/.config/autostart/— управляется чекбоксом в настройкахyscrollincrementдля Linux, из-за чего одно движение колёсика листало всё до конца