This file is meant as a reference to configuring pwm, not as a beginning users' manual. CONTENTS: 1. Options 2. Functions 3. Built-in menus 1. OPTIONS Defining a menu: menu "name", "title" { # For menus that require a window to operate on, set # contextual [contextual] entry "name", "function" [, arg] submenu "submenu name" } Binding keys: # Set default modifier used for all bindings from this point on # Known modifiers: Shift, Lock, Control, Mod<1-5> set_mod "Modifiers" # Bind a key globally: kbind "[modifiers+]key", "function" [, arg] # Bind a key for menu navigation: kbind_menu "[modifiers+]key", "function" [, arg] # Bind a key for moving/resizing in moveres mode: kbind_moveres "[modifiers+]key", "function" [, arg] Binding pointer buttons: mbind { # Context this binding applies to. # Known contexes: root, tab, corner, side, window, # dockwin, button context context1, context2, etc. # Which button? state Button<1-5> # Action on button press press "func" [, arg] # Action on button click click "func" [, arg] # Action on double click press "func" [, arg] # Action on pointer motion (drag) motion "func" [, arg] } Configuring screens: # On single-head configurations the only screen should be 0 screen { # Default (title) font font "fontname" # Menu entry font menu_font "fontname" # Menu entry position when using shortcuts # Default : 1, 1 menu_pos x, y # border width: total width of frame border # bevel width: 3d-bevel width border_w , # min width: minimum width of (title)bar in pixels # max width q: maximum bar width divided by frame width # tab min width: minimum width of a single tab bar_w , , # Color groups names: # # act_tab_sel_colors: Active frame/selected tab # act_tab_colors: Active frame/tab # act_base_colors: Active frame # act_sel_colors: Active selected item # act_menu_tit_colors: Active menu title # act_menu_sel_colors: Active menu selected item # act_menu_base_colors: Active menu base color # # tab_sel_colors: Inactive frame/selected tab # tab_colors: Inactive frame/tab # base_colors: Inactive frame or menu # sel_colors: Inactive menu/selected item # menu_tit_colors: Inactive menu title # menu_sel_colors: Inactive menu selected item # menu_base_colors: Inactive menu base color # # The colors (highlight, shadow, background, foreground) # are normal X color specifications. See the manual page # XParserColor(3x) for more. # "highlight", "shadow", "background", \ "foreground" # Specify (optional) tile image to use as dock background. # (xloadimage required for this kludge to work). dock_tile "tile_image" # Set number of workspaces workspaces [, ] # Set dock position and orientation # Position is std. X geometry specification and dir # is 0 for vertical and 1 for horizontal. dock "position", # Set dock elements size # Default is 64, 64 dock_s , # Set dock stacking style # Stacking styles are : # # above : dock is always above other windows # normal : dock behave just like any other window # below : dockt is always below other windows # # Default is above dock_stacking # Set dock sticky # Default is yes dock_sticky # Set opaque move percent (i.e. windows that take less than # this percentage of screen space are moved opaquely). # Default is 100 - all moves are opaque. opaque_move # Set sound player for sound events. # No default. "player" # Sound groups names : # # start_sound # finish_sound # appstart_sound (not well implemented) # appexit_sound (not well implemented) # shade_sound # unshade_sound # maximize_sound # unmaximize_sound # stick_sound # unstick_sound # attach_sound # detach_sound # # Sound files are files that the previous sound player can # read. There are no defaults. "sound_file" } Frame properties: # Initial settings for frame frameprop_id frameprop frameprop_id { # The frame to initially place windows in. Numbers in # range [1, 255] can be used. 0 is default, create # new frame. All windows belonging to that frameprop will be # put int that frame. frame # Initial workspace for this frame. 0 is the first workspace, # -1 current and -2 sticky. workspace # Draw borders for this frame # Default : yes border # Draw tab for this frame # Default : yes tab # Fixed geometry for this frame and all windows that will be # put in it. # No defaults geometry "WxH+X+Y" # Specify what other frames are overlapped by this one. # The entry is a text string with space-separated numeric ids. # No defaults overlaps "id1 id2 id3..." # Specify in wat order an app should try to put its frame if # this one is already used. The same format as for overlaps is # used. # One can define multiple try orders but only the 1st is used # by now. # No Defaults try_order "id1 id2 id3..." } Window properties: # Initial settings for window "class.instance" # (e.g. Netscape.Navigator, FooApp.*) winprop "class.instance" { # The frame to initially place this window in. Numbers in # range [1, 255] can be used. 0 is default, create # new frame. The property _PWM_FRAME_ID overrides this setting. frame # The frame property to initially use for this window. Numbers # in range [1, 255] can be used. 0 is default and uses no # frameprop. Using a frameprop overwrites all other # properties not related to frameprops. frameprop # Initial workspace for this window. 0 is the first workspace, # -1 current and -2 sticky. This setting is overridden by # the property _PWM_WORKSPACE_NUM. workspace # Position of a dockapp on the dock. # Please note that the WM_CLASS property of the hidden main # window is used, not the visible (docked) icon's. dockpos # Wildmode (no borders, allow the app to move the window). # app = use mwm hints (default), yes = force wildmode, # no = force normal mode (ignore mwm hints). wildmode # Draw borders for this window # Default : yes border # Draw tab for this window # Default : yes tab # Policy to use when creating the frame of type 'frameprop_id'. # force : place the frame without checking for # other frames # insert : move overlapping frames so that this one # does not overlap any other frame # try_others : try another frameprop if the place is # taken # add_to_existing : add to an existing frame if the place is # taken # Default : force add_policy # Policy to use when the add_policy cannot be acheived. # All previous policy except try_others, though using # 'add_to_existing' twice is not usefull :) # 'add_' and 'fallback_' policies should be different. In any # case, if the fallback_policy fails also, the 'force' policy # is used. # Default : force fallback_policy } Misc. options: # Set double click delay in milliseconds (default: 250) dblclick_delay 2. FUNCTIONS Contexes Function Args Description --------------------------------------------------------------------------- frame toggle_shade - Toggle shade mode toggle_stick - Toggle stickyness toggle_decor - Toggle borders and title on/off toggle_tab - Toggle tab title on/off toggle_maximize 1|2|3 Toggle maximization of the frame: 1 - vertical 2 - horizontal 3 - both switch_nth x Switch to x:th client window within this frame. switch_rot [-]x Switch to x:th next/prev client window within this frame. set_stack_lvl lvl Set stacking level: 0 - keep on bottom 1 - normal 2 - keep on top attach_tagged - Attach tagged windows to this frame. change_to_frameprop_f x change frame to use frameprop x using the 'force' policy. change_to_frameprop_i x change frame to use frameprop x using the 'insert' policy. The other policies are not necessary since 'attach_tagged' can be used in place of 'add_to_existing' and free places are seen by the user for 'try_others'. --------------------------------------------------------------------------- frame raise - menu lower - kb_moveres - Go to keyboard move/resize mode. move_to_ws x Move object to workspace number x. --------------------------------------------------------------------------- window close - kill - toggle_tagged - --------------------------------------------------------------------------- global circulate [-]n Select n:th next/prev frame/menu. circulateraise [-]n circulate+raise switch_ws_num n Go to workspace n switch_ws_hrot [-]n Rotate n workspaces horizontally. switch_ws_vrot [-]n Rotate n workspaces vertically. join_tagged - Join tagged windows in a new frame. goto_frame id Go to frame toggle_dock - Hide/Show dock. toggle_dock_dir - Toggle dock orientation between vertical and horizontal. menu "name" Show menu named "name". exec "cmdline" Run a program. exit - Exit PWM. restart - Restart PWM. restart_other "cmdline" Restart other window manager. --------------------------------------------------------------------------- *** These functions should only be used in kbind_menu! menu menu_next - Next entry menu_prev - Previous entry menu_entersub - Enter submenu menu_leavesub - Go back to parent menu menu_close - Close menu menu_keep - Do not close menu when executing action bound to an entry. menu_raisekeep - menu_keep+raise (internal) menu_execute - Execute action bound to current entry or enter submenu. --------------------------------------------------------------------------- *** These functions should only be used in kbind_moveres! moveres kb_moveres_end - Leave moveres mode mode kb_moveres_cancel - Leave moveres mode and discard changes. kb_move Move kb_move_stepped Move in larger steps. kb_resize Resize kb_resize_stepped Resize in larger steps Flags is a bitwise OR of these values: 0x01 - right 0x02 - left 0x10 - bottom 0x20 - top 0x04 - decrement width 0x40 - decrement height --------------------------------------------------------------------------- *** These functions should only be used in pointer/button actions! frame/motion move - frame/motion resize - frame/motion move_stepped - Move in larger steps frame/motion resize_stepped - Resize in larger steps tab/motion tab_drag - Start dragging a tab. tab tab_switch - Switch to the client window whose tab this is. --------------------------------------------------------------------------- 3. BUILT-IN MENUS There are three builtin window list menus: goto_menu Go to selected window detach_menu Move selected window to current workspace possibly in a new frame attach_menu (contextual) Attach selected window in current frame