You are not logged in.

#1 2007-01-08 07:02:56

wounded
Member
Registered: 2007-01-08
Posts: 26

Ion3 Statusbar

Hi, I've been poking around here and the wiki for a month or two now and this is the first problem I've had where I can't already find the answer somewhere. Keep in mind this just means I most likely just overlooked it -_-

I recently installed Ion3 on my Arch box from Extra. So far I'm having a blast using it and configuring it how I want. However, I having some issues with altering the status bar. On the Ion3 site is says simply:

These scripts are for monitoring various internal and system resources and such. You should not attempt to load any of them manually. Instead, put them somewhere on Ion's earch path (e.g. ~/.ion3/) and simply insert one of the meters provide by the script in your statusbar template (in cfg_statusbar.lua) and it will automatically load the appropriate script, either within Ion itself, or in ion-statusd for the system resource monitors. - http://modeemi.fi/~tuomov/repos/ion-scr … #statusbar

However, this does not work. statusbar_workspace.lua and statusd_mpd.lua are the scripts I am currently trying out. (http://modeemi.fi/~tuomov/repos/ion-scripts-3/statusbar/statusbar_workspace.lua and http://modeemi.fi/~tuomov/repos/ion-scr … sd_mpd.lua )

My template string currently looks like:

[ %date || %workspace_pager || %workspace_frame] %artist - %title (%pos / %len)] %filler%systray

Which looks like it would translate to something like:

[ Sun 2007-01-07 22:55 || 1i  2i  [31]  4f || Workspace 3 ] Megadeth - Have Cool, Will Travel (2:18 / 3:40)

Or something but instead I get:

[ Sun 2007-01-07 22:55 || ? || ? ] ?- ? ( ? / ? )

Both files are in my ~/.ion3/ directory and the mpd host/port in the file are accurate. I'm unsure what to do or even where to look as Ion has no community tools like forums or a wiki or anything except the documentation and I've been through that but couldn't figure out what I'm doing wrong.

Any help would be appreciated on how to properly use the scripts found on that page. Thanks Archers =x

Offline

#2 2007-01-08 18:39:26

nicholai
Member
Registered: 2005-04-26
Posts: 51

Re: Ion3 Statusbar

I think it should be something like:

