Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42

Thread: What is the tiniest Window Manager in existence for Linux?

  1. #1
    Join Date
    Jun 2007
    Location
    Kent, UK
    Beans
    214
    Distro
    Ubuntu

    What is the tiniest Window Manager in existence for Linux?

    I was wondering about this because I wanted one that I could play games on under Cedega, and my first thoughts were awesome, Fluxbox, TWM etc etc, just to give my pc the easiest time possible and offset the (possibly small) performance hit of playing games emulated.

    But that got me thinking. What is the smallest window manager out there? Is there ANYTHING smaller than TWM? o.O

    Hoppi
    Registered Ubuntu user #28880

  2. #2
    Join Date
    Jun 2005
    Beans
    6,115

    Re: What is the tiniest Window Manager in existence for Linux?

    CLI?



    Maybe ratpoison
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  3. #3
    Join Date
    Apr 2008
    Location
    RiceMonsterland, Canada
    Beans
    Hidden!

    Re: What is the tiniest Window Manager in existence for Linux?

    TinyWM. It's only 50 lines of code or something like that.

    Edit: Here's the code:

    Code:
    /* TinyWM is written by Nick Welch <mack@incise.org>, 2005.
     *
     * This software is in the public domain
     * and is provided AS IS, with NO WARRANTY. */
    
    #include <X11/Xlib.h>
    
    #define MAX(a, b) ((a) > (b) ? (a) : (b))
    
    int main()
    {
        Display * dpy;
        Window root;
        XWindowAttributes attr;
        XButtonEvent start;
        XEvent ev;
    
        if(!(dpy = XOpenDisplay(0x0))) return 1;
    
        root = DefaultRootWindow(dpy);
    
        XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym("F1")), Mod1Mask, root,
                True, GrabModeAsync, GrabModeAsync);
        XGrabButton(dpy, 1, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync,
                GrabModeAsync, None, None);
        XGrabButton(dpy, 3, Mod1Mask, root, True, ButtonPressMask, GrabModeAsync,
                GrabModeAsync, None, None);
    
        for(;;)
        {
            XNextEvent(dpy, &ev);
            if(ev.type == KeyPress && ev.xkey.subwindow != None)
                XRaiseWindow(dpy, ev.xkey.subwindow);
            else if(ev.type == ButtonPress && ev.xbutton.subwindow != None)
            {
                XGrabPointer(dpy, ev.xbutton.subwindow, True,
                        PointerMotionMask|ButtonReleaseMask, GrabModeAsync,
                        GrabModeAsync, None, None, CurrentTime);
                XGetWindowAttributes(dpy, ev.xbutton.subwindow, &attr);
                start = ev.xbutton;
            }
            else if(ev.type == MotionNotify)
            {
                int xdiff, ydiff;
                while(XCheckTypedEvent(dpy, MotionNotify, &ev));
                xdiff = ev.xbutton.x_root - start.x_root;
                ydiff = ev.xbutton.y_root - start.y_root;
                XMoveResizeWindow(dpy, ev.xmotion.window,
                    attr.x + (start.button==1 ? xdiff : 0),
                    attr.y + (start.button==1 ? ydiff : 0),
                    MAX(1, attr.width + (start.button==3 ? xdiff : 0)),
                    MAX(1, attr.height + (start.button==3 ? ydiff : 0)));
            }
            else if(ev.type == ButtonRelease)
                XUngrabPointer(dpy, CurrentTime);
        }
    }
    Code:
    while true; do echo -n "RiceMonster "; done
    Best thread ever

  4. #4
    Join Date
    Jun 2007
    Location
    Kent, UK
    Beans
    214
    Distro
    Ubuntu

    Re: What is the tiniest Window Manager in existence for Linux?

    Wow, that really is tiny!

    Im not sure if its possible to beat 50 lines of code! lol
    Registered Ubuntu user #28880

  5. #5
    Join Date
    May 2008
    Beans
    60

    Re: What is the tiniest Window Manager in existence for Linux?

    tinywm wins, but I think dwm takes it for one that is actively maintained and has a decent user base.

  6. #6
    Join Date
    Jun 2009
    Location
    0000:0400
    Beans
    Hidden!

    Re: What is the tiniest Window Manager in existence for Linux?

    The smallest is none at all. Run your app on a separate X server. I've got a script called newX that looks like this:
    Code:
    #!/bin/bash
    DISPLAY=:1
    X :1 -ac -terminate &
    sleep 2
    $*
    so running `newX <application>` would launch a new X server with only your application running on it. It'll use the next available virtual console, so if you use ctrl-alt-f7 to get back to your desktop from a TTY, the new X server will be ctrl-alt-f8.

  7. #7
    Join Date
    Aug 2009
    Location
    Mississippi, USA
    Beans
    460
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: What is the tiniest Window Manager in existence for Linux?

    TinyWM = Winner.

    Other light WMs I like are.. Windowmaker and Afterstep
    Linux User: 380654
    CIW Certified Internet Web Professional: 435668

  8. #8
    Join Date
    Jul 2006
    Location
    Texas
    Beans
    300
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: What is the tiniest Window Manager in existence for Linux?

    I usually don't bother with trying to use the most efficient window manager since modern PCs usually have plenty of horsepower, but AfterStep sure does look interesting. The screen shots have quite a bit more eye candy than I am used to seeing on that type of system.

    http://www.afterstep.org/screenshots...shot.glass.jpg

  9. #9
    Join Date
    Feb 2007
    Location
    Tuxland
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: What is the tiniest Window Manager in existence for Linux?

    Quote Originally Posted by falconindy View Post
    The smallest is none at all. Run your app on a separate X server. I've got a script called newX that looks like this:
    Code:
    #!/bin/bash
    DISPLAY=:1
    X :1 -ac -terminate &
    sleep 2
    $*
    so running `newX <application>` would launch a new X server with only your application running on it. It'll use the next available virtual console, so if you use ctrl-alt-f7 to get back to your desktop from a TTY, the new X server will be ctrl-alt-f8.
    ++

    Most people don't realize that X will happily run without a WM. I do this to make VM sessions, a session which "boots" into an OS, by writing a session which calls VBoxSDL.
    Proud GNU/Linux zealot and lover of penguins
    "Value your freedom or you will lose it, teaches history." --Richard Stallman

  10. #10

    Re: What is the tiniest Window Manager in existence for Linux?

    Musca might be interesting to you. Not the smallest, but very small all the same.

    http://aerosuidae.net/musca
    Ubuntu user #7247 :: Linux user #409907
    inconsolation.wordpress.com

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •