Coder Social home page Coder Social logo

blue-sky-r / tde-wifi-icon Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 423 KB

TDE (Trinity KDE) Systray icon depicting wifi signal strength on remote device (wifi bridge/repeater/access point)

Python 98.29% Shell 1.71%
tde kde systray-icon wifi python pyqt4 pyqt5 trinity pyqt dd-wrt monitor

tde-wifi-icon's Introduction

SystemTray Icon for quality / strength of WiFi signal

WiFi signal icon
SysTray-WiFi-icon SysTray Icon is a PyQt script for TDE (KDE 3.x) to depict WiFi signal strength on remote (networked) device (router)

The remote device is usually a router (client, client/bridge, repeater, repeater/bridge mode) on local LAN segment to provide connectivity to another (adjancent) LAN segment. Due to nature of wifi there are fluctuations and collisions affecting the quality of this intersegment wifi link. Therefore is necessary to provide simple visual feedback of the link quality (rx/tx speed) to the user. The SysTray icon is the obvious solution.

config

The current PyQt implementation is based on hardcoded config, however it is quite easy to read and edit Python code.

Note: The separate ini-file based configuration is on TO-DO list.

how it works

The algorithm is very simple: retrieve - process - diplay - repeat

  • The script periodically queries the wifi status web page on remote device (dd-wrt info page)
dd-wrt info page
dd-wrt info page
  • The wireless AP information line is parsed and each column value is extracted
dd-wrt info page - wifi Access Point details
dd-wrt info page
  • A few other values (like Q, SN) are calculated from existing ones and actual Tooltip is constructed

  • Based on preconfigured signal lookup table the corresponding icon and optional audible sound are retrieved (Please note that audio notifications are not functional right now due to problems with QSound in PyQt4/5)

systray icon wifi signal level
error signal level ERROR - error connecting to the remote monitored device (check tooltip for more detailed error message)
no-connection signal level NOCON - remote monitored device online, but no connection to AP
low level signal level LOW
medium level signal level MEDIUM
high level signal level HIGH
  • The new icon is rendered in the systray area with corresponding tooltip depicting more details

  • There is a right-click menu with just two actions (for now)

    • refresh - force manual refresh of icon and tooltip (addtionally to periodical updates from QTimer)

    • exit - stop monitoring end exit (removes icon from systray)

Tooltip and Right-click menu
SysTray-WiFi-icon animated demo with all signal levels and tooltip plus right-click menu

implementation

The current implementation is intended for TDE - Trinity Desktop Environment as continuation of classic KDE 3.x (which was replaced by KDE 4/5 so all great KDE 3 achievements were lost). It might also work (untested) on other KDE based environments if they support QSystrayIcon class from Qt4/5.

There are two identical implementations in this repository:

  • systray-wifi-qt4.py - PyQt4 / Python 2.7 for older 32-bit systems

  • systray-wifi-qt5.py - PyQt5 / Python 3 for 64-bit systems

autostart

To start script automatically after login use symlink to ~/.config/Autostart/ directory

to do

TODO: debug why QSound() is not working
TODO: intermittent visual artifcats (only on multiple runs, the 1st/2nd time the icon is ok)
      just noticed sometimes there are visual artifacts also on Dropbox icon so maybe it is TDE problem ?
TODO: open minimalistic web browser with dd-wrt info page from right-click menu entry
TODO: store long term statistics and provide signal strength plot
TODO: autostart symlink from r-click menu
TODO: parse command line parameters (like debug, config file, url, ... )

keywords

TDE, Trinity Desktop, KDE3, Qt, PyQt4, PyQt5, Python, icon, SysTray, dd-wrt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.