You are not logged in.

#126 2010-07-12 21:25:44

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

zenny wrote:

I am a bit lost after trying several times :-(

1st try) I tried to recompile after executing 'make clean' and what I got was:

error: Your local changes to 'config.h' would be overwritten by merge.  Aborting.
Please, commit your changes or stash them before you can merge.
    Aborting...

2nd try) Then I tried to build and install the same with packer and yaourt, but got the error:

/tmp/packerbuild-1000/catwm-git/catwm-git/PKGBUILD: line 37: config.h: command not found
    Aborting...
The build failed.

3rd try) Then I added $srcdir/$_gitname/config.g in line 37 of the PKGBUILD and compiled to get the following error.

==> Starting make...
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 1: /bin: is a directory
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 3: syntax error near unexpected token `('
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 3: ` *  ( o   o )  Made by cat...'
    Aborting...
The build failed.

Last time too I could only compile by placing a # in front of line 37.

Hum... If you want to recompile don't use the PKGBUILD...

just make that it would be more simple:

$ cd ~
$ mkdir temp
$ cd temp
$ git clone git@github.com:pyknite/catwm.git
$ cd catwm
 Make your change in config file
$ make
 and if you want to install it
$ sudo make install

And do a "make clean" after any change in config.h otherwise it will not recompile

Offline

#127 2010-07-12 21:38:15

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: catwm, Cute and Tiny Window Manager

/tmp/packerbuild-1000/catwm-git/catwm-git/PKGBUILD: line 37: config.h: command not found

Occures when you use aur-wrapper like packer or yaourt, or if you haven't the $EDITOR environmentvariable set.

To the maintainer of the package:
i would suggest to change the PKGBUILD to the following:

    # edit config.h
    if [ "$EDITOR" != "" ]; then
        $EDITOR config.h
    else
        #fallback to nano
        nano config.h
    fi

This way, the error mentioned above doesn't occur anymore. And since nano is in the base group of pacman
we can assume that it is present on every arch machine.

Offline

#128 2010-07-12 21:38:34

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: catwm, Cute and Tiny Window Manager

zenny wrote:

==> Starting make...
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 1: /bin: is a directory
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 3: syntax error near unexpected token `('
/tmp/packerbuild-1000/catwm-git/catwm-git/src/catwm/config.h: line 3: ` *  ( o   o )  Made by cat...'
    Aborting...
The build failed.

Last time too I could only compile by placing a # in front of line 37.

I've always gotten this error when using the PKGBUILD. That's why I always pull the latest from github and manually compile/install.

Offline

#129 2010-07-12 22:11:14

jck
Member
From: USA
Registered: 2009-05-08
Posts: 97

Re: catwm, Cute and Tiny Window Manager

so, is catwm moving to xcb?

Offline

#130 2010-07-12 22:21:39

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

jck wrote:

so, is catwm moving to xcb?

Yes, when I got the time to make the switch wink I got a lot of work for school in the two next weeks sad

Offline

#131 2010-07-12 23:56:47

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: catwm, Cute and Tiny Window Manager

pyknite wrote:
jck wrote:

so, is catwm moving to xcb?

Yes, when I got the time to make the switch wink I got a lot of work for school in the two next weeks sad

It seems knopwob is fairly far with converting it smile I took a stab at it, and let me say translating Xlib to XCB is so much harder than XCB to Xlib.

Offline

#132 2010-07-13 00:47:32

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: catwm, Cute and Tiny Window Manager

itsbrad212 wrote:
pyknite wrote:
jck wrote:

so, is catwm moving to xcb?

Yes, when I got the time to make the switch wink I got a lot of work for school in the two next weeks sad

It seems knopwob is fairly far with converting it smile I took a stab at it, and let me say translating Xlib to XCB is so much harder than XCB to Xlib.

well, no. not really. I've started the conversion but i'm stuck and don't have enough time for that atm. So what i send to you is still the current status. 
http://pastie.org/1038440

Offline

#133 2010-07-13 03:16:36

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: catwm, Cute and Tiny Window Manager

knopwob wrote:
itsbrad212 wrote:
pyknite wrote:

Yes, when I got the time to make the switch wink I got a lot of work for school in the two next weeks sad

It seems knopwob is fairly far with converting it smile I took a stab at it, and let me say translating Xlib to XCB is so much harder than XCB to Xlib.

well, no. not really. I've started the conversion but i'm stuck and don't have enough time for that atm. So what i send to you is still the current status. 
http://pastie.org/1038440

