Hi guys,
I've improved a shell version of a dwm status daemon which has the
feature of showing network ups and downs.
http://s.natalian.org/2013-08-17/dwm_status.png
https://github.com/kaihendry/Kai-s--HOME/blob/master/bin/dwm_status
Please free to critique the code and suggest improvements. I st
Am 2013-08-06 15:52, schrieb Martti Kühne:
mar77i@asus77i:~$ 0+445
-bash: 0+445: command not found
mar77i@asus77i:~$ a=(0+445)
mar77i@asus77i:~$ echo $a
0+445
holy crap, that's what happens. Weren't you looking for this instead:
mar77i@asus77i:~$ a=$(( 5554 - 1000 ))
mar77i@asus77i:~$ echo $a
4
mar77i@asus77i:~$ 0+445
-bash: 0+445: command not found
mar77i@asus77i:~$ a=(0+445)
mar77i@asus77i:~$ echo $a
0+445
holy crap, that's what happens. Weren't you looking for this instead:
mar77i@asus77i:~$ a=$(( 5554 - 1000 ))
mar77i@asus77i:~$ echo $a
4554
so, you're misusing bash's array syntax
On Mon, Jul 29, 2013 at 05:26:23PM +0800, Kai Hendry wrote:
> Hello there,
>
> On 29 July 2013 01:02, Silvan Jegen wrote:
> > Comments and criticism is welcome.
>
> The net monitor is something I'm looking for, though I'm not sure how
> I would integrate it with my current shell script:
> https:
Hello there,
On 29 July 2013 01:02, Silvan Jegen wrote:
> Comments and criticism is welcome.
The net monitor is something I'm looking for, though I'm not sure how
I would integrate it with my current shell script:
https://github.com/kaihendry/Kai-s--HOME/blob/master/.xinitrc#L43
https://github.c
On 28 July 2013 19:02, Silvan Jegen wrote:
> I included some changes suggested by Markus in a rewrite of the netusage
> functions for dwmstatus (attached; including an adapted dwmstatus-Makefile
> for convenience).
>
> Comments and criticism is welcome.
>
> I will try to push a change request to t
On Sun, Jul 28, 2013 at 06:11:39PM +0200, Markus Teich wrote:
> Am 2013-07-27 18:27, schrieb Martti Kühne:
> >On Mon, Jul 22, 2013 at 3:17 PM, Markus Teich
> > wrote:
> >>
> >>rx_now=0
> >>tx_now=0
> >>for i in /sys/class/net/*; do
> >>if [[ -d "$i" && ${i##*/} != "lo" ]]; then
> >>
Am 2013-07-27 18:27, schrieb Martti Kühne:
On Mon, Jul 22, 2013 at 3:17 PM, Markus Teich
wrote:
rx_now=0
tx_now=0
for i in /sys/class/net/*; do
if [[ -d "$i" && ${i##*/} != "lo" ]]; then
if [[ -f "$i/statistics/rx_bytes" ]]; then
rx_now=($rx_now+
On Mon, Jul 22, 2013 at 3:17 PM, Markus Teich
wrote:
>
> rx_now=0
> tx_now=0
> for i in /sys/class/net/*; do
> if [[ -d "$i" && ${i##*/} != "lo" ]]; then
> if [[ -f "$i/statistics/rx_bytes" ]]; then
> rx_now=($rx_now+`cat $i/statistics/rx_bytes`)
>
Am 2013-07-22 14:42, schrieb Silvan Jegen:
The code is really simple and adjusting it to a particular interface
name is trivial. Still, instead of checking for the interface names
you
are interested in, it may be easier to consider all the interfaces
except the loop device.
I will try to find
On Mon, Jul 22, 2013 at 01:40:47PM +0200, Martti Kühne wrote:
> On Sun, Jul 21, 2013 at 3:44 PM, Silvan Jegen wrote:
> > This is an older thread but I just wanted to add some justification
> > for the code I wrote (which seems to have been used by the author of
> > this daemon).
> >
> > On Thu, Ju
On Sun, Jul 21, 2013 at 3:44 PM, Silvan Jegen wrote:
> This is an older thread but I just wanted to add some justification
> for the code I wrote (which seems to have been used by the author of
> this daemon).
>
> On Thu, Jun 27, 2013 at 7:01 PM, Markus Wichmann wrote:
>> [...]
>>> while (fgets(b
On Sun, Jul 21, 2013 at 03:44:15PM +0200, Silvan Jegen wrote:
> > You could also save the old values from the previous run, so you would
> > only need to call parse_netdev() once per run, not twice.
>
> Wouldn't that mean that I would have to save the old value in a
> persistent file on disk? Read
This is an older thread but I just wanted to add some justification
for the code I wrote (which seems to have been used by the author of
this daemon).
On Thu, Jun 27, 2013 at 7:01 PM, Markus Wichmann wrote:
> [...]
>> while (fgets(buf, bufsize, devfd)) {
>> if ((eth0start = strstr(buf, "eth0:
On Fri, Jun 28, 2013 at 08:18:50AM +0300, Edgaras wrote:
> On Thu, Jun 27, 2013 at 07:01:52PM +0200, Markus Wichmann wrote:
> > The function you are looking for is called asprintf().
>
> Isn't asprintf just GNU extension? An IIRC such things a kinda mostly frown
> upon here? Though it sure sounds
On Thu, Jun 27, 2013 at 07:01:52PM +0200, Markus Wichmann wrote:
> The function you are looking for is called asprintf().
Isn't asprintf just GNU extension? An IIRC such things a kinda mostly frown
upon here? Though it sure sounds as very nice function.
On Wed, Jun 26, 2013 at 08:51:46PM -0400, Viola Zoltán wrote:
> Hi, DWM users! I wrote a daemon to the DWM status bar! I send it in
> attachment. The program name "kajjam". Start it simple: ./kajjam
>
Just a few comments on this.
> Compile it with this command:
>
> g++ -funsigned-char -funsigne
Hi Viola,
first of all this is a plain text mailing list, so please stop sending
richtext/html mails to this list, thanks.
On 27 June 2013 15:36, Viola Zoltán wrote:
> My daemon will not only/just set the stat into the statusbar of DWM, but do
> much more jobs. I must use lot of very complex dat
Thanks, the tip good, I will check its source code. But I write my daemon,
because I would like learning the daemon-programming.
I am not a profi programmer, but I like programming. Long time ago I wrote
a complete programming-language to the little C-64 computer, in
"Assembler"...
Zoli
2013/6/27
Hello,
On 27 June 2013 08:51, Viola Zoltán wrote:
> Hi, DWM users! I wrote a daemon to the DWM status bar! I send it in
> attachment. The program name "kajjam". Start it simple: ./kajjam
>
> Compile it with this command:
>
> g++ -funsigned-char -funsigned-bitfields -Wall -Wno-long-long -Wunused
>
My daemon will not only/just set the stat into the statusbar of DWM, but do
much more jobs. I must use lot of very complex datastructures, for example
chained list, arrays, etc. They are much easyer usable in C++, I think.
Zoli
2013/6/27 Szabolcs Nagy
> * Viola Zolt?n [2013-06-27 08:52:11 -040
* Viola Zolt?n [2013-06-27 08:52:11 -0400]:
> possibilities, very lot, and to them I need C++ for the objectoriented
> programming. And, I preferred the "//" not the /*... */
// comment is valid in c
(since 1999 it's even standardized)
i don't think you need object oriented programming in your d
Yes, you're well. I am not a profi programmer, and not a profi hacker, just
"hobbyst", and not have good english knowledge.
But the daemon work good...
Zoli
2013/6/27 Florian Limberger
> On Thu, 27 Jun 2013 02:51:46 +0200, Viola Zoltán
> wrote:
>
> Compile it with this command:
>>
>> g++ -fu
Dear Maximilian, I think, my attached daemon actually written not in C++
but in C. I just use g++ because in the future I will expand/extend its
possibilities, very lot, and to them I need C++ for the objectoriented
programming. And, I preferred the "//" not the /*... */
I think, almost enough ren
On Thu, 27 Jun 2013 02:51:46 +0200, Viola Zoltán
wrote:
Compile it with this command:
g++ -funsigned-char -funsigned-bitfields -Wall -Wno-long-long -Wunused
-Wextra -pedantic -lX11 kajjam.cpp -o kajjam
Why g++? It works fine as
gcc -Wall -Wextra -std=c99 -pedantic kajjam.c -o kajjam -lX11
On Wed, Jun 26, 2013 at 08:51:46PM -0400, Viola Zoltán wrote:
>
>Hi, DWM users! I wrote a daemon to the DWM status bar! I send it in
>attachment. The program name "kajjam". Start it simple: ./kajjam
>Compile it with this command:
>g++ -funsigned-char -funsigned-bitfields -Wall -Wno
Hi,
please use plain text.
Thank you,
Calvin.
On 26 June 2013 20:51, Viola Zoltán wrote:
> Hi, DWM users! I wrote a daemon to the DWM status bar! I send it in
> attachment. The program name "kajjam". Start it simple: ./kajjam
>
> Compile it with this command:
>
> g++ -funsigned-char -funsigned-
Hi, DWM users! I wrote a daemon to the DWM status bar! I send it in
attachment. The program name "kajjam". Start it simple: ./kajjam
Compile it with this command:
g++ -funsigned-char -funsigned-bitfields -Wall -Wno-long-long -Wunused
-Wextra -pedantic -lX11 kajjam.cpp -o kajjam
How to stop it: k
28 matches
Mail list logo