You are not logged in.

#1 2010-06-30 20:22:27

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

catwm, Cute and Tiny Window Manager

Hi,

I started a very simple tiling window manager months ago... I'm taking back the dev and I have made a pkgbuild if some people are interested: http://aur.archlinux.org/packages.php?ID=38579

The manager is working but there is still some crappy bugs sad

tNHNxaw

Offline

#2 2010-06-30 20:54:54

hume's doona
Member
Registered: 2009-12-11
Posts: 206

Re: catwm, Cute and Tiny Window Manager

What's it written in and configured with?

Offline

#3 2010-06-30 21:01:14

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

Re: catwm, Cute and Tiny Window Manager

hume's doona wrote:

What's it written in and configured with?

Sorry I don't understand the question (I'm not english) sad

You mean the language? It's written in C and you configure it dynamicly modifying the config.h file (like dwm)

Offline

#4 2010-06-30 21:02:54

hume's doona
Member
Registered: 2009-12-11
Posts: 206

Re: catwm, Cute and Tiny Window Manager

You mean the language? It's written in C and you configure it dynamicly modifying the config.h file (like dwm)

Yes, that is what I meant

Offline

#5 2010-06-30 21:26:19

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

Re: catwm, Cute and Tiny Window Manager

hume's doona wrote:

You mean the language? It's written in C and you configure it dynamicly modifying the config.h file (like dwm)

Yes, that is what I meant

\o/

Offline

#6 2010-07-01 00:01:29

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: catwm, Cute and Tiny Window Manager

Really neat. I like how simple and small it is. I haven't been using it long enough to find a bug yet but will report back when I do.

The only thing is that your "make clean" removes the catwm file. Also it doesn't seem to put anything into the pkgdir for installing, unless I missed something? Please forgive me if I did. So, I had to add this to my PKGBUILD:

pkgname=catwm-git
pkgver=20100630
pkgrel=1
pkgdesc="Cute And Tiny Window Manager"
url="http://github.com/pyknite/catwm"
license=('GPL')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=(i686 x86_64)
source=()
md5sums=()
options=(!libtool)
 
_gitroot="git://github.com/pyknite/catwm.git"
_gitname="catwm"
 
build() {
  msg "Connecting to GIT server...."

  # if local repo already exist
  if [[ -d $startdir/src/$_gitname ]] ; then
    cd $_gitname
    git pull origin || return 1
    msg "The local files are updated."
  # else clone
  else
    git clone $_gitroot || return 1
  fi
 
  msg "GIT checkout done"
  msg "Starting make..."
 
  # build directory
  [[ -d $srcdir/$_gitname-build ]] && rm -rf $srcdir/$_gitname-build
  git clone $srcdir/$_gitname $srcdir/$_gitname-build
  cd $srcdir/$_gitname-build

  # edit config.h
  $EDITOR config.h

  # fix Makefile to keep catwm after compiling
  sed -i -re 's|rm -f c.*$|rm -f \*.o|' Makefile
  make || return 1
  make clean || return 1

  # install files to pkgdir
  mkdir -p $pkgdir/usr/bin
  cp $srcdir/$_gitname-build/catwm $pkgdir/usr/bin

}

P.S.: why all the "CACA MOTHERF**KER" stuff in stdout? o_O Had to remove that stuff too.

EDIT: Ok, yeah, a few bugs. Main one is when mplayer goes into fullscreen and continually adds blank windows each time I press fullscreen key. Other than that a few smaller bugs, it's still nice. Thanks

Last edited by milomouse (2010-07-01 01:00:18)

Offline

#7 2010-07-01 07:14:04

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

Re: catwm, Cute and Tiny Window Manager

milomouse wrote:

Really neat. I like how simple and small it is. I haven't been using it long enough to find a bug yet but will report back when I do.

The only thing is that your "make clean" removes the catwm file. Also it doesn't seem to put anything into the pkgdir for installing, unless I missed something? Please forgive me if I did. So, I had to add this to my PKGBUILD:

pkgname=catwm-git
pkgver=20100630
pkgrel=1
pkgdesc="Cute And Tiny Window Manager"
url="http://github.com/pyknite/catwm"
license=('GPL')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=(i686 x86_64)
source=()
md5sums=()
options=(!libtool)
 
_gitroot="git://github.com/pyknite/catwm.git"
_gitname="catwm"
 
