Troubleshooters.Com®, Linux Library and Steve's ctwm Secret Stash Present:

Keyboard Enthusiast's Guide to ctwm Setup

Contents:

Introduction

Some folks enjoy using the mouse. If that describes you, you don't need to read this document.

Since you're still reading, I assume you prefer keyboard operation of your computer's User Interface. From experience, you've found that in the time it takes you to just reach for the mouse, you can do two or three keyboard-based operations. To the extent possible, you prefer to operate your computer with your keyboard.

Well, there's good news for you. Ctwm can be set up to be run pretty much completely from the keyboard. You can spawn programs using your keyboard by incorporating dmenu into your ctwm setup. You can change workspaces via keyboard commands. You can circle focus among the windows on a given workspace. You can close the currently focused window with a keyboard command. You can invoke menus with a keyboard command, and navigate those menus using the keyboard.

This document tells you how to do all of these things.

About the Hotkeys In This Document

Most of the hotkeys in this document use Shift+Ctrl+another_key. You can change as you feel necessary: The principle remains the same. The rest of this section explains why I personally like Shift+Ctrl as a modifier.

Once again, if you don't like Shift+Ctrl, you can use any hotkeys that work for you.

First, Incorporate dmenu

If you haven't already, incorporate dmenu into your ctwm using these instructions. Once dmenu is incorporated, everything becomes much more efficient.

Now Review How Ctwm Menus Work

Nothing ruins a keyboard controlling experience like being forced to pick up the mouse to navigate submenus, and unless you know the ctwm method of menu navigation (or unless you install the patch), that's what you'll be forced to do.

So now's a good time to review the keyboard portion of ctwm menu navigation. If you have any uncertainties, review the Menu Behavior section of the Ctwm Menu Unexpected Behavior document.

Put the Rest of Your Hotkeys in ~/.ctwmrc

On any WMDE (Window Manager or Desktop Environment), there are a few functionalities that must be hotkeyed for proper keyboard operation. These include:

The preceding hotkeys are implemented by the following code:

# Explicitly path dmenu_run_vertical if it isn't on the path
"comma"     = s | c   : all     : f.exec  "dmenu_run_vertical"
"semicolon" = s | c   : all     : f.menu "defops"
"period"    = s | c   : all     : f.menu "TwmAllWindows"
"space"     = m       : window  : f.menu "windowops"
"0"         = m       : window  : f.delete
"l"         = s | c   : all     : f.warpring "next" # Cycle wins fwd 
"h"         = s | c   : all     : f.warpring "prev" # Cycle wins rev 
"l"         = c | m   : all     : f.nextworkspace
"h"         = c | m   : all     : f.prevworkspace

### GO TO SPECIFIC WORKSPACE
"1"         = m       : all : f.gotoworkspace "one"
"2"         = m       : all : f.gotoworkspace "two"
"3"         = m       : all : f.gotoworkspace "three"
"4"         = m       : all : f.gotoworkspace "four"
"5"         = m       : all : f.gotoworkspace "five"
"6"         = m       : all : f.gotoworkspace "six"
"7"         = m       : all : f.gotoworkspace "seven"
"8"         = m       : all : f.gotoworkspace "eight"
"9"         = m       : all : f.gotoworkspace "nine"

### SEND FOCUSED WINDOW TO SPECIFIC WORKSPACES
#   TO BE LATER DETERMINED
#"1"         = c | m   : all : f.whatever "one"

[ Training | Troubleshooters.Com | Email Steve Litt ]