AfterStep Configuration Notes

Modulepath This path points to where your Afterstep modules are located. If this path is wrong, you will not get the Wharf, Pager and other modules. In the sample.steprc-file it is set like this:
ModulePath /usr/lib/X11/afterstep:/usr/X11R6/lib/X11/afterstep
If your installation for some reason (ie. you only have it on your private account, you use the Store management system, etc.) is put elsewhere, you will have to change this.

PixmapPath This path (not the IconPath) tells where your icons are placed. As well as other pixmaps you will use. In sample.steprc this is set to:
PixmapPath /usr/include/X11/pixmaps/
Again, this should be set to where your icons really are. Users will usually want to add their own personal path to the standard path, so that they can make their own icons.

IconPath According to the sample.steprc this is the path to "the ugly black&white icons". This is probably mostly a hangover from the old fvwm days, but are needed by some aplications, and sometimes the black&white icons are good enough. Sample.steprc:
IconPath /usr/include/X11/bitmaps/

General Looks

Main colors

The main colors of Afterstep is set using the following parameters in your .steprc.

StdForeColor This color is used for all the outer borders of the windows, as well as shading in the menus. It is also used as the text-color on titlebars of unfocused windows. Usually this is set as below in the sample.steprc

StdForeColor #111111

StdBackColor This appearantly affects the bar at the bottom of windows, as well as the 3D-effects on the titlebar-buttons.

StdBackColor #bfbfbf

HiForeColor This the color of the text on focused windows' titlebar. It is also used for highlighting the menuitem you have currently selected. It will also affect the color on the icon-text if you have that option enabled. Sample.steprc says:

HiForeColor White

HiBackColor Border of the titlebars of menus and active windows. Also the background for the icontext.

HiBackColor #000044

HiBackColor Border of the titlebars of menus and active windows. Also the background for the icontext.

HiBackColor #000044

MenuForeColor This changes the color of the menu-item's text. It's that simple.

MenuForeColor Black

MenuBackColor Makes the 3D-effects on the menus. This is better of left in some shade of gray, or the same color-kind as you choose for the menu-items.

MenuBackColor #bfbfbf

StickyForeColor Sets the foreground color of un-selected sticky windows (Windows that follow you around the virtual desktop). This will affect the title-bar text, and the small outline of the window.

StickyForeColor Black

StickyBackColor Sets the background of sticky windows. This is best seen on the standard minimize and maximize icons, as they gets some extra colors you probably didn't want.

StickyBackColor Grey


Titlebars

Font

The font used in the titlebar is given in the WindowFont option. This option takes 1 parameter: the standard X fontstring.

Example: WindowFont -misc-*-Bold-*-*-*-*-*-*-*-*-*-ISO8859-*

To find the font you would like to use, check xfontsel.

Titletexts

The titletext placement may be changed using the option TitleTextAlign with a number as its parameter. These numbers mean basically:

Textures/gradients

There are 7 different kinds of textures you can use on your titlebars. They are set by using the option TextureTypes. TextureTypes takes 6 parameters, like this: TextureTypes Titlebar UTitlebar StickyTitlebar MenuTitlebar Menuitem Unknown These textures are (use only the numbers):

 
0 - No Texture
Flat single color. Useful if you're running low on colors. (Ever tried Afterstep on a 16 color display? (I have...))
1 - Wharf-style gradient. (default setting)
Diagonal gradient starting in the upper left corner and ending in the lower right corner.
2 - Horizontal one way gradient.
This starts on the top of the titlebar and goes down to the bottom.
3 - Horizontal two-way gradient.
This starts on the top of the bar, ends up with the end-color halfway down, and goes back to the startcolor on the bottom of the bar.
4 - Vertical one way gradient.
This begins with the starting color on the left side of the bar, and ends up with the end-color on the right side of the bar.
5 - Vertical two way gradient.
Begins with the Startcolor, goes to Endcolor in the middle of the bar, and ends up with the Startcolor again at the end of the bar.
128 - User defined texture.
This is IMHO the most interresting option. It lets YOU select the texture you want to use on the titlebar. This could be some metallic-look, or maybe a marble-look. YOU are the one to decide. You just have to make a picture to put up there. The textures are set using other options as shown below. This is in fact a nice way to reduce your color-usage. Use a simple 4-color image that looks good, and you just saved lots of colors! This option can unfortunately only be used by Window Titlebars.