build() {
  msg "Connecting to GIT server...."

  # if local repo already exist
  if [[ -d $startdir/src/$_gitname ]] ; then
    cd $_gitname
    git pull origin || return 1
    msg "The local files are updated."
  # else clone
  else
    git clone $_gitroot || return 1
  fi
 
  msg "GIT checkout done"
  msg "Starting make..."
 
  # build directory
  [[ -d $srcdir/$_gitname-build ]] && rm -rf $srcdir/$_gitname-build
  git clone $srcdir/$_gitname $srcdir/$_gitname-build
  cd $srcdir/$_gitname-build

  # edit config.h
  $EDITOR config.h

  # fix Makefile to keep catwm after compiling
  sed -i -re 's|rm -f c.*$|rm -f \*.o|' Makefile
  make || return 1
  make clean || return 1

  # install files to pkgdir
  mkdir -p $pkgdir/usr/bin
  cp $srcdir/$_gitname-build/catwm $pkgdir/usr/bin

}

Oh, your right, my apologize... I did not test to install the package. I will change the pkgbuild on AUR thx wink

P.S.: why all the "CACA MOTHERF**KER" stuff in stdout? o_O Had to remove that stuff too.

Hahahah, sorry I forget to remove a debug printf wink I'll commit without that later

EDIT: Ok, yeah, a few bugs. Main one is when mplayer goes into fullscreen and continually adds blank windows each time I press fullscreen key. Other than that a few smaller bugs, it's still nice. Thanks

Yep it's one of the bugs I was talking, I really need to fix it this one.tarc

Offline

#8 2010-07-01 08:19:31

portix
Member
Registered: 2009-01-13
Posts: 757

Re: catwm, Cute and Tiny Window Manager

Really nice. I think it would be a cleaner way to write a working install rule in your Makefile like

install: all
    install -Dm 755 catwm  $(DESTDIR)(BINDIR)

and putting

make DESTDIR=${pkgdir} install

in your PKGBUILD, instead of sed'ing your Makefile and  then copying the binary.
catwm crashes if you resize the mein area too much.

Online

#9 2010-07-01 09:04:10

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

Re: catwm, Cute and Tiny Window Manager

portix wrote:

Really nice. I think it would be a cleaner way to write a working install rule in your Makefile like

install: all
    install -Dm 755 catwm  $(DESTDIR)(BINDIR)

and putting

make DESTDIR=${pkgdir} install

in your PKGBUILD, instead of sed'ing your Makefile and  then copying the binary.
catwm crashes if you resize the mein area too much.

I tried your way but it doesn't work (but I probably made a mistake I'm a noob in makefile and PKGBUILD)... It install it to pkg/usr/bin instead of pkg/usr/bin/catwm

CFLAGS+= -Wall                                                                  
LDADD+= -lX11 
LDFLAGS=
EXEC=catwm

PREFIX?= /usr
BINDIR?= $(PREFIX)/bin

CC=gcc

all: $(EXEC)

catwm: catwm.o
    $(CC) $(LDFLAGS) -Os -o $@ $+ $(LDADD)

install: all 
    install -Dm 755 catwm $(DESTDIR)$(BINDIR)

clean:
    rm -f catwm *.o
pkgname=catwm-git                                                                                                               
pkgver=20100701
pkgrel=1
pkgdesc="Cute And Tiny Window Manager"
url="http://github.com/pyknite/catwm"
license=('GPL')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=(i686 x86_64)
source=()
md5sums=()
options=(!libtool)
 
_gitroot="git://github.com/pyknite/catwm.git"
_gitname="catwm"
 
