Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Christoph

Pages: [1] 2 3
1
pdaXrom Development / Fvwm With Xrandr
« on: October 26, 2007, 08:23:05 am »
Hi Late,

thank you for your fast answer! This is exactly what I didn't want to hear  
I hoped I had made a mistake that after having corrected it would result in DisplayWidth
returning the right dimensions. I already started doing it the way the diff of icewm indicates,
but zoom still does not work.
I suspect there are plenty of places where fvwm calls DisplayWidth. So I would have
to replace them.

Just an additional question: Do you know if this is just a bug of xfree 4.4.0 or
is this difference in behaviour to xorg intentional?

Christoph

2
pdaXrom Development / Fvwm With Xrandr
« on: October 26, 2007, 03:23:23 am »
Hi developpers,

after hours of searching and trial and error I finally give up and ask you for help. Perhaps someone knows what I am doing wrong.
Some time ago I hacked a bit with fvwm to make it support xrandr, i.e. the viewport gets updated and the menus show up in the
right place. This hack worked fine with Angstrom (->xorg-1.3.0.x). But as this distro does not have the applications I want I switched back
to pdaXrom 1.1.0beta1. And here (->xfree-4.4.0) xrandr does not work. The problem is especially that the event is promoted to fvwm, but
the XRRScreenChangeNotifyEvent does not have the new width and height. Consequently DisplayWidh(...) does return the old width
even after having called XRRUpdateConfiguration(...). On the other hand the field "rotation" is updated.
Does anyone have an idea why?
One more information: I installed icewm from the feed which supports xrandr well. If I compile it myself it has the same problem.
Perhaps it is just a matter of compilation options?

I'd really appreciate if someone could help.

Christoph

3
Zaurus - pdaXrom / Styles For Qt On Pdax
« on: January 25, 2006, 11:12:07 am »
qtconfig doesn't give me the option to choose the metatheme style.
In addition the plugin directory where I expected to be the style.so's is empty.

4
Zaurus - pdaXrom / Styles For Qt On Pdax
« on: January 25, 2006, 04:00:04 am »
Hi,

I compiled metatheme to have a unique look over both qt and gtk apps in pdaX.
But I don't manage to set the style for qt.
Has anyone an idea why? Perhaps styles aren't enabled in qt on pdaX?

Christoph

5
Zaurus - pdaXrom / Kopi (ics) Today
« on: August 07, 2005, 10:25:53 am »
Hi,

here is now a new version of the appointment applet. This time it uses the mktime function implemented
in awk. It should now work on all timezones and for (nearly) all daylight savings. Maybe there are problems with events around the day of daylight saving start/end.
Still no implementation of recurrent events.
And the events aren't sorted per time within a day.
In the fvwm part I made a mistake with the setting of awk variables. All variables are set by -v <variable name>=<value>.
I also exported more variables, making it easier to customize. Here is how it should look now:

Code: [Select]
DestroyFunc RecreateTodayMenu
AddToFunc RecreateTodayMenu
+ I DestroyMenu recreate TodayMenu
+ I ChangeMenuStyle today TodayMenu
+ I Piperead '$[HOME]/bin/appointment-applet.awk\
              -v MENU_NAME=TodayMenu\
              -v LANGUAGE=en\
              -v DAYSAHEAD=10\
              -v APPOINTMENT_ICON=/usr/lib/qt/lib/kdepim/korganizer/icons16/newevent.png\
              -v TODO_ICON=/usr/lib/qt/lib/kdepim/korganizer/icons16/todo.png\
              -v ALARM_ICON=/usr/lib/qt/lib/kdepim/korganizer/icons16/bell.png\
              $[HOME]/kdepim/config/korganizerrc $[HOME]/kdepim/apps/korganizer/mycalendar.ics'
+ I Piperead '$[HOME]/bin/birthday-applet.awk\
              -v MENU_NAME=TodayMenu\
              -v LANGUAGE=en\
              -v DAYSAHEAD=21\
              $[HOME]/kdepim/apps/kabc/std.vcf'