Oh...ok then smile I'll see if I can get anywhere, but no promises tongue

Offline

#134 2010-07-13 08:01:12

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

itsbrad212 wrote:
knopwob wrote:
itsbrad212 wrote:

It seems knopwob is fairly far with converting it smile I took a stab at it, and let me say translating Xlib to XCB is so much harder than XCB to Xlib.

well, no. not really. I've started the conversion but i'm stuck and don't have enough time for that atm. So what i send to you is still the current status. 
http://pastie.org/1038440

Oh...ok then smile I'll see if I can get anywhere, but no promises tongue

If you work on it, just rename the file to catwm_xcb.c and add it to git. So I'll take a look at it.

Offline

#135 2010-07-25 09:26:54

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

Yep, I Just finished my bachelor project!!! I'm back on catwm wink

Offline

#136 2010-07-30 12:07:15

prochy
Member
From: Czech Republic
Registered: 2010-04-02
Posts: 8

Re: catwm, Cute and Tiny Window Manager

Thanks for your work on it, i really love this WM (and its name is super lovely too...:))
Do you plan to add multihead support?
I use catwm on my notebook and i'd like to use it on my main computer too, but it has 3 monitors

Offline

#137 2010-08-01 11:10:04

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

prochy wrote:

Thanks for your work on it, i really love this WM (and its name is super lovely too...:))
Do you plan to add multihead support?
I use catwm on my notebook and i'd like to use it on my main computer too, but it has 3 monitors

It's planned for the future... First I really need to work on the port (I just made party this week wink Need a two weeks break from computer wink )

Offline

#138 2010-08-01 12:32:12

72linus
Member
From: gordonsville,va
Registered: 2009-03-14
Posts: 144
Website

Re: catwm, Cute and Tiny Window Manager

Hello
uh...How do I get catwm to run?

I made a .xinitrc but when I use startx I just get black screen....

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# Launch xscreensaver (if available), but only as non-root user
if test $UID -gt 0 -a -z "$VNCSESSION"; then
    if test x"`which xscreensaver 2>/dev/null`" != x""; then
        xscreensaver -no-splash &
    elif test x"`which gnome-screensaver 2>/dev/null`" != x""; then
        gnome-screensaver &
    fi
fi

# Use dbus-launch if installed.
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
    dbuslaunch=`which dbus-launch`
    if test x"$dbuslaunch" != x"" -a x"$dbuslaunch" != x"no"; then
        eval `$dbuslaunch --sh-syntax --exit-with-session`
    fi
fi

# Start the window manager:
exec /usr/bin/catwm

so, how do I start it?
is there a .catwmrc or ?
thx

Offline

#139 2010-08-01 12:36:05

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

no, no .catwmrc... When you start catwm you get a blank screen... There is no window open, no panel,... You need to spawn an app (with alt+p) or a term (with alt+maj+enter)

Offline

#140 2010-08-01 12:41:02

72linus
Member
From: gordonsville,va
Registered: 2009-03-14
Posts: 144
Website

Re: catwm, Cute and Tiny Window Manager

ok thx

what are all the commands to start apps, etc??

Offline

#141 2010-08-01 14:45:09

pyknite
Member
Registered: 2010-03-03
Posts: 166

Re: catwm, Cute and Tiny Window Manager

72linus wrote:

ok thx

what are all the commands to start apps, etc??

You can find all shortcut in the config.h file... And you can add your own!

Offline

#142 2010-08-01 14:54:30

prochy
Member
From: Czech Republic
Registered: 2010-04-02
Posts: 8

Re: catwm, Cute and Tiny Window Manager

pyknite wrote:

It's planned for the future... First I really need to work on the port (I just made party this week wink Need a two weeks break from computer wink )

Great, again thanks for your work smile

Offline

#143 2010-12-25 02:16:18

trungpham
Member
Registered: 2010-10-21
Posts: 28

Re: catwm, Cute and Tiny Window Manager

I really like catwm very much but is it still developed?. nealy four months and I havent seen any changes.

Offline

#144 2010-12-31 04:18:41

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,021

Re: catwm, Cute and Tiny Window Manager

Thanks pyknite et al for this fun little window manager smile
I've been having a bit of a play with it and made it a horizontal tiler, cause that's how I like things, and added room for dzen with conky down the bottom smile
Here's a pic

tNnNraw


You're just jealous because the voices only talk to me.

Offline

#145 2010-12-31 05:54:44

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: catwm, Cute and Tiny Window Manager

moetunes wrote:

