| SWM-WEB(1) | General Commands Manual | SWM-WEB(1) |
NAME
swm-web —
scrotwmos tiling terminals in a web browser
SYNOPSIS
swm-web |
[-h height]
[-p port]
[-w width] |
DESCRIPTION
swm-web is the scrotwmos tiling core with
a web browser for its screen. It serves a page over HTTP and WebSocket on
the loopback interface, 127.0.0.1 and ::1. It opens a WebSocket only for its
own page: the request must name localhost,
127.0.0.1, or [::1] with its
port as its Host, and http:// and that Host as its
Origin. It asks for no password: any local user who can reach the port gets
a shell as the user who runs it. Each window on the page is a terminal: a
login shell on a pseudo-terminal that swm-web runs,
drawn by xterm.js in the browser. The layouts, workspaces, and key bindings
are those of
scrotwmos.conf(5).
The page is index.html;
config.html changes settings while it runs. One
browser at a time holds each of them. swm-web
refuses a second. When a browser connects with no window focused,
swm-web opens three terminals.
The options are as follows:
-hheight- The screen height in pixels, 1 to 32767, until a browser connects and sends the size of its page. The default is 1080.
-pport- Listen on TCP port, 1 to 65535. The default is 8080.
-wwidth- The screen width in pixels, 1 to 32767, until a browser connects and sends the size of its page. The default is 1920.
Keys
The modifier is Mod1 by default. These
bindings differ from those of
scrotwmos.conf(5):
- Mod+Q
- close the window
- Mod+Shift+Q
- close the window
- Mod+T
- vertical layout
- Mod+Y
- horizontal layout
- Mod+F
- float the window, or tile it again
Only the bindings whose action the browser knows reach it.
Configuration
At start, swm-web reads
~/.scrotwmos.conf as lines of
key =
value. A line that starts with
‘#’ is a comment.
swm-web does not read
/etc/scrotwmos.conf.
A key libswm knows sets what
scrotwmos.conf(5) says, and so
do bind[action] and
unbind. These keys are this program's own:
bar_border_color,bar_color,bar_font_color- The bar's colors, as CSS takes them. The defaults are
#008080,black, and#a0a0a0. color_focus,color_unfocus- The border colors of the focused and other windows. The defaults are
redand#888888. modkeyMod1,Mod4, orControl.workspace_indicator- The options of
scrotwmos.conf(5) as their bit
mask, a number from 0 to 4294967295.
swm-webrefuses their names.
swm-web skips a refused line. It does not
write a change made on config.html to the file.
ENVIRONMENT
HOME- The directory of .scrotwmos.conf; when unset, the current directory.
SHELL- The shell each terminal runs, as a login shell. When unset, /bin/sh.
A shell gets TERM set to
xterm-256color and no
LD_PRELOAD.
FILES
- ~/.scrotwmos.conf
- settings
- www/
- the pages, in the directory of the path that started
swm-web, or ./www when that path has no slash
SIGNALS
SIGINT,SIGTERM- Send
SIGHUPto every shell and exit.
EXIT STATUS
swm-web exits 0 on
SIGINT or SIGTERM, and 1 on
a bad option or when it cannot start.
EXAMPLES
$ build/bin/swm-web/swm-web -p 8081 -w 1280 -h 800
Then open http://localhost:8081/ in a browser.
SEE ALSO
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 13, 2026 | Void Linux |