HOW TO: osd_cat as conky alternative
Forum rules
Share your brain ;)
Share your brain ;)
Re: New on the market / Fresh from the repos
Funny you found and brought this up. I posted a bit ago that I was playing around with displaying system into through dunst as a conky replacement. I lost that did but did recently start again. This seems similar. My awk and sed skills are weak so I need to work on it.
Both seem to do what initially was my goal, show it when I ask, otherwise don't bother me.
Edit ... Wanted to add, interesting we were working on the same thing simultaneously but though different avenues.
Both seem to do what initially was my goal, show it when I ask, otherwise don't bother me.
Edit ... Wanted to add, interesting we were working on the same thing simultaneously but though different avenues.
Work hard; Complain less
Re: New on the market / Fresh from the repos
I thought about using dunst, but it requires that a notify daemon run in the background. Then I tried dmenu, and that works, but I like osd_cat even better. I bound the script to a key with xbindkeys, so I can display the status whenever I want, and the delay is adjustable. I also played with running it as a cron job, and that works too.
It is interesting that we were both trying to do the same thing. conky is bloat :) I think I probably read your post about doing this, but forgot about it.
awk is amazing. I don't know much, but I want to learn more.
It is interesting that we were both trying to do the same thing. conky is bloat :) I think I probably read your post about doing this, but forgot about it.
awk is amazing. I don't know much, but I want to learn more.
Re: New on the market / Fresh from the repos
haha, that is exactly what I did, keybound it, even the idea of cron jobbing or not.
very interesting point, you're right about the daemon running in the bg. I didn't like that, kind of defeating the purpose right.
okay, based on that, i'm gonna jump ship from dunst to osd_cat. I mean really, its all the same syntax, just piping through the cat instead.
very interesting point, you're right about the daemon running in the bg. I didn't like that, kind of defeating the purpose right.
okay, based on that, i'm gonna jump ship from dunst to osd_cat. I mean really, its all the same syntax, just piping through the cat instead.
Work hard; Complain less
Re: New on the market / Fresh from the repos
Sweet! Please post whatever you get working. One thing about what I have -- it's specific to the machine I'm using (parsing the sensors output is different for each machine). I don't really care, because I want it to be simple.
HOWTO; osd_cat as conky replacement
been awhile, but revisited this today and got this version of osd_cat working quite well. My sed skills may be sloppy, but its working.
scrot
Code: Select all
#! /bin/bash
temp=$(cat /sys/class/thermal/thermal_zone0/temp | awk '{print $1/1000}')
mem=$(free -m | grep buffers/cache | sed -e 's/[buffers/cache -+ :]//g' | sed 's/.\{4\}$//')
time=$(date | sed -e 's/EST 2013//g')
batt=$(cat /sys/class/power_supply/BAT0/capacity)
mail=$($HOME/mail)
#OUTPUT=
$(echo -e $time '>>' m$mail b$batt r$mem t$temp | osd_cat -A center -o 2 -d 10 -c black)
Work hard; Complain less
Re: HOWTO; osd_cat as conky replacement
Nice work dkeg.
Re: HOWTO; osd_cat as conky replacement
Pids, I was looking at your original post. Really interesting how we each did it so differently, getting to pretty much the same place. Something I can really appreciate.
Work hard; Complain less
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO; osd_cat as conky replacement
Really neat. I just would like to add something remotely related for all the root-window lovers - not worth to open an own thread for it:
1) xrootconsole - sends the STDOUT to the root window. It's not exactly a VT because you can not input there. I see it makes sense if you want to pipe the tail of /var/log or something like this onto the root window.
2) xmountains/xfireworks/xfishtank/xphoon - draws certain animations onto the root window
3) floatbg - changes the colour of the root window. Quite powerful, because you can limit the range of colors to be shown, the switching speed, etc.
4) xloadimage - similar to feh, can display images on either the root window or into an X window. Nothing pretty and fancy, and I am unsure if it has any advantages over feh, or xsetroot.
1) xrootconsole - sends the STDOUT to the root window. It's not exactly a VT because you can not input there. I see it makes sense if you want to pipe the tail of /var/log or something like this onto the root window.
2) xmountains/xfireworks/xfishtank/xphoon - draws certain animations onto the root window
3) floatbg - changes the colour of the root window. Quite powerful, because you can limit the range of colors to be shown, the switching speed, etc.
4) xloadimage - similar to feh, can display images on either the root window or into an X window. Nothing pretty and fancy, and I am unsure if it has any advantages over feh, or xsetroot.
..gnutella..
- wuxmedia
- Grasshopper
- Posts: 6454
- Joined: Wed Oct 17, 2012 11:32 am
- Location: Back in Blighty
- Contact:
Re: HOWTO; osd_cat as conky replacement
nice OCD catting 8P
I remember xmountains from a BBQ installer, once. 8)
I remember xmountains from a BBQ installer, once. 8)
Re: HOWTO; osd_cat as conky replacement
circling back to this thread. Posted a scrot including latest version of the cat. Posting another here for completeness.
piping typical conky items: date, time, memory, cpu, volume, mail count, battery, temperature, and currently playing. For both mail and mocp I call out to external scripts. I set it up with a keybind and delay it 10s so I have time to read it.
It also populates 'on top' of other windows and panels. So say in hlwm, if I am using the default bar, instead of piping conky through dzen, I keybind osd_cat and it will overlay on the bar.
piping typical conky items: date, time, memory, cpu, volume, mail count, battery, temperature, and currently playing. For both mail and mocp I call out to external scripts. I set it up with a keybind and delay it 10s so I have time to read it.
It also populates 'on top' of other windows and panels. So say in hlwm, if I am using the default bar, instead of piping conky through dzen, I keybind osd_cat and it will overlay on the bar.
Work hard; Complain less
Re: HOWTO; osd_cat as conky replacement
Trying this osd_cat today, really nice trick.
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO; osd_cat as conky replacement
osd volume bar, gets input (for example from xbindkeys) as 'osd_vol +' 'osd_vol -' and 'osd_vol t'
/usr/local/bin/osd_vol (remember chmod a+x)
/usr/local/bin/osd_vol (remember chmod a+x)
Code: Select all
#!/bin/bash
case $1 in
+)
amixer set PCM 2dB+
;;
-)
amixer set PCM 2dB-
;;
t)
amixer set Master toggle -q
;;
*)
exit
;;
esac
VOLUME=`amixer get PCM | sed -ne '/Front Left/s/.*\[\(.*\)%\].*/\1/p'`
osd_cat --colour=Green --shadow 1 \
--pos bottom --align center --offset 80 --delay=1 -b percentage -P $VOLUME -T Volume
..gnutella..
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO; osd_cat as conky replacement
RSS feed to osd_cat:
works also fine for xrootconsole -geometry 140x30 or so.
Code: Select all
curl -s "http://www.tagesschau.de/xml/rss2" | sed -n '/<title>/{ s/[^>]*>\([^<]*\).*/\1/; p; }' | osd_cat -l 10 -c white
..gnutella..
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO; osd_cat as conky replacement
^ unfortunately most American RSS feeds use the same service (feedburner or whatever it is), and they render <titles> and <items> differently, so you have to find some other provider, maybe from your local newspaper :)
..gnutella..
Re: HOWTO; osd_cat as conky replacement
right, makes sense. fwiw, also can pipe through your now playing cmus'er, moc'er. For me did with seperate script, same i use for the other conky alternatives.
Work hard; Complain less
-
- Baconator
- Posts: 10253
- Joined: Thu Sep 16, 2010 11:03 am
- Location: Pfälzerwald
- Contact:
Re: HOWTO; osd_cat as conky replacement
actually I got to RSS feeds when looking at xrootconsole's colored output version, piping top (!) through ccze into it... so for some larger shit with colors, xrootconsole is the peanut. osd_cat is perfect for few-liners.
..gnutella..
Re: HOW TO: osd_cat as conky alternative
Some of us on IRC were talking about osd_vol, and it didn't work for me because I need to adjust the Master channel (instead of PCM), so here it is working for that (as always, there might be a better way):
The awk might need some tweaking if your volume bar doesn't work; please let me know, and provide the output from "amixer" so I can modify the script accordingly.
Code: Select all
#!/bin/bash
case $1 in
+)
amixer set Master 2dB+ ;;
-)
amixer set Master 2dB- ;;
t)
amixer set Master toggle -q ;;
*)
exit;;
esac
VOLUME=$(amixer get Master | awk -F'[][]' '/Mono:/ {sub(/%/, ""); print $2; exit}')
osd_cat --colour=Green --shadow 1 --pos bottom --align center --offset 80 --delay=1 -b percentage -P $VOLUME -T Volume