build() {
  msg "Connecting to GIT server...."

  # if local repo already exist
  if [[ -d $startdir/src/$_gitname ]] ; then
    cd $_gitname
    git pull origin || return 1
    msg "The local files are updated."
  # else clone
  else
    git clone $_gitroot || return 1
  fi  
 
  msg "GIT checkout done"
  msg "Starting make..."
 
  # build directory
  [[ -d $srcdir/$_gitname-build ]] && rm -rf $srcdir/$_gitname-build
  git clone $srcdir/$_gitname $srcdir/$_gitname-build
  cd $srcdir/$_gitname-build

  # edit config.h
  $EDITOR config.h

  # fix Makefile to keep catwm after compiling
  make || return 1
  make clean || return 1

  # install files to pkgdir
  make DESTDIR=${pkgdir} install

I'll try to correct the bug you found this afternoon, btw thx for report wink

Offline

#10 2010-07-01 09:38:50

portix
Member
Registered: 2009-01-13
Posts: 757

Re: catwm, Cute and Tiny Window Manager

I did a mistake. You can put

install -Dm 755 catwm $(BINDIR)$(DESTDIR)/catwm

in your Makefile
and use this PKGBUILD

pkgname=catwm-git
pkgver=20100701
pkgrel=1
pkgdesc="Cute And Tiny Window Manager"
url="http://github.com/pyknite/catwm"
license=('GPL')
depends=('libx11')
makedepends=('gcc' 'make' 'git')
arch=(i686 x86_64)
source=()
md5sums=()
options=(!libtool)
 
_gitroot="git://github.com/pyknite/catwm.git"
_gitname="catwm"
 
build() {
    msg "Connecting to GIT server...."

    # if local repo already exist
    if [[ -d $startdir/src/$_gitname ]] ; then
        cd $_gitname
        git pull origin || return 1
        msg "The local files are updated."
        # else clone
    else
        git clone $_gitroot || return 1
    fi

    msg "GIT checkout done"
    msg "Starting make..."

    # build directory
    cd $srcdir/$_gitname

    # edit config.h
    $EDITOR config.h

    make DESTDIR=${pkgdir} install || return 1
}

or change the last line in the PKGBUILD to

make || return 1
install -Dm 755 catwm ${pkgdir}/usr/bin/catwm

Online

#11 2010-07-01 09:53:21

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

Re: catwm, Cute and Tiny Window Manager

Thanks for your help, it work fine \o/

And I correctecd the "increase/decrease master area" bug

Offline

#12 2010-07-02 11:40:04

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

Re: catwm, Cute and Tiny Window Manager

milomouse wrote:

EDIT: Ok, yeah, a few bugs. Main one is when mplayer goes into fullscreen and continually adds blank windows each time I press fullscreen key. Other than that a few smaller bugs, it's still nice. Thanks

Bug corrected \o/

I think that the is almost usuable now... Need to implement "multiple desktop"...

Offline

#13 2010-07-02 20:13:16

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: catwm, Cute and Tiny Window Manager

@portix: You're right about the proper install process. It's better than sed stuff as "make clean" should still delete binary if wanted.

@pyknite: Thanks! I'll update catwm when I get home and try it out (might be a couple days though). By the way, I'd like to put in a request for catwm to be able to resize the "slave" windows too, not just master.Thanks again for your hard work. :}

Offline

#14 2010-07-02 22:56:39

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

Re: catwm, Cute and Tiny Window Manager

milomouse wrote:

@pyknite: Thanks! I'll update catwm when I get home and try it out (might be a couple days though). By the way, I'd like to put in a request for catwm to be able to resize the "slave" windows too, not just master.Thanks again for your hard work. :}

Thx to try my little piece of code wink

What do you mean by resize the "slave" windows? If you have any others ideas, I'm open to any reflection (or if someone want to join the "project", it's not a problem) wink

Offline

#15 2010-07-02 23:18:40

dawn
Member
Registered: 2008-01-15
Posts: 51

Re: catwm, Cute and Tiny Window Manager

pyknite,

thanks for that: the code is short and easy to understand. It's the kind of programs from which one can learn.

Regarding the code that needs to be rewritten in remove_window, wouldn't making the linked list circular simplify things ?

Edit: by the way, I'd like to "join the project", but I don't know anything about xlib and I've never seriously worked with c, so I'll play around with the code and get back to you if I feel up for it.

Last edited by dawn (2010-07-02 23:24:42)

Offline

#16 2010-07-03 00:04:57

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

Re: catwm, Cute and Tiny Window Manager

thanks for that: the code is short and easy to understand. It's the kind of programs from which one can learn.

Thank you wink

Regarding the code that needs to be rewritten in remove_window, wouldn't making the linked list circular simplify things ?

Because when I wrote the code I was lazy tongue


Edit: by the way, I'd like to "join the project", but I don't know anything about xlib and I've never seriously worked with c, so I'll play around with the code and get back to you if I feel up for it.

Sure man, no problem wink

Offline

#17 2010-07-03 12:15:06

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: catwm, Cute and Tiny Window Manager

pyknite wrote:
milomouse wrote:

