while in the saved PKGBUILD's directory. The files will be retrieved, built and installed.

+

{{Note|If you have a working config.h, you can copy it to the saved PKGBUILD's directory before running makepkg and it will be used, or else the default config.h.def will be used.}}

+

The sample.rc.conf will be installed in /usr/share/snapwm-git/. Create the directory $HOME/.config/snapwm/:

+

$mkdir -p ~/.config/snapwm/

+

and copy /usr/share/snapwm-git/sample.rc.conf to ~/.config/snapwm/rc.conf and edit to suit.

+

The README.md is located in /usr/share/doc/snapwm-git/.

+

+

+

== Using [[git]] ==

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

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

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

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

Revision as of 17:12, 19 June 2012

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

Layout Modes

It has five layout modes: vertical, horizontal, grid, fullscreen and center stacking. The default layout for all desktops is set in the config.h file and the rc file, and can be changed in the running wm.

It allows the "normal" method of tiling window managers, with the new window as the master, or with the new window opened at the top or bottom of the stack(attach aside). The default tiling method for all layout modes is set in the config.h and rc file, and can be changed in the running wm.

The colors for the windows are defined in defaultwincolor[] in config.h and in WINDOWTHEME in .snapwmrc.

Color 0 : focused window border.

Color 1 : unfocused window border.

The colors for external text can be displayed by placing & in front of the number of the color in your script. The numbers start at 0. For example, using conky, you could do something like this for displaying the time using the second color for external text:

&1${time %I:%M}

The colors in the running wm are changeable by editing the rc file.

Icons

The bar does not support icons but you can draw "icons" into a font and use those. You can find more info on that in the dwm hacking thread on the forum. There are a few fonts in the AUR, such as terminusmod, tamsynmod, termsyn, and ohsnap that have some icons. To have them shown in the bar print them in a terminal then copy/paste them in snapwmrc/config.h or your script/conky.

Configuration

Configuration changes are done first by copying config.h.def to config.h, editing config.h and running make. Most options are also in the rc file.

The defined number of desktops must match the DESKTOPCHANGE keys

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 necessarily 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.def. You can change them to suit, of course.

An example for setting Alt+x to open xterm. The terminal command would be

xterm -bg black -fg white

So make the command and the keyboard shortcut in the appropriate sections in the config.h.

rc file

snapwm comes with a rc file that can implement changes to most options on the fly, without the need for recompiling and which will take precedence over the compiled in options at startup. There is a sample.snapwmrc.file included that should be copied to .snapwmrc in $HOME and edited, with the correct path defined in config.h. To change something in the running window manager edit the rc file and save it, then hit the (default) Alt+u keys.

Transparency

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

The value is a percent and can be changed in the running wm by editing the rc file, 100 is opaque.

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. To install it, do:

$make
#make install
$make clean

Alternative Method

Instead of actually installing it system-wide as above, you can simply run make and then copy the 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 integrates well with tiling window managers like snapwm. See the dmenu wiki page or man dmenu for more info. To install it, do:

pacman -S dmenu

The config.h.def comes with a command to start demenu_run, which will search $PATH for a matching executable as soon as you start typing.