dwm Windowmanager

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

dwm Windowmanager

#1 Post by aragon »

Home: http://dwm.suckless.org/
Version: 6.0 (modified)
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. All of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.
To start dwm, logout and

Code: Select all

xwin startdwm
NOTE: i've included the startscript /usr/bin/startdwm, that will display battery percentage, remaining save-file capacity and a clock in the statusbar (see pic, upper right corner) if you have xsetroot (see down the page) installed.

dwm is small, fast and keyboard-driven. Following a list of the most important shortcuts:

Code: Select all

Apps
-----
ALT+Shift + Return Terminal
ALT+Shift + e Defaulteditor
ALT+Shift + b Defaultbrowser
ALT+Shift + f Filemanager
ALT+Shift + p pprocess
ALT+Shift + i Defaultimageviewer
ALT+Shift + s mtpaintsnapshot.sh
ALT+Shift + w Wizardwizard
ALT+Shift + r Gexec
ALT+Shift + a Defaultaudioplayer
ALT+Shift + m Defaultmediaplayer
ALT+Shift + PgUp Master-Volume +5
ALT+Shift + PgDown Master-Volume -5
ALT+Shift + End Toggle Mute Volume
ALT+Shift + l Pfind
ALT + [F1-F12] Free Launcher
ALT+Shift + [F1-F12] Free Launcher

Windowmanagement
-----
ALT+Shift + q Logout
ALT+Shift + c Close Focused App
ALT + Tab Focus Next
ALT+Shift + Tab Focus Previous
Alt + Right Increase MasterArea
Alt + Left Decrease MasterArea
Alt + Return Move focused App to MasterArea
Alt + T Layout Tile
Alt + f Layout Float
Alt + m Layout Monocle
Alt + [1-9] Goto Tag ...
Alt+Shift  + [1-9] Send to Tag ...
dwm has no config file, reconfiguration is done by changing the config.h file and recompiling. Because of that, i've included the source at

Code: Select all

/usr/share/dwm/source
i've changed the make-file to simply rebuild dwm in this source-directory. just use make and it will clean, build and strip dwm. You only have to copy the new bin to /usr/bin. Of course, you'll need the devx to do that.

-------
NOTE: If you want to add a keyboard-launcher for your favourite app without recompiling, no problem. As mentioned in the above list, i've included 'free launcher'. What does that mean?

I've assigned the apps dwmAF1 - dwmAF12 and dwmASF1 - dwmASF12 to the keycombos Alt + F1 ... Alt + F12 and Alt+Shift + F1 ... Alt+Shift + F12.
So if you want a new shortcut for e.g. gnumeric you make a symlink to gnumeric called dwmASF12 and now you could launch gnumeric with Alt+Shift+F12.

I've also included 2 dwm-backgrounds.

Compiled and tested in 4.31.

aragon
Attachments
dwm-5.9.png
(133.04 KiB) Downloaded 5722 times
dwm-6.0.pet
(40.02 KiB) Downloaded 1666 times
Last edited by aragon on Tue 20 Dec 2011, 12:23, edited 2 times in total.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#2 Post by aragon »

uploaded actual version. see main post.

aragon

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

#3 Post by ariel »

I like this, but I'd like it more if I could see the day of the week + day + 24h clock in the upper right corner of the status bar. Could anybody with C knowledge please post the code to add in the config.h file to do this? I know there are plenty of you guys out there that could do it in less than two seconds...


As for the available keys, I would also say that with your mouse by pressing:

ALT+left button you can move a window through the screen
ALT+right button you can resize a window



nice job
Last edited by ariel on Sat 25 Sep 2010, 15:28, edited 1 time in total.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#4 Post by seaside »

ariel wrote:I like this, but I'd like it more if I could see the day of the week + day + 24h clock in the upper right corner of the status bar. Could anybody with C knowlege please post the code to add in the config.h file to do this? I know there are plenty of you guys out there that could do it in less than two seconds...


As for the available keys, I would also say that with your mouse by pressing:

ALT+left button you can move a window through the screen
ALT+right button you can resize a window



nice job
Ariel,

Apparently, you don't need any exotic c coding to place information at the top of the screen.
dwm reads from the root window’s name to print arbitrary status text (like the date, load, battery charge).
see http://dwm.suckless.org/

Cheers,
s

User avatar
ariel
Posts: 140
Joined: Fri 03 Jul 2009, 19:47
Contact:

add clock to dwm

#5 Post by ariel »

yes seaside, it's possible to do it without fancy C coding :) but it is not that intuitive with puppy. the fact is that puppy -- at least 4.2.0 and 4.3.1 -- have not xsetroot as a command by default. I have had to add it before I could get it to run. I attach a pet of it here.

After installing the pet you should add these lines in /root/.xinitrc

Code: Select all

while true
do
xsetroot -name "$( date +"%B %A %d %R")"
sleep 1m
done &
exec dwm
restart X and that's it.
Attachments
xsetroot-1.0.1-0.pet
(5.9 KiB) Downloaded 1120 times

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#6 Post by aragon »

wonderful, self-solving issues... :D

aragon

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#7 Post by eriksatie »