%mpd_artist - %mpd_title (%mpd_pos / %mpd_len

Append the mpd_ (or whatever comes after statusd_ ). At least that's how I do it.

/Nic


Desktop :Athlon64       2.2 GHz
Laptop   :Toshiba R100    1GHz

Offline

#3 2007-01-08 19:37:54

Zoranthus
Member
From: muc
Registered: 2006-11-22
Posts: 166

Re: Ion3 Statusbar

For Amarok you just need to put %amarok into your template, nothing else. Same for fortune and such..  it should work like that for mpd too. Just %mpd.

Offline

#4 2007-01-08 22:00:29

wounded
Member
Registered: 2007-01-08
Posts: 26

Re: Ion3 Statusbar

Zoranthus wrote:

For Amarok you just need to put %amarok into your template, nothing else. Same for fortune and such..  it should work like that for mpd too. Just %mpd.

Ah, that makes perfect sense since there is a template string in the mpd lua file as well ha.

That worked, mostly. Now it says 'mpd is not running' despite mpd running. In the mpd lua file it says it needs netcat installed so I pacmanned it but it doesnt seem to really install netcat? Or, atleast, it is not on the path. 'which netcat' cannot find it and 'locate netcat' reveals:

/var/lib/pacman/current/netcat-1.10-5
/var/lib/pacman/current/netcat-1.10-5/desc
/var/lib/pacman/current/netcat-1.10-5/depends
/var/abs/network/netcat
/var/abs/network/netcat/PKGBUILD

I have restarted both mpd and ion with no luck.

Offline

#5 2007-01-09 04:50:10

Zoranthus
Member
From: muc
Registered: 2006-11-22
Posts: 166

Re: Ion3 Statusbar

Got it working.. the netcat bin is "nc" here.. so just change

cmd_string = string.format('echo -n "%s" | netcat %s %d',
                               cmd_string, settings.address, settings.port)


to

cmd_string = string.format('echo -n "%s" | nc %s %d',
                               cmd_string, settings.address, settings.port)

in the statusd_mpd smile

Offline

#6 2007-01-09 06:38:01

wounded
Member
Registered: 2007-01-08
Posts: 26

Re: Ion3 Statusbar

Yeah, thanks! haha, it works great now.

Is there any particular reason netcat is nc? Since it uses netcat in the lua file I imagine the nc name is an arch thing or otherwise not commonly used?

Offline

#7 2007-01-09 17:00:40

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: Ion3 Statusbar

wounded wrote:

Yeah, thanks! haha, it works great now.

Is there any particular reason netcat is nc? Since it uses netcat in the lua file I imagine the nc name is an arch thing or otherwise not commonly used?

Debian (as of the last time I used it) renames nc to netcat in their netcat package because of a conflict with another program called nc.

Also, the binary of the GNU rewrite of netcat (what I use) is called "netcat". Only traditional, unmodified netcat is called nc.

Offline

#8 2007-01-11 19:39:12

veek
Member
Registered: 2006-03-10
Posts: 167

Re: Ion3 Statusbar

Hey wounded were you able to get the statusbar_workspace.lua script to work?

Here's the template string I put in ~/.ion3/cfg_statusbar.lua:

template="[ %date || %workspace_pager ]"

The date shows in the status bar, but I'm only getting a question mark for
the pager like you were getting.

I've been through documentation and I seem to be stuck.

Any help is appreciated. Thanks.

Offline

#9 2007-01-11 19:55:24

veek
Member
Registered: 2006-03-10
Posts: 167

Re: Ion3 Statusbar

I just tried out the mpd script and I got that one working, but I still can't get the workspace one.

Offline

#10 2007-01-11 23:58:05

wounded
Member
Registered: 2007-01-08
Posts: 26

Re: Ion3 Statusbar

veek wrote:

I just tried out the mpd script and I got that one working, but I still can't get the workspace one.

I havent been able to get that one working yet. The opnly guess I can offer as to what may be preventing it from working (And this is solely based off of how the mpd script seems to work) is that the statusbar_workspace.lua file should be renamed.

It seems like the %workspace_ prefix to the variables indicates the file that the fcg_statusbar script should look to grab the variables. So, maybe, the statusbar_ part of the workspace script isn't what it should be? It has no template string within it though so I doubt it will be as simple as renaming to statusd_workspace.lus (If I'm even close to being right).

Thoughts?

and thanks to skymt for clearing the naming of netcat up! big_smile

Offline

#11 2007-01-12 03:09:20

veek
Member
Registered: 2006-03-10
Posts: 167

Re: Ion3 Statusbar

Ah after some more googling I discovered that a few of the scripts including
statusbar_workspace.lua, need to be patched to work with the newest version of ion3.
Something get renamed internally (in ion's code) so the scripts need to be updated to reflect that change.

Here's a link where the patch can be found. I was lucky to stumble on this bug report:

http://bugs.donarmstrong.com/cgi-bin/bu … bug=396555

I applied the patch and now the workspace pager is showing.
Actually I just looked at the patch and manually changed the script
because only minor changes on two lines need to be made.

Offline

#12 2007-01-12 03:29:40

wounded
Member
Registered: 2007-01-08
Posts: 26

Re: Ion3 Statusbar

veek wrote:

Ah after some more googling I discovered that a few of the scripts including
statusbar_workspace.lua, need to be patched to work with the newest version of ion3.
Something get renamed internally (in ion's code) so the scripts need to be updated to reflect that change.

Here's a link where the patch can be found. I was lucky to stumble on this bug report:

http://bugs.donarmstrong.com/cgi-bin/bu … bug=396555

I applied the patch and now the workspace pager is showing.
Actually I just looked at the patch and manually changed the script
because only minor changes on two lines need to be made.

Ah! Very nice! I applied the patch but am in KDE right now doing some stuff but I'll switch to Ion in a bit to make sure. Thanks!

Edit: It works perfectly! Thanks :]

Offline

Board footer

Powered by FluxBB