Page 1 of 1

dwm Windowmanager

Posted: Thu 03 Jun 2010, 20:30
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

Posted: Mon 20 Sep 2010, 07:39
by aragon
uploaded actual version. see main post.

aragon

Posted: Fri 24 Sep 2010, 20:05
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

Posted: Sat 25 Sep 2010, 00:02
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

add clock to dwm

Posted: Sat 25 Sep 2010, 15:45
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.

Posted: Mon 27 Sep 2010, 06:37
by aragon
wonderful, self-solving issues... :D

aragon

Posted: Sat 11 Jun 2011, 04:18
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

Posted: Sat 11 Jun 2011, 06:15
by aragon
Who is dead? I'm using that one...

To your question: Sorry, no idea.

Aragon

Posted: Sat 11 Jun 2011, 07:20
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

Posted: Sat 11 Jun 2011, 08:29
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

Posted: Sat 11 Jun 2011, 14:37
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.

Posted: Sat 11 Jun 2011, 18:45
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

Posted: Sat 11 Jun 2011, 21:22
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.

Posted: Sun 12 Jun 2011, 03:17
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.

Posted: Mon 20 Jun 2011, 08:10
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

Posted: Tue 13 Sep 2011, 10:49
by aragon
uploaded new version. see first post.


aragon

Posted: Tue 20 Dec 2011, 12:22
by aragon
uploaded new version. see first post.


aragon