+ I AddToMenu TodayMenu DynamicPopupAction RecreateTodayMenu

Style Today StaysOnTop
Colorset 30 fg black, bg white, hi white, sh black
MenuStyle today ItemFormat "%.5s%3i%5p%5.5l%.5r"
MenuStyle today MenuColorset 30
MenuStyle today SidePic /home/root/.fvwm/pixmaps/today-sidepicture.png
MenuStyle today SeparatorsShort, HilightBackOff, Hilight3DOff, ActiveForeOff, BorderWidth 0
MenuStyle today Foreground black, Background white
MenuStyle today Font "StringEncoding=UTF-8:xft:Arial:size=14:encoding=iso8859-1"
ChangeMenuStyle today TodayMenu
AddToMenu TodayMenu DynamicPopupAction RecreateTodayMenu
I assume that the kdepim files are installed in /usr/lib/qt/lib. If you have another encoding of the ics file
change the StringEncoding to your needs.
The scripts starts to become a bit slow. On my C860 it now needs 2-3 seconds to show.
If you like you may also add the sidepicture:


Christoph

6
Zaurus - pdaXrom / Kopi (ics) Today
« on: August 07, 2005, 05:08:59 am »
Quote
You do similar with tzadd (which BTW doesn't work for me. I'm -8:00 hours, and if I have an appointment at 7:00am, it comes up with some wierd number).
You are too far away from Greenwich ;-)
I  will look at that. I didn't think of day changes with the time zone.
Quote
Essentially I strip off -PT. Convert xD yH zM  to minutes. Take DTSTART, subtract minutes from the time, subtract hours and minutes and days if necessary (trying to figure out a portable way of subtracting a day when we need to go back to a previous month).
If you get stuck: On the gawk pages I found an mktime function that is implemented in awk, so it should work with the awk on
pdaXrom. I still didn't include it in the appointment applet but I think that is the way I would re-implement the tzadd:
Code: [Select]
#!/usr/bin/awk -f

BEGIN {

##
# initialization for the mktime function
##
    # Initialize table of month lengths
    _tm_months[0,1] = _tm_months[1,1] = 31
    _tm_months[0,2] = 28; _tm_months[1,2] = 29
    _tm_months[0,3] = _tm_months[1,3] = 31
    _tm_months[0,4] = _tm_months[1,4] = 30
    _tm_months[0,5] = _tm_months[1,5] = 31
    _tm_months[0,6] = _tm_months[1,6] = 30
    _tm_months[0,7] = _tm_months[1,7] = 31
    _tm_months[0,8] = _tm_months[1,8] = 31
    _tm_months[0,9] = _tm_months[1,9] = 30
    _tm_months[0,10] = _tm_months[1,10] = 31
    _tm_months[0,11] = _tm_months[1,11] = 30
    _tm_months[0,12] = _tm_months[1,12] = 31

}

#########################################################
# the mktime function
#########################################################
function _tm_isleap(year,    ret) {
    ret = (year % 4 == 0 && year % 100 != 0) ||
            (year % 400 == 0)

    return ret
}

function _tm_addup(a,    total, yearsecs, daysecs,
                         hoursecs, i, j) {
    hoursecs = 60 * 60
    daysecs = 24 * hoursecs
    yearsecs = 365 * daysecs

    total = (a[1] - 1970) * yearsecs

    # extra day for leap years
    for (i = 1970; i < a[1]; i++)
        if (_tm_isleap(i))
            total += daysecs

    j = _tm_isleap(a[1])
    for (i = 1; i < a[2]; i++)
        total += _tm_months[j, i] * daysecs

    total += (a[3] - 1) * daysecs
    total += a[4] * hoursecs
    total += a[5] * 60
    total += a[6]

    return total
}