Thanks pyknite et al for this fun little window manager smile
I've been having a bit of a play with it and made it a horizontal tiler, cause that's how I like things, and added room for dzen with conky down the bottom smile
Here's a pic

tNnNraw

Nice. smile Although I plan to figure out how to allow dzen, xmobar, and so forth to be ran without out being treated as a window, per se.

Offline

#146 2010-12-31 06:38:57

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,021

Re: catwm, Cute and Tiny Window Manager

Nice. smile Although I plan to figure out how to allow dzen, xmobar, and so forth to be ran without out being treated as a window, per se.

dzen isn't treated as a window. I hacked the source to shorten the area catwm uses and start dzen from .xinitrc. It works just as Lexion said in Post #112.
here's a diff of the original source and my edit

 diff ./orig_src/catwm/catwm.c ./src/catwm.c 
276c276
<     if(master_size < sw-50) {
---
>     if(master_size < sh-50) {
513c513
<     sh = XDisplayHeight(dis,screen);
---
>     sh = XDisplayHeight(dis,screen) - PANEL_HEIGHT;                          <<< Changed this line for the room for the panel >>>
533c533
<     master_size = sw*MASTER_SIZE;
---
>     master_size = sh*MASTER_SIZE;
606c606
<     int y = 0;
---
>     int x = 0;
616c616
<                 XMoveResizeWindow(dis,head->win,0,0,master_size-2,sh-2);
---
>                 XMoveResizeWindow(dis,head->win,0,0,sw-2,master_size-2);
621,622c621,622
<                     XMoveResizeWindow(dis,c->win,master_size,y,sw-master_size-2,(sh/n)-2);
<                     y += sh/n;
---
>                     XMoveResizeWindow(dis,c->win,x,master_size,(sw/n)-2,sh-master_size-4);
>                     x += sw/n;

and add the line

#define PANEL_HEIGHT     22

to config.h

Last edited by moetunes (2010-12-31 07:11:58)


You're just jealous because the voices only talk to me.

Offline

#147 2010-12-31 10:50:59

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,021

Re: catwm, Cute and Tiny Window Manager

I've added the windows key as a modifier in config.h if anyones interested

/*
 *   /\___/\
 *  ( o   o )  Made by cat...
 *  (  =^=  )
 *  (        )            ... for cat!
 *  (         )
 *  (          ))))))________________ Cute And Tiny Window Manager
 *  ______________________________________________________________________________
 *
 *  Copyright (c) 2010, Rinaldini Julien, julien.rinaldini@heig-vd.ch
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef CONFIG_H
#define CONFIG_H

// Mod (Mod1 == alt) and master size
// and I added panel size and  the windows key (Mod4 == Super)
#define MOD1            Mod1Mask
#define MOD4        Mod4Mask
#define MASTER_SIZE     0.6
#define PANEL_HEIGHT    22

// Colors
#define FOCUS           "orange" // "rgb:bc/57/66"
#define UNFOCUS         "rgb:88/88/88"

const char* dmenucmd[]      = {"dmenu_run",NULL};
const char* urxvtcmd[]      = {"urxvt",NULL};
const char* thunarcmd[]     = {"thunar",NULL};
const char* firefoxcmd[]    = {"firefox",NULL};
const char* mailcmd[]       = {"thunderbird",NULL };
const char* voldowncmd[]    = {"/home/pnewm/bin/voldown",NULL};
const char* volupcmd[]      = {"/home/pnewm/bin/volup",NULL};
const char* vols_what[]     = {"/home/pnewm/bin/volumes_what",NULL};

// Avoid multiple paste
#define DESKTOPCHANGE(K,N) \
    {  MOD1,             K,                          change_desktop, {.i = N}}, \
    {  MOD1|ShiftMask,   K,                          client_to_desktop, {.i = N}},

// Shortcuts
static struct key keys[] = {
    // MOD               KEY                         FUNCTION        ARGS
    {  MOD1,             XK_h,                       decrease,       {NULL}},
    {  MOD1,             XK_l,                       increase,       {NULL}},
    {  MOD1,             XK_x,                       kill_client,    {NULL}},
    {  MOD1,             XK_j,                       next_win,       {NULL}},
    {  MOD1,             XK_Tab,                     next_win,       {NULL}},
    {  MOD1,             XK_k,                       prev_win,       {NULL}},
    {  MOD1,             XK_space,                   switch_mode,    {NULL}},
    {  MOD1,             XK_Right,                   next_desktop,   {NULL}},
    {  MOD1,             XK_Left,                    prev_desktop,   {NULL}},
    {  MOD1,             XK_v,                       spawn,          {.com = dmenucmd}},
    {  MOD1,             XK_Return,                  spawn,          {.com = urxvtcmd}},
// alt + shift + shortcut
    {  MOD1|ShiftMask,   XK_j,                       move_up,        {NULL}},
    {  MOD1|ShiftMask,   XK_k,                       move_down,      {NULL}},
    {  MOD1|ShiftMask,   XK_Return,                  swap_master,    {NULL}},
// Window key + shortcut
    {  MOD4,             XK_v,                       spawn,          {.com = vols_what}},
    {  MOD4,             XK_h,                     spawn,          {.com = thunarcmd}},
    {  MOD4,             XK_f,                     spawn,          {.com = firefoxcmd}},
    {  MOD4,             XK_e,                     spawn,          {.com = mailcmd}},
    {  MOD4,             XK_Up,                     spawn,          {.com = volupcmd}},
    {  MOD4,             XK_Down,             spawn,          {.com = voldowncmd}},
       DESKTOPCHANGE(   XK_0,                                       0)
       DESKTOPCHANGE(   XK_1,                                       1)
       DESKTOPCHANGE(   XK_2,                                       2)
       DESKTOPCHANGE(   XK_3,                                       3)
       DESKTOPCHANGE(   XK_4,                                       4)
       DESKTOPCHANGE(   XK_5,                                       5)
       DESKTOPCHANGE(   XK_6,                                       6)
       DESKTOPCHANGE(   XK_7,                                       7)
       DESKTOPCHANGE(   XK_8,                                       8)
       DESKTOPCHANGE(   XK_9,                                       9)
    {  MOD1,             XK_e,                       quit,           {NULL}}
};

#endif

Last edited by moetunes (2010-12-31 11:19:49)


You're just jealous because the voices only talk to me.

Offline

#148 2010-12-31 22:33:12

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,021

Re: catwm, Cute and Tiny Window Manager

Now that I have dzen2 at the bottom showing conky I figured it would be nice to have the desktop number displayed like i3 does, the only way I could figure to do this was to have catwm write the desktop number to a file and use conkys' tail function to display it. It only needed 4 more lines of code(excluding comments) so the change_desktop function now looks like this

void change_desktop(const Arg arg) {
    client *c;
    FILE *logger;    // for outputting the desktop number

    if(arg.i == current_desktop)
        return;

    // Unmap all window
    if(head != NULL)
        for(c=head;c;c=c->next)
            XUnmapWindow(dis,c->win);

    // Save current "properties"
    save_desktop(current_desktop);

    // Take "properties" from the new desktop
    select_desktop(arg.i);

    // Map all windows
    if(head != NULL)
        for(c=head;c;c=c->next)
            XMapWindow(dis,c->win);

    tile();
    update_current();
    // for outputting the desktop number
    logger = fopen("/home/pnewm/build/catwm/desktop.log", "w");
    fprintf(logger, "%d", arg.i);
    fclose(logger);
}

If someone has a suggestion for a better method of doing this, or a comment on the increased resource use this method might produce, I would appreciate it.
Here's a pic of it working, desktop number is in the bottom left corner

tNnN0Mw

Update:
After using it for a few hours it doesn't seem to have any noticeable effect on memory or cpu use so I'm going to keep using it. tongue

Last edited by moetunes (2011-01-01 04:33:10)


You're just jealous because the voices only talk to me.

Offline

#149 2011-01-01 07:26:48

itsbrad212
Member
From: Chicago, USA
Registered: 2010-01-23
Posts: 1,848

Re: catwm, Cute and Tiny Window Manager

Nice work! big_smile I'll screw around with it and see where I can get with this.

/me wonders where pyknite is

Offline

#150 2011-01-02 03:34:28

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,021

Re: catwm, Cute and Tiny Window Manager

I've been trying a few things to fix up the "catwnm exits if a window doesn't exist anymore on the workspace you are changing to" bug and I am coming to the conclusion it will take more than just adding a couple of lines. I've tried using a few functions from <X11/Xutils.h> in change_desktop but haven't been able to even change how it reacts. I'm thinking the checks should be in select_desktop but failing that it will need to have how it stores/retrieves/maps/tiles windows rewritten maybe.
It has turned out to be a nice app to do some learning on tongue

Last edited by moetunes (2011-01-02 03:35:35)


You're just jealous because the voices only talk to me.

Offline

Board footer

Powered by FluxBB