cnping

Minimal Graphical Ping Tool
git clone https://git.sinitax.com/cnlohr/cnping
Log | Files | Refs | Submodules | README | LICENSE | sfeed.txt

commit 6ccac86eb3f822424a7f485f7e86bf37b0f565ea
parent a81c3e71141cc4f2a198741ef227bc75ac224464
Author: CNLohr <lohr85@gmail.com>
Date:   Sun, 10 Jan 2021 16:30:27 -0800

Merge pull request #81 from dreua/freedesktop-integration

Freedesktop integration and icon fix in Gnome
Diffstat:
Acnping.1 | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Mcnping.c | 4+++-
Afreedesktop/com.github.cntools.cnping.desktop | 14++++++++++++++
Afreedesktop/com.github.cntools.cnping.metainfo.xml | 35+++++++++++++++++++++++++++++++++++
Afreedesktop/icons/hicolor/16x16/apps/com.github.cntools.cnping.png | 0
Afreedesktop/icons/hicolor/256x256/apps/com.github.cntools.cnping.png | 0
Afreedesktop/icons/hicolor/32x32/apps/com.github.cntools.cnping.png | 0
Afreedesktop/icons/hicolor/48x48/apps/com.github.cntools.cnping.png | 0
8 files changed, 105 insertions(+), 1 deletion(-)

diff --git a/cnping.1 b/cnping.1 @@ -0,0 +1,53 @@ +.TH CNPING 1 "Dec 2020" "version 1.0" "User Manuals" +.SH "NAME" +cnping \- Minimal Graphical IPv4 Ping/HTTP Ping Tool +.SH "SYNOPSIS" +.B cnping cnping [host] [period] [extra size] [y-axis scaling] [window title] +.SH "DESCRIPTION" +.B cnping +is a minimal graphical real time IPv4 ping tool written in C. +It can send pings via ICMP (regular ping) or HTTP which is useful +in case ICMP is prohibited. Responses are displayed as vertical bars +in a graphical window. Red bars indicate a response was not (yet) +received, white bars indicate the response was received with a height +relative to the round trip time. Additional statistics are displayed +as an overlay. +.SH "OPTIONS" +All options can be passed either positional or as flags. +.IP -h +domain, IP address of ping target for ICMP or http host, i.e. http://google.com + +.IP -p +period in seconds (optional), default 0.02 + +.IP -s +ping packet extra size (above 12), optional, default = 0 + +.IP -y +use a fixed scaling factor instead of auto scaling (optional) + +.IP -t +the title of the window (optional) + +.SH "GUI" +.IP q +quit + +.IP m +toggle histogram mode + +.IP f +toggle histogram frame mode + +.IP c +reset histogram data + +.SH "AUTHOR" +Charles Lohr <TODO Email> +.SH COPYRIGHT +Copyright \(co 2018-2020 Charles Lohr +.br +.SH LICENSE +Rawdraw and CNPing may be licensed feely under the MIT-x11 +or NewBSD Licenses. You choose! + diff --git a/cnping.c b/cnping.c @@ -729,9 +729,11 @@ int main( int argc, const char ** argv ) ERRM( "Fault in WSAStartup\n" ); exit( -2 ); } + CNFGSetup( title, 320, 155 ); +#else + CNFGSetupWMClass( title, 320, 155, "cnping", "cnping" ); #endif - CNFGSetup( title, 320, 155 ); if( memcmp( pinghost, "http://", 7 ) == 0 ) { diff --git a/freedesktop/com.github.cntools.cnping.desktop b/freedesktop/com.github.cntools.cnping.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Name=cnping +Comment=Minimal Graphical IPv4 Ping/HTTP Ping Tool +Type=Application +Icon=com.github.cntools.cnping +Categories=Network; +Keywords=ping; +StartupWMClass=cnping + +# cnping is meant to be started from command line, let's give users a hint. +Exec=bash -c "cnping ; bash" +Terminal=true + diff --git a/freedesktop/com.github.cntools.cnping.metainfo.xml b/freedesktop/com.github.cntools.cnping.metainfo.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop-application"> + <id>com.github.cntools.cnping</id> + <name>cnping</name> + <summary>Minimal Graphical IPv4 Ping/HTTP Ping Tool</summary> + <launchable type="desktop-id">com.github.cntools.cnping.desktop</launchable> + <metadata_license>CC0-1.0</metadata_license> + <content_rating type="oars-1.1"/> + <description> + <p> + cnping is a minimal graphical real time IPv4 ping tool written in C. +It can send pings via ICMP (regular ping) or HTTP which is useful +in case ICMP is prohibited. Responses are displayed as vertical bars +in a graphical window. Red bars indicate a response was not (yet) +received, white bars indicate the response was received with a height +relative to the round trip time. Additional statistics are displayed +as an overlay. + </p> + <p> + cnping uses rawdraw so it is OS independent and very light weight. + </p> + </description> + <url type="homepage">https://github.com/cntools/cnping</url> + <screenshots> + <screenshot type="default"> + <image>https://i.imgur.com/Yj5coKN.gif</image> + <caption/> + </screenshot> + </screenshots> + <releases><!-- add new versions on top --> + <release date="2019-10-04" version="1.0.0"/> + </releases> + <project_license>MIT or BSD</project_license> + <url type="bugtracker">https://github.com/cntools/cnping/issues</url> +</component> diff --git a/freedesktop/icons/hicolor/16x16/apps/com.github.cntools.cnping.png b/freedesktop/icons/hicolor/16x16/apps/com.github.cntools.cnping.png Binary files differ. diff --git a/freedesktop/icons/hicolor/256x256/apps/com.github.cntools.cnping.png b/freedesktop/icons/hicolor/256x256/apps/com.github.cntools.cnping.png Binary files differ. diff --git a/freedesktop/icons/hicolor/32x32/apps/com.github.cntools.cnping.png b/freedesktop/icons/hicolor/32x32/apps/com.github.cntools.cnping.png Binary files differ. diff --git a/freedesktop/icons/hicolor/48x48/apps/com.github.cntools.cnping.png b/freedesktop/icons/hicolor/48x48/apps/com.github.cntools.cnping.png Binary files differ.