function my_mktime(str,    res1, res2, a, b, i, j, t, diff) {
    i = split(str, a, " ")    # don't rely on FS

    if (i != 6)
        return -1

    # force numeric
    for (j in a)
        a[j] += 0

    # validate
    if (a[1] < 1970 ||
        a[2] < 1 || a[2] > 12 ||
        a[3] < 1 || a[3] > 31 ||
        a[4] < 0 || a[4] > 23 ||
        a[5] < 0 || a[5] > 59 ||
        a[6] < 0 || a[6] > 61 )
            return -1

    res1 = _tm_addup(a)
    t = strftime("%Y %m %d %H %M %S", res1)

    if (_tm_debug)
        printf("(%s) -> (%s)\n", str, t) > "/dev/stderr"

    split(t, b, " ")
    res2 = _tm_addup(b)

    diff = res1 - res2

    if (_tm_debug)
        printf("diff = %d seconds\n", diff) > "/dev/stderr"

    res1 += diff

    return res1
}

{

  printf("MyMkTime:   %d\n", my_mktime("2005 08 07 10 54 18"));
  printf("GawkMkTime: %d\n", mktime("2005 08 07 10 54 18"));

}

to test it you can make a file test_mktime.awk (chmod 755) and call
echo 1 | ./test_mktime.awk
with gawk installed.

I simply copied it from the page. The usage is
mktime("YYYY MM DD HH MM SS"),
and this information can be stripped from the DTSTART. Then you would need a translation of the alarm duration to
seconds and subtract the seconds from the result of mktime. After that you don't have to bother with leap years.

Christoph

7
Zaurus - pdaXrom / Kopi (ics) Today
« on: August 06, 2005, 09:30:58 am »
Quote
Thanks, I've been playing around with it to get the alarm time. Essentially pull off the -PT1H28M etc.. and subtract it from the DTSTART. Just working out how DTSTART etc stores hours and minutes. Nearly done.
I'm impressed! How do you subtract "PT1H28M" from, let's say "20040220T091800Z", considering leap years etc?
When it's done I hope you publish it.
Quote
BTW, I don't think your script handles recursive events, though that I imagine would be quite difficult.
Right, I still didn't think about that.
Quote
If you made it an applet for matchbox, then you've basically replaced kopi-alarm applet entirely ;-)
I am no expert for matchbox (ok, for fvwm neither, but I know a bit more of it than of matchbox).
And I thought that to customize it for other wm than fvwm I would left as an exercise to the reader  ;-)

But.
Here is the logical continuation:
 [ Invalid Attachment ]
If you managed to include the appointment-applet, this here may simply be included by adding
Code: [Select]
+ I Piperead '$[HOME]/bin/birthday-applet.awk MENU_NAME=TodayMenu DAYSAHEAD=10 $[HOME]/kdepim/apps/kabc/std.vcf'just after the line where the appointment applet is read.
And again you have to change the path to the icon to see it in the menu.

Christoph

8
Zaurus - pdaXrom / Kopi (ics) Today
« on: August 06, 2005, 04:59:30 am »
I looked at the possibility to use the script or awk in general to determine the next
alarm time. The simplest way would have been to use timestamps to determine the
time of the alarm from the begin of the event and the alarm duration.
Unfortunatly the busybox version of awk doesn't know the mktime command, so
that would have to be implemented in awk itself, which in turns look like a bit of work ;-)
Perhaps someone knows a simple solution for that?
Apart from that "little" problem it shouldn't be too hard to implement it.

There is a newer version of the appointment applet that fixes a bug with the Title
(it showed the wrong day and month).
Apart from that I would like to know if the combination of the time zone and summer time
defined in the konquerorrc works. Does the menu show the correct times for everybody?

Christoph

9
Zaurus - pdaXrom / Kopi (ics) Today
« on: August 04, 2005, 11:27:40 am »
Hi fvwm-users (and others),

perhaps you are interested in a menu that shows the coming appointments and
todos from your .ics calendar file.
I wrote it because I do not want to have kopi open all the time and I missed a
feature like the "Today" app for opie and qpe. And for pleasure, of course ;-)
It is writen in AWK and builds the menu on-the-fly. To give you an idea how it looks:

Of couse it may be changed (this one is for my desktop, the pdaXrom version looks different). To integrate it you may do the following:
In your .fvwm2rc add lines like
Code: [Select]
DestroyFunc RecreateTodayMenu
AddToFunc RecreateTodayMenu
+ I DestroyMenu recreate TodayMenu
+ I ChangeMenuStyle today TodayMenu
+ I Piperead '$[HOME]/bin/appointment-applet.awk MENU_NAME=TodayMenu\
                                               DAYSAHEAD=10\
                                               $[HOME]/kdepim/config/korganizerrc\
                                               $[HOME]/kdepim/apps/korganizer/mycalendar.ics'
+ I AddToMenu TodayMenu DynamicPopupAction RecreateTodayMenu

CopyMenuStyle * today
Colorset 31 fg black, bg white, sh #ababab, hi white
MenuStyle today ItemFormat "%3i%5.5l%.2r"
MenuStyle today MenuColorset 31
ChangeMenuStyle today TodayMenu
AddToMenu TodayMenu DynamicPopupAction RecreateTodayMenu

# Add to root menu
AddToMenu MenuFvwmRoot Popup TodayMenu

Of course the script may also by used by others. It is structured in a simple way.
There is the BEGIN block where some defaults are set. There you should change the
icons to ones that exists on pdaXrom.
Then comes the evaluation of the text lines from korganizerrc and mycalendar.ics.
The special block /END:(VEVENT|VTODO)/ collects the data for one appointment or todo and stores it in arrays.
In the END block that data is printed.

If you intend to use it on the desktop be sure to have gawk installed. At least with the awk version that comes with ubuntu base installation the script doesn't work. On pdaXrom I had no problems.
I hope you like it and I would appreciate comments and hints to enhance it.

Christoph

10
Zaurus - pdaXrom / Fvwm-pdaxrom 0.3.x
« on: July 20, 2005, 11:28:01 am »
Hi jerrybme,