The colors and textures between which the gradient is shaded is set by using the options below. Unless mentioned otherwise these take two parameters: Start color and End color. (In that order). Colors are specified either by common names or by the standard way of defining colors: #rrggbb where rr is red component of the color, gg is green and bb is blue. Numbers are in hexadecimal.

TitleTextureColor
Sets the colors for the Active titlebar
UTitleTextureColor
Sets the colors for the Unactive titlebar
STitleTextureColor
Sets the colors for the Unactive sticky titlebar
MTitleTextureColor
Sets the colors for the Menu-titles.
MenuTextureColor
Sets the colors for the menu items.
TitlePixmap
Sets the picture to use on the Active titlebar if you have specified option 128 as your texture option. This takes only one parameter: The name of the file to use. This can either be the full path, or if you don't specify a path, it is assumed to be in your PixmapPath or IconPath.
UTitlePixmap
Sets the picture to use on the Inactive titlebar if you have specified option 128 as your texture option. Otherwise the same as above.
STitlePixmap
Sets the picture to use on the Inactive sticky titlebar if you have specified option 128 as your texture option. Otherwise the same as above.

Window Behavior:

There are some settings to determine how your windows will place themselves on the screen as they pop up. This section will not cover icon behavior, since that will be covered in the icon section below.

RandomPlacement
Prevents user interaction with placement of windows. If this option isn't set, you will have to place all new windows on your screen yourself.
SmartPlacement
This option overrides RandomPlacement. It tries to place windows in unused spaces of the current workspace. If this fails it falls back on default. (RandomPlacement or interactiv placement)
ClickToFocus
Using this option you will have to click on a window to get it focused. This pracical if you tend to let your mousepointer drift into other windows on your screen.
SloppyFocus
Using this you get the "Focus-Follows-Mouse" mode. Very irritating if you don't like this. But very paractical if you do.
EdgeScroll
Percentage of a page to scroll when the cursor hits the end of the screen. This option takes two parameters. Horisontal and vertical. Using EdgeScroll 0 0 prevents moving from page to page, except when moving and resizing windows.
EdgeResistance
This tells how hard it should be to move between pages, using EdgeScroll. This takes two parameters. The first parameters is how many milliseconds the cursor must be on the screen edge before the screen is changed. Setting this to 10000 makes it impossible to move windows between virtual desktops if EdgeScroll 0 0 is used. The second states how many pixels a window must be placed outside the edge, before it falls partially out of the screen.
OpaqueMove
OpaqueMove is moving windows with the entire content visible while you move. Default X behavior is often that the standard outline is shown, in stead of the full window. This option takes one parameter, which states how many percent of the full screen size the window may be if it is still supposed to be moved opaquely. OpaqueMove 30 will make all windows of less than 30% of the screen move opaquely, while you only get an outline for those bigger.
OpaqueResize
This does the same to resize that opaquemove does to moves, except for the fact that all windows will be treated the same way.

ICONS:

Definition: I define icons to be minimized programs. There is some confusion in afterstep about what is called buttons and what is called icons.

Looks

ButtonTextureType n
Sets the type of background for the icons. This works in the same way as for titlebars and Wharf
ButtonBgColor col
This is the background color of the icons if you choose 0 (flat color) as your texturetype.
ButtonTextureColor col col
These are the colors between which afterstep will shade your icons, if you choose 1, 2, 3, 4 or 5 as your texturetype.
ButtonPixmap pixmap
If you choose 128 as your texturetype, you need to specify what pixmap to use as the background for the Icons. The size of the icons are adjusted to fit the pixmap. If you have transparent pixels in your pixmap this will apparently not create transparent icons. (That would be kinda cool :-)
ButtonNoborder
Specify this option if your iconbackground has it's own beveling, or you just don't want beveling.
ButtonMaxColors n
This is the maximum numbers of colors to use for gradient icons.
IconTitle
Specify this option to enable titles on the icons. The title will be the name of the minimized window (not the titlebartext). The title will position itself across the top of the icon, and push the programspecific icons down. To avoid this you can use a pixmap that is more than 64 pixels high to compensate for this.
IconFont font
This is the font used for the icontitles. Use some small easily read font here.

Icon Behavior

Yes. Icons can behave too. Here are the options you may use to make them behave:

