It should be possible to control everything by keyboard. Here we show some
of the not so obvious ways to achieve important window managing tasks only
with keystrokes.
Alt-Tab = Switches between the open windows
Alt-F4 = Closes a window
Alt-F9 = Minimizes a window
Alt-F10 = Maximizes a window
Alt-F12 = Rolls the window up
(leaving only the titlebar visible, press Alt-F12 again and the window rolls back down)
Alt-Shift-F10 = Maximizes the window vertically
Alt-Ctrl-arrow left = Changes workspaces from 1-12
Alt-Ctrl-arrow right = Changes workspaces from 12-1
Alt-Ctrl-Esc = Opens the window list
Ctrl-Esc = Opens the menu
You are accustomed to a window manager that allows you to switch
between virtual desktops using your keyboard? IceWM allows for this,
too.
Before I describe how to switch between virtual desktops I want to
describe how to control their number. Imagine that your
$HOME/.icewm/preferences
has a row reading
WorkspaceNames="1","2","3","4","5","6","7","8","9","0"
This setting results in ten virtual desktops and ten buttons in your
taskbar looking like this:
+---+---+---+---+---+---+---+---+---+---+
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
+---+---+---+---+---+---+---+---+---+---+
If you name less desktops you obtain less if you name more you get
more.
For understanding how switching virtual desktops works in IceWM you
should imagine that the buttons represent your virtual desktops and
that these desktops are arranged in one long row.
You can imagine two ways of switching between desktops:
- Switching to desktop number seven
- Switching to the desktop on the left/right of the present one
IceWM has both ways:
- To switch to desktop number n you simply press
"Ctrl-Alt-n"
- To switch one desktop to the left you press
"Ctrl-Alt-Cursor_Left"
- To switch one desktop to the right you press
"Ctrl-Alt-Cursor_Right"
"Cursor_Left"
("Cursor_Right")
represents the key that moves your cursor one character to the left
(right).
If you are using "Ctrl-Alt-Cursor_Right"
on the
rightmost desktop you switch to the leftmost desktop. From here,
"Ctrl-Alt-Cursor_Left"
brings you back to the
rightmost desktop.
What if you have more than ten virtual desktops? In this
case "Ctrl-Alt-n"
will only work for the first ten
desktops while switching to the left or right still works for all
desktops.
IceWM has another feature to offer: You may not only use your
keyboard to switch desktops, you can also use it to move windows from
one desktop to another. The next section is on this (you should read
it, too).
Note: To switch desktops when moving mouse on desktop edges use preference:
EdgeSwitch=1
then you can change workspaces automatically by moving your cursor to the left/right edges of your screen.
In the previous section I explained how to switch between desktops.
If you didn't already read it you should do it now because moving the
active window to another desktop works almost the same like switching
to a certain desktop. All you have to do is pressing the
"Shift"
while switching to the desktop:
- To move a window to desktop number n you simply
press
"Ctrl-Alt-Shift-n"
- To move a window one desktop to the left you press
"Ctrl-Alt-Shift-Cursor_Left"
- To move a window one desktop to the right you press
"Ctrl-Alt-Shift-Cursor_Right"
You should run IceWM with "TaskBarDoubleHeigth=1"
because that will enable the CLI (see
What is the blank bar in the task bar good for? for some
more information).
The CLI is especially useful if you rather frequently need to access
man pages and don't want to have xman hang around all the time.
If you enter man perl
and press
"Ctrl-ENTER"
an XTerm will pop up displaying the
main Perl man page. If you press "q"
not only the
man page no longer is displayed but the XTerm will terminate, too.
This only is one example of how to use the CLI. You can use
it to issue any other command as well. A problem that might occur is
that the XTerm will terminate before you had time to read the output
of a command (it terminates as soon as the command is done).
In most such cases it is sufficient to pipe the output through
less
(this is one of the rare cases you cannot
use more
because it terminates after displaying
the last line). However, there are cases (mainly programs that write
colorful output such as ls
) that may result in
trouble with less
.
Fortunately Linux (any Unix version?) offers a solution to these
cases, too: The sleep
command. It sleeps some
time, then terminates. So you could use
ls $HOME/bin --color ; sleep 1m
to list all programs in your $HOME/bin
directory. The sleep
command will wait the given
period of time (in this case a minute) before the XTerm automatically
will close (you can use "Ctrl-C"
to abort the
sleep
command before that time went by).