Snapwm

From ArchWiki
Revision as of 17:43, 26 February 2012 by Stlarch (Talk | contribs) (Snapwm is a very minimal and dynamic tiling window manager.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Snapwm

Snapwm is a very minimal and lightweight dynamic tiling window manager based on dminiwm (same author), and catwm (by pyknite). It's basically dminiwm with a status bar. It's primarily keyboard driven but has some mouse support also.


Layout Modes

It has four layout modes: vertical, horizontal(bottom stack in dwm), grid, and fullscreen(monocle in dwm).


Vertical

   --------------
   |        | W |
   |        |___|
   | Master |   |
   |        |___|
   |        |   |
   --------------

It allows the "normal" method of tiling window managers(with the new window as the master) or with the new window opened at the bottom of the stack(like dwm's attach aside).


Horizontal

   -------------
   |           |
   |  Master   |
   |-----------|
   | W |   |   |
   -------------

Same as bottom stack in dwm. (Note that it's only the bottom stack part and does not include bottom stack horizontal as in the dwm patch).


Grid

   -------------
   |      | W  |
   |      |    |
   |------|----|
   |      |    |
   -------------


Fullscreen

Self explanatory. Same as monocle in dwm. There are no borders in fullscreen mode.


  • You can have different layout modes for each desktop(same as pertag in dwm).
  • The window *W* at the top of the stack can be resized on a per desktop basis.
  • Changing the layout mode or resizing windows on one desktop doesn't affect the others.
  • There is no floating mode other than for transient windows(popups).


Status Bar

Snapwm has an intregrated statusbar that has a clickable desktop switcher. It has support for different colors(like statuscolors in dwm) and text can be piped into the bar from .xinitrc(for example) the same way as in dwm. The bar uses the root window's name to display information, which can be changed with xsetroot -name. For example, with conky, you could use something like:

conky | while read -r; do xsetroot -name "$REPLY"; done & 

The desktop switcher can optionally show the number of windows open on unfocused desktops and in fullscreen mode. Clicking on the current desktop in the switcher will focus the next window. You can toggle the status bar and have the option of showing it on top or bottom or not at all.


Configuration

Configuration changes are done by editing config.h.def, copying it to config.h and recompiling. After you get a working config.h, you should compare that with the new config.h.def when updating and make any changes that are needed. You should familiarize yourself with the config.h. It's fairly self explanatory and well commented. You don't nessasarily need any knowledge of C. You can look at other people's configs for examples and ideas, but don't just blindly copy and paste. At least try to understand what you're doing first. Remember to change the path for your .snapwmrc in config.h. At first, you'll need to at least learn a few of the basic keystrokes for opening a terminal, running dmenu, closing windows, quitting, etc. All of these can be found in the config.h. You can change them to suit, of course.


  • rc file

Unlike dwm, snapwm comes with an rc file that can implement some changes on the fly, without the need for recompiling. There is an sample.snapwmrc.file included that should be edited and copied to .snapwmrc in $HOME.


  • Transparency

Unfocused windows have an alpha value and can be transparent if used with a composting manager(like cairo-compmgr).


Installation

The latest version can be downloaded using git. Initially, you can do:

git clone https://github.com/moetunes/Nextwm 

and then update with git pull. See the git wiki page or man git for more info.


  • Note: While the official name of the window manager and executable is snapwm, you'll notice that in moetunes github, the directory is named Nextwm which may cause some confusion.


Xlib is all that is required. The installation method is as folows:

$make
#make install
$make clean


  • Alternative Method

Instead of actually installing it system-wide (with #make install) as above, you can simply run make and then copy the single executable to somewhere in your path, like ~/bin, for example. You can then run it the same way(exec snapwm) on a per user basis.


  • Dmenu

Most users will want this. As the name implies, dmenu is a menu that acts like an autocomplete for typing the name of binaries. It intregrates well with tiling window managers like dwm and snapwm. See the dmenu wiki page or man dmenu for more info. To install it, do:

pacman -S dmenu


Additional Resources

  • See the README.md and ChangeLog for additional info.
  • Monsterwm is another lightweight dynamic tiling window manager forked from dminiwm. The author(c00kiemon5ter) is helpful and friendly as well and also active on the forum.
  • Monsterwm forum thread
  • Monsterwm wiki page.
  • Dwm is a popular lightweight dynamic window manager. The website is a good source of info. There are various threads on the forum about dwm.
  • dwm wiki page.