IconBox RightX, RightY, LeftX, LeftY
Defines where in the screen your icons will place themselves. No border will be drawn around the iconbox. If you have several places you want your icons to place themselves, add more IconBox entries. When the first one is full, Afterstep goes on to the next one.
StubbornIcons
StubbornIcons makes icons de-iconify into their original position on the desktop, instead of on the current page.
StubbornIconPlacement
Prevent icons from placing themselves under active windows.
StickyIcons
Makes the icons follow you around in the screen as you change desktops just like sticky windows.

Assigning icons to programs

To assign a specific icon to a program use the Style option, with parameter Icon pixmap.

Wharf:

Wharf is the fancy little application-starter that is usually positioned on the upper right of your screen. This is one of the parts of afterstep that has evolved the most yet apperantly still stayed quite the same. It has the possibility of sliding out child-menus, swallow small windows so that the content can be shown there instead of taking unnecessary desktop space, and most importantly, start up programs you configure it to start.

The topics on Wharf are: Starting Wharf, Looks, Starting a program, Swallowing a program, Folders

Starting Wharf

Starting Wharf from the .steprc is quite simple. It is started the way all modules are started: With the Module command. Like this:

Module Wharf

Looks

To position the Wharf use the *WharfGeometry command. Like this:

*WharfGeometry -0+0

This will place the Wharf in the upper right corner, since the first number (-0) means 0 pixels from the right edge, and the second (+0) means 0 pixels from the top of the screen. Using this option you can position the Wharf wherever you want to.

Using the *WharfColumns command you can set how many coloumns the Wharf shall have. This is usually 1 but some people fancy more coloumns. Example:

*WharfColumns 2

will give you 2 coloumns of Wharf. The Wharf will place it's icons row by row, so that two icons that follow below each other in the .steprc might be beside each other on the Wharf.

You can animate folders sliding out from the Wharf by using the *WharfAnimate option. This option don't take any parameters, if you insert it then it shall be done. You can also animate the motion when Wharf is compressed into one single icon (middle-click on the wharf) by using the option *WharfAnimateMain, the same way as *WharfAnimate

Textures: The Wharf has per default a top-left to bottom-right fade as it's background. This is now possible to change at will, by using the option *WharfTexturetype, with one of these parameters:

0
Flat Color. Useful if you have few colors on your display. You can configure which color to use by using the *WharfBgColor option, with one parameter: the color.
1
Diagonal Fade. This is the default setting. From the top-left to the bottom-right. Colors are specified by using the *WharfTextureColor with two parameters: Start-color and end-color.
2
Top to bottom fade. This starts at the top and fades to the bottom.
3
Top to center to bottom fade. This starts at the top of the icon and fades to the center of the icon, then fades back to the bottom.
4
Left to right fade. Starts at the left and ends at the right. (Amazing... :-)
5
Left to center to right fade. Like 3 only vertically.
128
Userdefined Pixmap. This lets you select your own pixmap for use as background. To select pixmap you must use the *WharfPixmap option, like this:
*WharfPixmap marble.xpm
This will give the Wharf the background of the file marble.xpm, if this is located in your PixmapPath.
Warning: Unless you use the *WharfForceSize option, the Wharf will resize to the size of your background icon. This might give unwanted results. I recommend that you use an icon that is 64x64 pixels which is the default size of the Wharf. This is to make sure the swallowed apps behave properly, and looks don't get screwed up.

To restrict the number of colors used by the Wharf, you can use the option *WharfMaxColors. This takes one parameter: The number of colors you want Wharf to use.

Force size of Wharf: To force the size of the Wharf, despite the size of your background icon use the *WharfForceSize option. This locks Wharf to the standard 64x64 size.

Defining contents of menus

A menu is defined between the keywords Popup "name" and EndPopup. A menu option can execute a program, pop up another menu, do internal afterstep commands or do absolutely nothing. The relevent codes for doing this are as follows:

