Topic: WMFS bar and a clock

Anyone know of an easy way to get a 12hr clock on the bar in WMFS?

Thanks.

EDIT: I found a script in my install folder called status.sh. So I put that into my .config/wmfs folder and executed and the time/date now appears in my bar. But...I would like to make the clock 12hr and have no idea how to do it.

Last edited by h8uthemost (2011-10-17 04:47:35)

Re: WMFS bar and a clock

In your status script put this
HOUR="`date "+%I:%M'`"

Look this http://en.wikipedia.org/wiki/Date_%28Unix%29

Last edited by ivo (2011-10-17 11:10:00)

hello scrap world wink
webside github

Re: WMFS bar and a clock

I found something similar to that last night, and I replaced that part that says:

wmfs -s "`date`"

with:

HOUR="`date "+%I:%M'`"

And the executed the script and there was no change.

I do have another question though. Not everytime when I log into WMFS does the date/time appear in the bar. I put this into my wmfsrc:

[root]
    background_command = "path to script" 
[/root]

Is that the wrong code?

Re: WMFS bar and a clock

in your status script put this 

HOUR="`date "+%I:%M'`" 
wmfs -s "$HOUR"   


 
to start the status script in your wmfsrc   

status_timing = 3 #seconds
        status_path = "~/.config/wmfs/status.sh"

example

[misc]
        font = "dejavu-9"
        raisefocus = false
        focus_follow_mouse = false
        focus_follow_movement = false
        #opacity = 255

        # focus_pointer_click: click on unfocused client area:
        # true -- default, set focus
        # false -- click go to client; including dockapps
        focus_pointer_click = true
        status_timing = 3 #seconds
        status_path = "~/.config/wmfs/status.sh"

for more info look this my configs https://github.com/ivoarch/.dotfiles/bl … /status.sh

Last edited by ivo (2011-10-18 11:04:22)

hello scrap world wink
webside github

Re: WMFS bar and a clock

Hmmm...I'm still not getting a change in my clock with that code. Here's what my status.sh looks like. Is there anything that I should change?

#!/bin/sh
#WMFS status.sh example file
#Will be executed if put in ~/.config/wmfs/
#Timing adjustable in wmfsrc (misc -> status_timing)

statustext()
{
     HOUR="`date "+%I:%M'`" 
wmfs -s "$HOUR" 
}

while true; do statustext; sleep 10; done

Thanks for the help, ivo. Sometimes config files give me a lot of trouble, and this is unfortunately one of those times.

EDIT: Forgot to mention that status script still isn't autostarting, even with the code you gave me to put into the wmfsrc. I'm constantly having to right-click on the script and hit Execute for the time/date to pop up in the bar.

Last edited by h8uthemost (2011-10-19 02:07:30)