Quote
I've found that I had multiple instances of the same process running after when switching back & forth from landscape & portrait several times. I had 5 instances of the mb-applet-blanker and 2 instances of xystray. Xystray & the mb-applets were easy to take care of by adding
Code: [Select]
killall xystray
killall mb-applet-blanker
killall mb-applet-cards
to the begining of the landscape & portrait scripts
Just to be sure: If you kill xystray while the taskbar (I mean the whole one as fvwm module, not ztaskbar   ) is still running, it may be restarted because of the Respawn option for the swallowing. Maybe you should remove the Respawn (if you haven't done it yet) or do the killall after the module has been stopped in the script.

Christoph

11
Zaurus - pdaXrom / Fvwm-pdaxrom 0.3.x
« on: July 18, 2005, 01:33:30 pm »
Hi,

Quote
Where should I put the mb-applet commands? They work fine if I run them from a terminal within fvwm. However
Code: [Select]
+ I Exec exec /usr/bin/mb-applet-cardsdoesn't work in the .fvwm2rc file

I suggested to put them in the scripts fvwm-landscape.sh and fvwm-portrait.sh
(Look at the last two lines I added).
I don't know, perhaps .fvwm2rc is too early as the Taskbar may still not be
running when the applets are launched.

Quote
adding to the .xinitrc.fvwm almost worked
Code: [Select]
/usr/bin/fvwm &
/usr/bin/mb-applet-cards
However when you go to portrait mode the X server crashes. 

Try the brutal method and do a
Code: [Select]
...
# We set the size of the maximized windows
$FVWMCOMMAND 'KillModule FvwmButtons ZaurusTaskbar'
$FVWMCOMMAND 'DestroyFunc ZaurusMaximize'
$FVWMCOMMAND 'AddToFunc ZaurusMaximize I Maximize $0 640p 448p'
killall mb-applet-cards
killall the-other-applets
killall xystray
# This is the definiton for the landscape taskbar
$FVWMCOMMAND 'DestroyModuleConfig ZaurusTaskbar: *'
$FVWMCOMMAND '*ZaurusTaskbar: ButtonGeometry 16x32+0-0'
...

Christoph

12
Zaurus - pdaXrom / Fvwm-pdaxrom 0.3.x
« on: July 17, 2005, 10:52:39 am »
Hi,

here is the ipk of xystray.
To use it in the ZaurusTaskbar of fvwm, you have to change
the scripts fvwm-portrait.sh and fvwm-landscape.sh

old (landscape):
$FVWMCOMMAND '*ZaurusTaskbar: (25x1, Swallow FvwmIconMan `FvwmIconMan`)
new (landscape):
$FVWMCOMMAND '*ZaurusTaskbar: (21x1, Swallow FvwmIconMan `FvwmIconMan`)
$FVWMCOMMAND '*ZaurusTaskbar: (4x1, Swallow (Respawn) Xystray `Exec exec xystray -iconrows 1 -iconcols 2 -iconsize 32`)
mb-applet-cards
mb-applet-whateveryouwant

old (portrait):
$FVWMCOMMAND '*ZaurusTaskbar: (13x1, Swallow FvwmIconMan `FvwmIconMan`)
new (portrait):
$FVWMCOMMAND '*ZaurusTaskbar: (9x1, Swallow FvwmIconMan `FvwmIconMan`)
$FVWMCOMMAND '*ZaurusTaskbar: (4x1, Swallow (Respawn) Xystray `Exec exec xystray -iconrows 1 -iconcols 2 -iconsize 32`)
mb-applet-cards
mb-applet-whateveryouwant



This will make the icon bar narrower and add the system tray which can hold two icons from matchbox.

It is not perfect but at least it works until the ztaskbar is complete.


Christoph

13
Zaurus - pdaXrom / Fvwm-pdaxrom 0.3.x
« on: July 16, 2005, 02:40:16 pm »
Hi,

Quote
If somebody has an idea, how to use matchbox applets under fvwm, that will come handy until there's proper support for everything in ztaskbar.

http://freshmeat.net/projects/xystray/ does the job. I will post an arm version later.

Christoph

14
Zaurus - pdaXrom / Fvwm And Rox
« on: July 15, 2005, 05:56:28 pm »
Hi,

Quote
How can i modify .xinitrc for using FVWM with ROX DESKTOP ?

I try to insert

rox --pinboard=MYPINBOARD

at the end of the file but it doesent work...

I use SL6000

Thanks Gabriele
[div align=\"right\"][a href=\"index.php?act=findpost&pid=88498\"][{POST_SNAPBACK}][/a][/div]
The commands in .fvwm2rc are fvwm-commands. fvwm does not know
the "fvwm"-command rox. But it knows how to start external programs by
the fvwm-command "Exec".
The "normal" way to add programs at startup is to add them
to the fvwm-function "FvwmStartFunc" that you will find in .fvwm2rc

Insert

+ I Exec rox --pinboard=MYPINBOARD

directly after the line for FvwmCommandS

That should work.

Christoph

15
Zaurus - pdaXrom / Fvwm-pdaxrom 0.3.x
« on: July 15, 2005, 02:03:33 pm »
Hi zumi,

Quote
This problem came in my mind, too. I think what you wrote doesn't solve the problem (but good idea, I will add that $0 in the function, it can come handy). The problem is, that I have no idea how to run the ZaurusMaximize command on all the maximized apps at the appropriate time.
If I put simply "ZaurusMaximize true" in the rotater scripts, it lets me pick a window that will be remaximized.

You were right. I tested it. An "All (Maximized) Maximize true Xp Yp" worked on all maximized windows but they are only restored, even with the "true" parameter.
But a
Quote
$FVWMCOMMAND "All (Maximized) ResizeMaximize Xp Yp"
works for me.

Maybe you could try that.

Christoph

Pages: [1] 2 3