Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 21 Nov 2014, 12:32
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
cwm, minimalistic window manager
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1923
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 01 Dec 2011, 05:14    Post_subject:  cwm, minimalistic window manager
Sub_title: A home-made port from OpenBSD to GNU/Linux
 

Here's cwm, one of the best lightweight window managers around. It's a window manager for those who like doing stuff with the keyboard - you can do anything with cwm, using just two or three keyboard strokes.

It also gives windows nothing but a 1px border, so it's ideal for small screens.

There are many old Linux packages for it, but none of them are recent, so I ported it on my own. This is the latest version, from OpenBSD's CVS.

The package was built on Puppy 5.3. Since libbsd is missing in Slackware, I also built a tiny package and attached it.

More information: here, see the screenshot Smile
Dependencies: libbsd, attached too.
Documentation: here and here, except one change - Shift is replaced with Super (the Windows key). The reason for this is conflicts with other key bindings.

Here's my build script:
Code:
#!/bin/sh

PKG_NAME="cwm"
PKG_VER="cvs$(date +%d%m%Y)"
PKG_REV="1"
PKG_DESC="Minimalistic window manager"
PKG_CAT="BuildingBlock"
PKG_DEPS="+libbsd"

download() {
   [ -f $PKG_NAME-$PKG_VER.tar.xz ] && return 0

   # download the sources
   mkdir $PKG_NAME-$PKG_VER
   [ $? -ne 0 ] && return 1

   # determine the list of source files
   wget -O index.html http://www.openbsd.org/cgi-bin/cvsweb/xenocara/app/cwm
   [ $? -ne 0 ] && return 1
   files="$(cat index.html | grep href=\"./ | cut -f 10 -d \=  | cut -f 2 -d \> | cut -f 1 -d \<)"
   [ $? -ne 0 ] && return 1
   rm -f index.html
   [ $? -ne 0 ] && return 1

   # download the source files
   for i in $files
   do
      wget -O $PKG_NAME-$PKG_VER/$i "http://www.openbsd.org/cgi-bin/cvsweb/xenocara/app/cwm/$i?rev=HEAD;content-type=text%2Fplain"
      [ $? -ne 0 ] && return 1
   done

   # create a sources tarball
   tar -c $PKG_NAME-$PKG_VER | xz -9 > $PKG_NAME-$PKG_VER.tar.xz
   [ $? -ne 0 ] && return 1

   # clean up
   rm -rf $PKG_NAME-$PKG_VER
   [ $? -ne 0 ] && return 1

   return 0
}

build() {
   # extract the sources
   tar -xJvf $PKG_NAME-$PKG_VER.tar.xz
   [ $? -ne 0 ] && return 1

   cd $PKG_NAME-$PKG_VER

   # patch the package to link against libbsd instead of having the BSD C
   # library functions compiled in statically
   echo -n '--- cwm-cvs01122011-orig/calmwm.h   2011-12-01 11:46:46.034898678 +0200
+++ cwm-cvs01122011/calmwm.h   2011-12-01 11:47:41.445205948 +0200
@@ -31,6 +31,15 @@
 #include <X11/extensions/Xrandr.h>
 #include <X11/keysym.h>

+/* BSD C library functions, through libbsd */
+#include <bsd/stdio.h> /* fgetln() */
+#include <bsd/stdlib.h> /* strtonum() */
+#include <bsd/string.h> /* strlcat(), strlcpy() */
+
+/* two missing BSD C library definitions */
+#define TAILQ_END(head) NULL
+#define __dead
+
 #undef MIN
 #undef MAX
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
' | patch calmwm.h
     [ $? -ne 0 ] && return 1

   # add a missing header to xevents.c and kbfunc.c
   sed -i s/'#include <unistd.h>'/'&\n#include <signal.h>'/ xevents.c kbfunc.c
     [ $? -ne 0 ] && return 1

   # replace the Shift key with Super, so key bindings of GTK+ or Qt do not
   # conflict with cwm
   sed -i s/'ShiftMask'/'Mod4Mask'/ conf.c
     [ $? -ne 0 ] && return 1

   # build the package
   bison.yacc parse.y
   [ $? -ne 0 ] && return 1
   cc $CFLAGS $(pkg-config --libs libbsd xft xinerama xrandr xcb xft x11 xau xdmcp fontconfig xext) -lexpat -lfreetype -lz -o cwm *.c
   [ $? -ne 0 ] && return 1

   return 0
}

