Weston
Weston is the reference implementation of a Wayland compositor.
Usage
To launch Weston natively (from a TTY) or to run Weston inside a running X session:
$ weston
See weston(1) for details and configuration flags.
Demo applications
Then within Weston, you can run the demos. To launch a terminal emulator:
$ weston-terminal
To move flowers around the screen:
$ weston-flower
To display images:
$ weston-image image1.jpg image2.jpg...
Shortcuts
Super
(windows key) can be changed, see weston.iniCommand | Action |
---|---|
Ctrl+Alt+Backspace |
Quit Weston |
Super+Scroll (or PageUp /PageDown ) |
Zoom in/out of desktop |
Super+Tab |
Switch windows |
Super+LMB |
Move Window |
Super+MMB |
Rotate Window |
Resize Window | |
Change window opacity | |
Force Kill Active Window | |
Switch Prev/Next Workspace | |
Grab Current Window and Switch Workspace | |
Super+Fn |
Switch to Workspace n (e.g. F2) |
Take a screenshot | |
Record a screencast |
Configuration
Following is an example configuration file. See for more.
~/.config/weston.ini
[core] # xwayland support xwayland=true [libinput] enable-tap=true [shell] #background-image=/usr/share/backgrounds/gnome/Aqua.jpg background-type=scale-crop background-color=0xff000000 #background-color=0xff002244 #panel-color=0x90ff0000 panel-color=0x00ffffff panel-position=bottom #clock-format=none #animation=zoom #startup-animation=none close-animation=none focus-animation=dim-layer #binding-modifier=ctrl num-workspaces=6 locking=false cursor-theme=Adwaita cursor-size=24 # tablet options #lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png #lockscreen=/usr/share/backgrounds/gnome/Garden.jpg #homescreen=/usr/share/backgrounds/gnome/Blinds.jpg #animation=fade # for Laptop displays [output] name=LVDS1 mode=preferred #mode=1680x1050 #transform=rotate-90 #[output] #name=VGA1 # The following sets the mode with a modeline, you can get modelines for your preffered resolutions using the cvt utility #mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync #transform=flipped #[output] #name=X1 #mode=1024x768 #transform=flipped-rotate-270 # on screen keyboard input method #[input-method] #path=/usr/lib/weston/weston-keyboard [keyboard] keymap_rules=evdev #keymap_layout=us,de #keymap_variant=colemak, #keymap_options=grp:shifts_toggle #keymap_options=caps:ctrl_modifier,shift:both_capslock_cancel repeat-rate=30 repeat-delay=300 # keymap_options from /usr/share/X11/xkb/rules/base.lst #numlock-on=true [terminal] font=monospace font-size=18 [launcher] icon=/usr/share/weston/icon_flower.png path=/usr/bin/weston-flower [launcher] icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png path=/usr/bin/weston-terminal --shell=/usr/bin/bash #[launcher] #icon=/usr/share/icons/gnome/32x32/apps/utilities-terminal.png #path=/usr/bin/gnome-terminal [launcher] icon=/usr/share/icons/hicolor/32x32/apps/firefox.png path=MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox #[launcher] #icon=/usr/share/icons/Adwaita/32x32/apps/multimedia-volume-control.png #path=/usr/bin/st alsamixer -c0
Minimal :
Monitors
Weston's outputs differ slightly from those of Monitors:
is the unused built-in video adapter. The add-on adapter is cabled to one HDMI and one DVI monitor, so the output names areHDMI-A-1
andDVI-I-1
.
XWayland
See Wayland#XWayland for details and an overview of available packages.
Set the following to activate the use of XWayland:
Shell font
Weston uses the default sans-serif font for window title bars, clocks, etc. See Font configuration#Set default or fallback fonts for instructions on how to change this font.
Tips and tricks
Screencast recording
Weston has built-in screencast recording which can be started and stopped by pressing the + key combination. Screencasts are saved to the file in the current working directory of Weston. The WCAP format is a lossless video format specific to Weston, which only records the difference in frames. To be able to play the recorded screencast, the WCAP file will need to be converted to a format which a media player can understand. First, convert the capture to the YUV pixel format:
$ wcap-decode --yuv4mpeg2 capture.wcap > capture.y4m
The YUV file can then be transcoded to other formats using FFmpeg or (see for more).
Window switching
To switch windows with instead of Super+Tab
change to KEY_SPACE
in and recompile weston.
EGLstream support (for proprietary Nvidia Driver)
See Wayland#Requirements for reference.
You can find weston-eglstream packages on AUR, that contain special patches.