@pyknite: Thanks! I'll update catwm when I get home and try it out (might be a couple days though). By the way, I'd like to put in a request for catwm to be able to resize the "slave" windows too, not just master.Thanks again for your hard work. :}

Thx to try my little piece of code wink

What do you mean by resize the "slave" windows? If you have any others ideas, I'm open to any reflection (or if someone want to join the "project", it's not a problem) wink

No problem, I like it alot. I'll look at the code myself when I get home (Monday night).

As far as the "slave windows", I mean the non-master windows created at the side of the master. I was wondering if it were possible to resize them individually. Example, you open three windows, 1 master window and 2 non-master (slaves). What I mean is to focus on one of the non-master (slave) windows and make it bigger (taller) than the other non-master (slave) window. I'm sorry if I'm not making sense, but like I said I'll look at the code myself when I get home. :}

Offline

#18 2010-07-03 12:22:47

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

Re: catwm, Cute and Tiny Window Manager

milomouse wrote:
pyknite wrote:
milomouse wrote:

@pyknite: Thanks! I'll update catwm when I get home and try it out (might be a couple days though). By the way, I'd like to put in a request for catwm to be able to resize the "slave" windows too, not just master.Thanks again for your hard work. :}

Thx to try my little piece of code wink

What do you mean by resize the "slave" windows? If you have any others ideas, I'm open to any reflection (or if someone want to join the "project", it's not a problem) wink

No problem, I like it alot. I'll look at the code myself when I get home (Monday night).

As far as the "slave windows", I mean the non-master windows created at the side of the master. I was wondering if it were possible to resize them individually. Example, you open three windows, 1 master window and 2 non-master (slaves). What I mean is to focus on one of the non-master (slave) windows and make it bigger (taller) than the other non-master (slave) window. I'm sorry if I'm not making sense, but like I said I'll look at the code myself when I get home. :}

Oh yeh I see what do you mean... You want something like in tmux. I will see if I can implement that, it's a good idea!!

Offline

#19 2010-07-03 12:50:40

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: catwm, Cute and Tiny Window Manager

I haven't tried it yet, but I can say one thing: the config.h is PRETTY AWESOME.

Offline

#20 2010-07-03 12:59:37

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: catwm, Cute and Tiny Window Manager

Oh, and catwm has now an IRC chan. Check #catwm at freenode smile

Offline

#21 2010-07-03 12:59:46

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

Re: catwm, Cute and Tiny Window Manager

gtklocker wrote:

I haven't tried it yet, but I can say one thing: the config.h is PRETTY AWESOME.

Thanks, but I think there is nothing very special in the config file??

Offline

#22 2010-07-03 13:01:11

gtklocker
Member
Registered: 2009-09-01
Posts: 460

Re: catwm, Cute and Tiny Window Manager

pyknite wrote:
gtklocker wrote:

I haven't tried it yet, but I can say one thing: the config.h is PRETTY AWESOME.

Thanks, but I think there is nothing very special in the config file??

This is why I like it. It's unbloated and simple. Pure awesomeness.

Ah, and join the chan smile

Offline

#23 2010-07-03 13:12:04

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

Re: catwm, Cute and Tiny Window Manager

gtklocker wrote:
pyknite wrote:
gtklocker wrote:

I haven't tried it yet, but I can say one thing: the config.h is PRETTY AWESOME.

Thanks, but I think there is nothing very special in the config file??

This is why I like it. It's unbloated and simple. Pure awesomeness.

Ah, and join the chan smile

Ah ok, Thanks a lot wink

It seems there is some "fan" here \o/ Now I need to code more faster big_smile

Offline

#24 2010-07-03 16:58:40

sicpsnake
Member
From: Austin, TX.
Registered: 2010-02-25
Posts: 128
Website

Re: catwm, Cute and Tiny Window Manager

Very, very nice! It uses even less memory than DWM. smile I can't wait to see how awesome catwm will be in it's mature stages. I really would like to see a bottom stack layout implemented by default, but I'm not complaining. I really appreciate the work you've done so far.

Offline

#25 2010-07-04 23:44:28

zenny
Member
Registered: 2008-04-15
Posts: 24

Re: catwm, Cute and Tiny Window Manager

compiled using makepkg and installed. Added 'exec catwm' in .xinitrc. Now I am confused with the usage? What key combinations gives what? New to this. Thanks.

Offline

Board footer

Powered by FluxBB