jefklaks stuff

jefklak.suidzer0.org/index.php?i … loads/fvwm
If anyone is intrested, my (quite old) configuration file, but still the quite good one :slight_smile: It includes as less as possible since I do like the fast startup times of fvwm. There’s a selfmade buttonbar on the bottom of the screen, with ACPI monitor & dell laptop CPU state monitor (both stupid selfmade scripts)

Screenshots:
jefklak.suidzer0.org/index.php?id=screenshots


Iconset is of course lila.

Some other scripts used are:

transset.c patched to get an extra argument from Xorg 6.8
Scrolling on title bars gives you a nice effect! use:

#### Wheel Toggle Shade Mouse 4 T N Exec exec ${HOME}/.fvwm/settrans.pl $[w.id] - Mouse 5 T N Exec exec ${HOME}/.fvwm/settrans.pl $[w.id] +

Source:
jefklak.suidzer0.org/downloads/fvwm/FvwmTransset
The dell script: - read it yust like your digitalclock & swallow as button!

[code]#!/usr/bin/perl

#my $celsius = ‘°C’;
my $celsius = ’ C’;

open(DELLINFO, “</proc/i8k”);
my $temp = (split(/\s+/, ))[3];
close DELLINFO;

printf(’%d%s’, $temp , $celsius);

// USE IN FVWM
WindowTitle {FvwmApplet-i8k}
WindowSize 64 14 # Taille
Font “Shadow=1 se:xft:Crillee:size=14”

Init
Begin
Set $MainColorset=(GetScriptArgument 1)
If $MainColorset <> {} Then
Begin
ChangeColorset 0 $MainColorset
ChangeColorset 1 $MainColorset
End
Set $tmp = (GetOutput {exec /home/jefklak/scripts/i8ktemp} 1 -1)
ChangeTitle 1 $tmp
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 60)==0 Then
Begin
Set $tmp = (GetOutput {exec /home/jefklak/scripts/i8ktemp} 1 -1)
ChangeTitle 1 $tmp
End
End

Widget 1
Property
Position 0 0
Size 64 14
Type ItemDraw
Flags NoReliefString
Title {}
Main
Case message of
SingleClic :
Begin
End
End[/code]

Cool, I’ve tried to get this working with pre 6.8 releases of Xorg but xcompmgr was badly broken on my system, now transset actually works, gotta try this :slight_smile:

Now I was wondering if you need the patched transset for this module or does the default one suffice?

Hey Jefklak,

I hope you don’t mind but i blatantly copied your web site, as seen here: alunt.homelinux.org/

I’ve seen a lot of web sites in my time but i thought your one was so good i just had to have it.

I took a chance that in the spirit of all things Linux and open source that you wouldn’t mind, grovel icon

If your not happy, i will remove it.

In the mean time i will continue to work on it and i try to fill it with something worth viewing.

:wink:

Yes you do need a patched version, because right now you need to click on a window to actually shade it. When patched it also takes arguments with the Process ID to identify the window, and thats what the settrans.pl thing does :slight_smile: its patched here:

[code]/* Simple program to toggle Translucency property on next window clicked
Uses dsimple.h and dsimple.c from xlsfonts.
Based on xprops and xwininfo

By Matthew Hawn
Use however you want. I can’t stop you.
*/

#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include “dsimple.h”
#include <stdlib.h>

static char *window_id_format = “0x%lx”;

Window target_win;

/* needed by dsimple.c */

void usage()
{
fprintf(stderr, “Bad arguments\n”);
}

#define OPAQUE 0xffffffff
#define OPACITY “_NET_WM_WINDOW_OPACITY”

/* nothing fancy */
int main(int argc, char **argv)
{
int gotd = 0;
double d;
unsigned int opacity;

Window root_win, parent_win;
unsigned int num_children;
Window *child_list;

printf (“arg count: %d\n”, argc);

/* wonderful utility /
Setup_Display_And_Screen(&argc, argv);
printf(“Setup Display and Screen done\n”);
/
Select a window by arguments…

  • Kicks in before the original Select_Window function.
    */
    target_win = Select_Window_Args(&argc, argv);

/* If no window was given to us in the command line… make the user

  • find his window the old way… This is mainly the original stuffs
    /
    /
    grab mouse and return window that is next clicked /
    if (!target_win)
    {
    target_win = Select_Window(dpy);
    }
    else
    {
    printf(“Selected target window successfully\n”);
    /
    Okay. Note from Ashley here. I don’t know what the heck this is.
  • However. it works.
  • The window id you pass this program… it will then get that window’s
  • parent’s ID. And then… it will get the parent of the parent’s ID.
  • For the sake of just being quick, I reused the target_win variable.
    */
    if (!XQueryTree(dpy, target_win, &root_win, &parent_win, &child_list,
    &num_children))
    Fatal_Error(“Can’t query window tree.”);
    if (!XQueryTree(dpy, parent_win, &root_win, &target_win, &child_list,
    &num_children))
    Fatal_Error(“Can’t query window tree.”);

printf(“Selected window with id:”);
printf(window_id_format, target_win);
printf("\nParent’s parent id:");
printf(window_id_format, target_win);
printf("\n\n");
};
if (argv[1])
{
printf (“got arg %s\n”, argv[1]);
d = atof (argv[1]);
printf (“d is %g\n”, d);
gotd = 1;
}

/* grab mouse and return window that is next clicked */
if (!target_win)
{
parent_win = Select_Window(dpy);
};
unsigned char *data;

Atom actual;
int format;
unsigned long n, left;

if (gotd)
opacity = (unsigned int) (d * OPAQUE);
else
{
/* get property */
XGetWindowProperty(dpy, target_win, XInternAtom(dpy, OPACITY, False),
0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left,
(unsigned char **) &data);

if (data != None)
  {
memcpy (&opacity, data, sizeof (unsigned int));
XFree(( void *) data );
printf("Found property: %g\n", (double) opacity / OPAQUE);
  }
else
  opacity = OPAQUE;

/* toggle */
if (opacity != OPAQUE)
  opacity = OPAQUE;
else
  opacity = 0xc0000000;

}

printf (“opacity 0x%x\n”, opacity);
if (opacity == OPAQUE)
XDeleteProperty (dpy, target_win, XInternAtom(dpy, OPACITY, False));
/* set it */
else
{
XChangeProperty(dpy, target_win, XInternAtom(dpy, OPACITY, False),
XA_CARDINAL, 32, PropModeReplace,
(unsigned char *) &opacity, 1L);
printf(“XChangeProperty”);
}
XSync(dpy, False);
printf(“Set Property to %g\n”, (double) opacity / OPAQUE);

/* all done, wasn’t that simple */
return 0;
}[/code]

gcc -c transset.c -o transset && chmod +x transset && mv transset /usr/bin

Woah :slight_smile:
If you don’t have the time to work on a site yourself, I don’t really mind mindless copying stuff like that. But you could at least change the colors & font a little bit so it doesn’t resemble that much you know :slight_smile: Anyway, my site is far from done yet and time costs me too much right now… Keep up the good work!

Thanks Jefklak.

I would have liked to change the colour to a nice blue but i dont know how.

All the other web pages i have looked at have numbers that i can change to get a different colour but yours doesn’t have that?

Is it written in html or php?

I’m still a virgin when it comes to web sites but i’m learning.

:laughing:

It’s CSS, a different file. Look at the in the HEAD tag.
Try to google for some css basics :slight_smile:

The site is mainly PHP.