Sorry to resurrect the dead but when I install the taskbar at the top looks squished together and out of focus. Any ideas on how to fix this?

Thanks

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#8 Post by aragon »

Who is dead? I'm using that one...

To your question: Sorry, no idea.

Aragon

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#9 Post by eriksatie »

Ok.

Also, I have changed my config.h file but don't know how to apply the changes. I know I have to recompile and do some other stuff but would you mind explaining it for me in a simple way? (noob here)

ps. do you know if it's possible to restart x from console?

Thanks

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#10 Post by aragon »

eriksatie wrote:Ok.

Also, I have changed my config.h file but don't know how to apply the changes. I know I have to recompile and do some other stuff but would you mind explaining it for me in a simple way? (noob here)

ps. do you know if it's possible to restart x from console?

Thanks
For rebuilding, please see post 1 it's explaained there.

For restarting X i would guess it's wmrestart (i'm not at a puppy-machine atm). You could look at the hidden file .jwmrc in root as it contains the jwm-menu.

Hope that helps...

Aragon

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#11 Post by eriksatie »

I know, but it wasn't very clear to me because I'm not familiar with some of those instructions.

"i've changed the make-file to simply rebuild dwm in this source-directory. just use make and it will clean, build and strip dwm. You only have to copy the new bin to /usr/bin. Of course, you'll need the devx to do that. "

what bin do I copy and where is it?

what is devx and how do I get it and why do I need it to move the bin?

also, when I press recompile I see a bunch of errors, but errors in places where I didn't edit anything - is this a problem?

Thank you for your help.

stu90

#12 Post by stu90 »

eriksatie wrote:I know, but it wasn't very clear to me because I'm not familiar with some of those instructions.

"i've changed the make-file to simply rebuild dwm in this source-directory. just use make and it will clean, build and strip dwm. You only have to copy the new bin to /usr/bin. Of course, you'll need the devx to do that. "

what bin do I copy and where is it?

what is devx and how do I get it and why do I need it to move the bin?

also, when I press recompile I see a bunch of errors, but errors in places where I didn't edit anything - is this a problem?

Thank you for your help.
Hello eriksatie,

I dont use dwm but will try to answer :

The compile errors are probably due to not having the devx installed (you need the devx for compiling and the like) you tend to find the devx download along with the download of the puppy version you are running.

The executable for dwm will be in the directory /usr/bin a cog looking icon probably called dwm - you could try the terminal command which dwm see if it give you the location of the executable.

When you compile a new version it will make a new executable for dwm this is what you copy to /usr/bin

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#13 Post by eriksatie »

stu90 wrote:
eriksatie wrote:I know, but it wasn't very clear to me because I'm not familiar with some of those instructions.

"i've changed the make-file to simply rebuild dwm in this source-directory. just use make and it will clean, build and strip dwm. You only have to copy the new bin to /usr/bin. Of course, you'll need the devx to do that. "

what bin do I copy and where is it?

what is devx and how do I get it and why do I need it to move the bin?

also, when I press recompile I see a bunch of errors, but errors in places where I didn't edit anything - is this a problem?

Thank you for your help.
Hello eriksatie,

I dont use dwm but will try to answer :

The compile errors are probably due to not having the devx installed (you need the devx for compiling and the like) you tend to find the devx download along with the download of the puppy version you are running.

The executable for dwm will be in the directory /usr/bin a cog looking icon probably called dwm - you could try the terminal command which dwm see if it give you the location of the executable.

When you compile a new version it will make a new executable for dwm this is what you copy to /usr/bin
Thanks, I will try this out and report back.

eriksatie
Posts: 41
Joined: Tue 07 Jun 2011, 03:27

#14 Post by eriksatie »

Thank you so much for the help, it worked perfectly.

After fiddling around with it for a while I found I didn't even like it that much. But this learning experience was good, I am getting a hand of linux now.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#15 Post by aragon »

In addition to ariels post, you could use the following script to display some more infos about your puppy if you've installed xsetroot (also see ariels post).

Save the script to your $PATH, maybe as "startdwm", make it executable, logout and restart x with

Code: Select all

xwin NAMEOFTHESCRIPT
It displays the batterystate of BAT0, the remaining size of your pupsave and the actual time.

Code: Select all

#!/bin/sh
if [ "`which xsetroot`" ]
then
	while true
	do
		#BATTERYSTUFF
		MYBAT="/proc/acpi/battery/BAT0"
		REM_CAP="`grep "^remaining capacity" ${MYBAT}/state | awk '{ print $3 }'`"
		FULL_CAP="`grep "^last full capacity" ${MYBAT}/info | awk '{ print $4 }'`"
		CHARGE="`echo $(( $REM_CAP * 100 / $FULL_CAP ))`"
		
		#PUPSAVE
		PSFREE="`cat /tmp/pup_event_sizefreem`"

		#TIME
		TIME="`date +"%R"`"

		#OUTPUT
		xsetroot -name "BAT: ${CHARGE}% | FREE: ${PSFREE} MB | ${TIME}"
		sleep 30
	done &
fi
exec dwm
aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#16 Post by aragon »

uploaded new version. see first post.


aragon

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#17 Post by aragon »

uploaded new version. see first post.


aragon

Post Reply