Twm: Difference between revisions
m (Add customization ideas.) |
Prabuanand (talk | contribs) (removed Category:Desktop as per Help_talk:Style) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
== Prerequisites == | == Prerequisites == | ||
{{:Include:Desktop prerequisites}} | |||
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]] | * [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]] | ||
{{ | |||
== Installation == | |||
Install twm {{Cmd|# apk add {{pkg|twm|arch=}}}} | |||
In home directory create a file named ".xinitrc": | In home directory create a file named ".xinitrc": | ||
{{Cmd|vi ~/.xinitrc}} | {{Cmd|vi ~/.xinitrc}} | ||
Line 16: | Line 17: | ||
{{Cmd|nano ~/.xinitrc}} | {{Cmd|nano ~/.xinitrc}} | ||
Write to file: | Write to file: {{cat|~/.xinitrc|exec twm}} | ||
{{cat|~/.xinitrc|exec twm}} | |||
Save the file. | Save the file. | ||
If doing no further configuration, you will also need xterm to open apps: | If doing no further configuration, you will also need xterm to open apps: | ||
Line 31: | Line 28: | ||
You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it. | You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it. | ||
= Keyboard layout = | == Configuration == | ||
=== Keyboard layout === | |||
The keyboard layout defaults to US qwerty. If you use an alternative layout (e.g. Colemak) you can install setxkbmap: | The keyboard layout defaults to US qwerty. If you use an alternative layout (e.g. Colemak) you can install setxkbmap: | ||
{{Cmd|# apk add {{pkg|setxkbmap|arch=}}}} | {{Cmd|# apk add {{pkg|setxkbmap|arch=}}}} | ||
Line 38: | Line 36: | ||
{{Cmd|setxkbmap us -variant colemak}} | {{Cmd|setxkbmap us -variant colemak}} | ||
= Customizing twm = | === Customizing twm === | ||
twm can be extensively modified. The default system-wide default configuration file for twm is {{path|/usr/share/X11/twm/system.twmrc}} and the per-user configuration is {{path|~/.twmrc}}. The user file completely overrides the system, so it's recommended to start modifications by copying the system-wide file to the per-user file.<br> | twm can be extensively modified. The default system-wide default configuration file for twm is {{path|/usr/share/X11/twm/system.twmrc}} and the per-user configuration is {{path|~/.twmrc}}. The user file completely overrides the system, so it's recommended to start modifications by copying the system-wide file to the per-user file.<br> | ||
Some very basic customizations which many users do are below: | Some very basic customizations which many users do are below: | ||
==Add basic alt+tab support== | === Add basic alt+tab support=== | ||
The following can be added to the config enable basic alt+tab support for rapidly switching windows to the front: | The following can be added to the config enable basic alt+tab support for rapidly switching windows to the front: | ||
<pre>"Tab" = m : root|window|frame|title : f.circleup</pre> | <pre>"Tab" = m : root|window|frame|title : f.circleup</pre> | ||
==Add maximize, and close buttons== | === Add maximize, and close buttons === | ||
First install some bitmaps for the buttons: | First install some bitmaps for the buttons: | ||
{{cmd|# apk add {{pkg|xbitmaps|arch=}}}} | {{cmd|# apk add {{pkg|xbitmaps|arch=}}}} | ||
Line 55: | Line 53: | ||
RightTitleButton "xlogo11"=f.delete | RightTitleButton "xlogo11"=f.delete | ||
</pre> | </pre> | ||
[ | |||
== Troubleshooting == | |||
== See also == | |||
[https://en.wikipedia.org/wiki/Twm Twm wikipedia page] | |||
[[Category:Window Managers]] | [[Category:Window Managers]] |
Latest revision as of 15:26, 25 May 2025

twm (Tab Window Manager) is the standard window manager for the X Window System since version X11R4.
Prerequisites
- Internet connectivity, unless the packages have been pre-fetched into a local cache.
- Install appropriate Graphics driver drivers for your hardware. Without graphics drivers, errors are likely to occur when starting your desktop.
- A non-root user account.
- The community repository must be enabled.
- Set up eudev.
- Install and enable D-Bus. Without D-Bus, icons and keyboard shortcuts may be missing.
- Install Xorg
Installation
Install twm
# apk add twm
In home directory create a file named ".xinitrc":
vi ~/.xinitrc
Or, if you prefer nano text editor
nano ~/.xinitrc
Write to file:
Contents of ~/.xinitrc
Save the file.
If doing no further configuration, you will also need xterm to open apps:
# apk add xterm
Start the X window manager
startx
You will be greeted with a black screen. Hold left mouse button and select "XTerm". Type in a program name to launch it.
Configuration
Keyboard layout
The keyboard layout defaults to US qwerty. If you use an alternative layout (e.g. Colemak) you can install setxkbmap:
# apk add setxkbmap
Then switch to another layout (example for colemak):
setxkbmap us -variant colemak
Customizing twm
twm can be extensively modified. The default system-wide default configuration file for twm is /usr/share/X11/twm/system.twmrc and the per-user configuration is ~/.twmrc. The user file completely overrides the system, so it's recommended to start modifications by copying the system-wide file to the per-user file.
Some very basic customizations which many users do are below:
Add basic alt+tab support
The following can be added to the config enable basic alt+tab support for rapidly switching windows to the front:
"Tab" = m : root|window|frame|title : f.circleup
Add maximize, and close buttons
First install some bitmaps for the buttons:
# apk add xbitmaps
Then edit the config file and add the following:
Function "maximize" { f.fullzoom f.focus f.nop } RightTitleButton "icon"=f.function "maximize" RightTitleButton "xlogo11"=f.delete