Title
This is usually the first item in a menu description. It gives the title of the menu window.
Title "My menu"
Exec
Exec is used to execute a program. It takes two parameters; the text of the menu entry and the command to execute.
Exec "Calculator" /usr/local/bin/xcalc
Popup
Pops up a submenu. The submenu has to be defined previous to the current menu in the .steprc file. The second parameter to Popup is the name of the menu to open.
Popup "Gamesmenu" games
Function
This executes a function described earlier in the .steprc file. For more info on defining functions, see Mouse and keyboard bindings.
Function "Move" move-and-raise
Raise
This raises a window to the top.
Raise "Raise window to top"
Lower
Opposite of Raise. Sends a window to the bottom.
Lower "Lower window"
Iconify
Iconifies a window..
Iconify "Minimize"
Stick
Makes the window sticky (it follows around to every desktop).
Stick "Stick window"
PutOnTop
Unlike Raise this raises a window to the top and keeps it there.
PutOnTop "Float on top"
Maximize
Maximizes the window to a specified size. If no size is specified it is maximized to full size. The two numerical parameters is percent of screen to use, I think. If the number is 0 the size will not chenge in that direction.
Maximize "Maximize window" (will maximize to full screen)
Maximize "Horisontal maximize" 100 0 (will maximize fully horisontal, and leave vertical untouched)
Close
Does a nice closedown of a window.
Close "Close window"
Destroy
Brutally kill a window. (use if Close doesn't work.
Destroy "Terminate window"
Refresh
Refreshes the screen (in case there has come some clutter on it).
Refresh "Refresh screen"
Restart
Restart can be used to restart the windowmanager. It can also restart with a different windowmanager than Afterstep. The syntax is like that of Exec.
Restart "Restart Afterstep" /usr/local/bin/afterstep
Restart "Change to Fvwm" /usr/local/bin/fvwm
Quit
Quit is used to quit the window manager. Note that this doesn't necessarily quit X. On some systems this may cause all your windows to stay on the screen (the same screen) but leaving you without any possible way to move them around, or possibly even not able to type into them. Only your mouse will work.
Quit "Exit afterstep."
Nop
Probably the most useless of all options. :) The No OPeration function does absolutely nothing. It creates an entry in the menu though, so somebody might find a use for it.
Nop "Just a comment"

 

A menu example

This is a typical use of menus. This is one way of defining a standard popup for your left mouse button in the root window. It has a submenu for exiting/restarting and a couple of lines to start applications.

Popup "quit" 
  Title "Quit"
  Restart "Restart" /users/frankrl/pub/bin/afterstep
  Quit    "QUIT"
  Nop "Ah, what the hell."
EndPopup

Popup "Menu"
  Title "Main menu"
  Exec  "Coffein Break"	xlock
  Exec  "Terminator X"  /store/bin/xterm
  Popup "Quit"		quit
EndPopup
		

 

Use bitmaps in wharf

Using bitmaps instead of shading lets YOU choose how many colors you want to use. (okay, you can set that on the shadings too but they don't look good with less than 16 colors each.) Fiddle around a little with gimp, xpaint or some other program to draw your own graphics, with as few colors as possible. Make sure your .xpm-file only includes these colors. Do this by checking the .xpm-file in <insert your favourite texteditor here>. My wharfbackground has it's color definition looking like this:

/* XPM */
static char * wharfback [] = {
/* width height ncolors cpp [x_hot y_hot] */
"64 64 6 1 -1 -1",
/* colors */
" 	s iconColor1	m black	c black",
".	s iconColor7	m white	c #00c000",
"X	s iconColor4	m white	c #008000",
"o	s iconColor5	m black	c #004000",
"O	s iconGray8	m black	c #002000",
"+	s iconColor3	m black	c #006000",
		

You can see from this that I use only 6 colors (all greens) for my wharf-background.


Convert the icons

The icons that come with afterstep are meant for 24bpp displays. They look very nice, but unless you have a 24bpp display, you will run out of colors; Fast! Use the "convert" program if you have that available (It is part of imagemagick I think). convert -colors 8 file.xpm > file2.xpm should do the trick. Manually edit your icons after that to try to use the same colors in more of the icons.


Use bitmaps or flat color on titlebars

Using flat color instead of shading on titlebars, reduces the colors too. See the titlebar section on how to do this. You can also use a bitmap here. If you do, try to reduce the number of colors in the bitmap as far as you can using convert and manually editing the .xpm.


Run netscape with -install option

This tip is useful only for those of you who run netscape. Invoke netscape with netscape -install to give netscape a private colormap. Thus reducing the number of colors stolen by netscape to a bare minimum. There is often options to do this in other programs as well, check the man-pages.


Manually edit icons

If you still feel you need that extra 2 or three colors, try to manually edit the xpm's you use. The xpm-format is simple and can be edited using 'your favourite texteditor'. This way you can also open several icons that use the somewhat same colors and edit the color-settings so that they use the exact same color.


Select thy background image with care

Background images take a lot of colors if you're not careful selecting them. Try to use only a flat color instead. If you prefer having a backdrop, select one with few colors or convert it to fewer colors. (Extra hint: xearth with only 12 colors actually looks quite good)