pwm
![]() |
![]() |
![]() |
![]() |
pwm
Photon Window Manager
Syntax:
pwm [-CcdfGKknPrSW] [-a C|L|R] [-b color]
[-g input_group] [-R [b|c|f|m|r|t]...]
[-s server] [-Xcurs[,clr]]
Runs on:
Neutrino
Options:
- -a C|L|R
- Alignment. By default, title alignment is centered (C) in the title bar. This option lets you change the alignment to either left (L) or right (R) justification.
- -b color
- Background color (hex RGB value).
- -C
- Shut down the window manager when you close the last window (bkgdmgr and shelf are considered windows).
- -c
- Cursor focus. By default, focus is given to a window when you click anywhere inside it. This option lets you change keyboard focus so that it follows the cursor. You can toggle this behavior within pwm using the Cursor Focus option.
- -d
- Full window dragging. Change the default dragging from outline to full window dragging. You can toggle this behavior within pwm using the Full Window Dragging option.
- -f
- Click to front. By default, a window is brought to the front only if you click on the window title bar. This option lets you click anywhere in a window to bring it to the front. You can also set this behavior within pwm using the Click to Front option.
- -G
- Enable multi-monitor placement policy.
- -g input_group
- Set the PWM input group (default 1).
- -K
- Disable the keyboard.
- -k
- Always process Ctrl-Alt keychords. This option allows Ctrl-Alt to always be recognized by PWM for keyboard navigation. By default, each window has its own Ctrl-Alt state.
- -n
- Disable Cursor focus. If the cursor focus is set to the default mode in a mouse-less environment (or when the mouse doesn't start) a window can't be accessed. This option provides a override for a mouse-less environment. The ph -s command calls pwm with this option.
- -P
- Disable console switching, the workspace menu, and the keyboard. This option is an alternative to specifying -KSW.
- -R [b|c|f|m|r|t]
- Run PWM on a remote computer (phditto/phindows).
- b -- Remove borders from application window.
- c -- Close PWM when there are no child windows to manage.
- f -- Fit (make application always fit remote window).
- m -- Maximize (initially resize application to fit remote window).
- r -- Resize remote (initially resize remote window to fit application).
- t -- Pass application window title to remote window.
- -r
- Auto-raise window on steady cursor.
- -S
- Disable console switching.
- -s server_name
- The name of the Photon server. The default is /dev/photon.
- -W
- Disable the workspace menu.
- -Xcurs[,clr]
- Define default cursor type (E9xx code) and color (hex RGB value)
Description:
The Photon Window Manager (pwm) provides standard window management functions, including move, resize, minimize, maximize, raise, lower, and close. It provides common window frame borders that applications can customize, depending on their requirements.
Apart from the -f click-to-front option listed above, pwm also enables the following key combinations:
- Alt-Shift-Esc -- back-most window to front
- Alt-Esc -- front-most window to back
- Ctrl-Alt-1-9 -- switch to console number 1 to 9
- Ctrl-Alt-Return, Enter, or + -- Cycle to the next console with an active window.
- Ctrl-Alt-Backspace or - -- Cycle to the previous console with an active window.
- Alt-F2 -- Bring the next window in the console to the front.
- Alt-F3 -- Bring the previous window in the console to the front.
- Alt-F4 -- Close the current application.
- Alt-F5 -- Restore the current window, if it is maximized.
- Alt-F7 -- Move the window. Use the arrow keys or mouse to move the window.
- Alt-F8 -- Resize the window. Use the arrow keys or the mouse to resize the window.
- Alt-F9 -- Minimize the current window.
- Alt-F10 -- Maximize the current window.
- Print Screen -- Start snapshot to take a screen shot.
PWM Options
Selecting Desktop Config... from the Desktop Menu launches the pwmopts program, which lets you configure the workspace.
Configuring the Desktop menu
Each user can configure the Desktop menu. The configuration file is in $HOME/.ph/wm/wm.menu.
![]() |
If you create your own menu, you won't see new menu items when they're added to the default one. |
Here's a sample personal PWM menu:
= Desktop Menu Terminal T pterm - Graphics Config... G phgrafx Desktop Config... W pwmopts Shelf Config... S shelf -c - Mail M pterm elm News N pterm trn - Shutdown... u phshutdown
The format of the file is simple; each line describes a menu item. Menu items are defined in the form:
MenuItemTABHotkeyTABCommandAndArguments
If the line starts with:
- an equals sign, the rest of the line is the menu title
- a hyphen, it's a menu separator.
You can't use environment variables because the command parsing is simple. However, you can write the command to a shell script and specify the script as the command to run.
Examples:
Start the window manager with left-side title alignment, cursor focus, and click-to-front behavior:
pwm -cf -aL
Files:
- $HOME/.ph/wm/wm.cfg
- Holds a user's PWM workspace configuration.
- $HOME/.ph/wm/wm.menu
- Holds a user's custom PWM Workspace menu.
Environment variables:
- PHWMEXIT
- When set, disables the confirmation dialog when Photon exits.
To disable this dialog, add the following lines before
the ph command in your
/etc/rc.d/rc.local file:
# disable confirmation dialog when Photon exits export PHWMEXIT=1 - PHWMOPTS
- Specifies the options to be passed automatically to pwm.
See also:
Using the Photon microGUI in the Neutrino User's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)