package() {
   # install the package
   install -D -m755 cwm $INSTALL_DIR/usr/bin/cwm
   [ $? -ne 0 ] && return 1
   install -D -m644 cwm.1 $INSTALL_DIR/usr/share/man/man1/cwm.1
   [ $? -ne 0 ] && return 1
   install -D -m644 cwmrc.5 $INSTALL_DIR/usr/share/man/man5/cwmrc.5
   [ $? -ne 0 ] && return 1

   # install the license
   install -D -m644 LICENSE $INSTALL_DIR/$LEGAL_DIR/$PKG_NAME/LICENSE
   [ $? -ne 0 ] && return 1

   # add the post-install script
   echo -n "#!/bin/sh

echo \"Setting cwm as the default window manager\"
echo cwm > ./etc/windowmanager" > $INSTALL_DIR/pinstall.sh
   [ $? -ne 0 ] && return 1
   chmod 755 $INSTALL_DIR/pinstall.sh
   [ $? -ne 0 ] && return 1

   return 0
}
libbsd-0.3.0.tar.gz
Description  sources
gz

 Download 
Filename  libbsd-0.3.0.tar.gz 
Filesize  100.01 KB 
Downloaded  264 Time(s) 
libbsd_DOC-0.3.0.pet
Description 
pet

 Download 
Filename  libbsd_DOC-0.3.0.pet 
Filesize  24.25 KB 
Downloaded  259 Time(s) 
libbsd_DEV-0.3.0.pet
Description 
pet

 Download 
Filename  libbsd_DEV-0.3.0.pet 
Filesize  16.73 KB 
Downloaded  265 Time(s) 
libbsd-0.3.0.pet
Description 
pet

 Download 
Filename  libbsd-0.3.0.pet 
Filesize  18.24 KB 
Downloaded  288 Time(s) 
cwm_DOC-cvs01122011.pet
Description 
pet

 Download 
Filename  cwm_DOC-cvs01122011.pet 
Filesize  5.65 KB 
Downloaded  274 Time(s) 
cwm-cvs01122011.pet
Description 
pet

 Download 
Filename  cwm-cvs01122011.pet 
Filesize  24.41 KB 
Downloaded  290 Time(s) 
cwm-cvs01122011.tar.bz2
Description  sources
bz2

 Download 
Filename  cwm-cvs01122011.tar.bz2 
Filesize  34.42 KB 
Downloaded  275 Time(s) 

_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
harii4


Joined: 30 Jan 2009
Posts: 444
Location: La Porte City, IA , U.S.A.

PostPosted: Thu 01 Dec 2011, 23:53    Post_subject:  

Quote:
Here's cwm, one of the best lightweight window managers around.

Development of cwm started from patches to evilwm - ahhh it started with greatness Twisted Evil

I'll have to look for an older one - i don't think it'll work with Txz-pup.

_________________
3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.
Back to top
View user's profile Send_private_message Visit_website 
harii4


Joined: 30 Jan 2009
Posts: 444
Location: La Porte City, IA , U.S.A.

PostPosted: Mon 19 Dec 2011, 18:54    Post_subject:  

How about an DotPet for older puppys? Confused
_________________
3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.
Back to top
View user's profile Send_private_message Visit_website 
harii4


Joined: 30 Jan 2009
Posts: 444
Location: La Porte City, IA , U.S.A.

PostPosted: Sun 03 Jun 2012, 21:20    Post_subject:  

http://people.debian.org/~roktas/debian/pool/main/c/cwm/
an .deb (deb2pet) cwm that works in puppy 4 and txz-pup.
you still need libbsd.pet too.

_________________
3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0733s ][ Queries: 12 (0.0165s) ][ GZIP on ]