Skip to content
Seninha edited this page Oct 1, 2021 · 4 revisions

SHOD(1)

NAME

shod, shodc - mouse-focused window manager

SYNOPSIS

shod [-D dockspec] [-f buttons] [-m modifier] [-N notificationspec] [-n ndesks] [-r buttons]

shodc close [win_id] shodc desks shodc focus [-clrtbpnLRTBPN] [win_id] shodc geom [-X|-x N] [-Y|-y N] [-W|-w N] [-H|-h N] [win_id] shodc goto [-m mon_id] desk_id shodc list [-ls] [win_id] shodc sendto [-m mon_id] desk_id [win_id] shodc state [-ATR] [-abfMms] [win_id]

DESCRIPTION

shod is a multi-monitor floating reparenting X11 window manager which supports tiled and tabbed containers. shod sets no keybindings, reads no configuration, and works only via mouse with a given key modifier (Alt by default) and by responding to client messages (it is needed a controller called shodc(1) to control shod).

The options are as follows:

  • -D dockspec

    Specify the position and width of the dock. If dockspec is NE56, The dock will be placed in the north side of the screen, at the east edge, with a width of 56 pixels. If dockspec is W32, The dock will be placed in the west side of the screen, at the center, with a width of 32 pixels. If dockspec is E64 (de default value) The dock will be placed in the east side of the screen, at the center, with a width of 64 pixels.

  • -f buttons

    Which mouse buttons are used to focus a window when clicking on it. The argument of this option is a string of numbers 1 to 5 (corresponding to mouse buttons 1 to 5). For example, setting this resource to 13 makes windows be focused when clicking on them with the mouse buttons 1 and 3 (the left and right mouse buttons, respectively). If this is set to a blank string, no mouse button is used to focus windows, and shod uses the focus-follow-cursor focusing style. By default, focus follows mouse click on button 1.

  • -m modifier

    Which modifier, from Mod1 to Mod5 is used to move and resize windows with the mouse pointer. By default, shod uses Mod1 (Alt) as modifier.

  • -N notificationspec

    This option is used to specify the placement of notification windows. The argument of this option is a string of the form POS:GAP; where POS is a cardinal position such as NW (northwest), SE (southeast) or C (center); and GAP is a positive number. For example, if this option is called with NE:3 (the default value) notifications are placed in the top right (northeast) corner of the screen, and have a gap of 3 pixels between them.

  • -n ndesks

    Specify the number of desktops for shod to manage. By default, shod manages 10 desktops.

  • -r buttons

    Which mouse buttons are used to raise a window when clicking on it. The argument of this option is a string of numbers 1 to 5 (corresponding to mouse buttons 1 to 5). For example, setting this resource to 13 makes windows be raised when clicking on them with the mouse buttons 1 and 3 (the left and right mouse buttons, respectively). By default, raise occurs on mouse click on button 1.

shodc is the remote controller for shod. Its first argument must be an operation to be performed. The following arguments are the options for the operation (each operation accepts a different set of options). The last arguments are the operation's arguments, such as a window ID or a desktop ID.

Known operations for shodc are listed below.

Close Window

The close operation closes a window whose ID is provided as argument. If no argument is provided, close the active window.

List desktops

The desks operation lists the desktops, one per line.

If the line begins with an asterisk, the desktop is the focused one; If the line begins with a hyphen, the desktop has an urgent window in it. The number is the number of windows in the desktop.

Focus Window

The focus operation focus a window whose ID is provided as argument. If a option is provided, focus a window relative to the window provided as argument.

The options are as follows:

  • -c

    Cycle focus. This option only makes sense when using -n, -p, -N, or -P.

  • -l

    Focus window in the closest container to the left of the container of the window provided as argument (or the active window, if no argument is provided).

  • -r

    Focus window in the closest container to the right of the container of the window provided as argument (or the active window, if no argument is provided).

  • -t

    Focus window in the closest container on the top of the container of the window provided as argument (or the active window, if no argument is provided).

  • -b

    Focus window in the closest container on the bottom of the container of the window provided as argument (or the active window, if no argument is provided).

  • -p

    Focus window in the previous container in the focus list in relation to the container of the window provided as argument (or the active window, if no argument is provided).

  • -n

    Focus window in the next container in the focus list in relation to the container of the window provided as argument (or the active window, if no argument is provided).

  • -L

    Focus window in the column to the left of the window provided as argument (or the active window, if no argument is provided).

  • -R

    Focus window in the column to the right of the window provided as argument (or the active window, if no argument is provided).

  • -T

    Focus window in the row above (on the top of) the window provided as argument (or the active window, if no argument is provided).

  • -B

    Focus window in the row below (on the bottom of) the window provided as argument (or the active window, if no argument is provided).

  • -P

    Focus window in the tab previous to the window provided as argument (or the active window, if no argument is provided).

  • -N

    Focus window in the tab next to the window provided as argument (or the active window, if no argument is provided).

Set Geometry

The geom operation sets the geometry (position and size) of the container of the window whose ID is provided as argument. If no argument is provided, sets the geometry of the container of the active window. If no position (set by the options -X or -x and -Y or -y) is provided, move window to position 0,0 (top left corner).

The options are as follows:

  • -r

    Relative. All position and size values are relative to the container's current position and size.

  • -x N

    Set the position on the X axis to N.

  • -y N

    Set the position on the Y axis to N.

  • -w N

    Set the width of the contianer to N.

  • -h N

    Set the height of the contianer to N.

Go To Desktop

The goto operation goes to the desktop ID provided as argument. Different of other window managers, shod counts desktop from 1; So the first desktop is the desktop 1, not the desktop 0.

The options are as follows:

  • -M monitor

    Goes to a desktop on the provided monitor rather than on the currently focused monitor. Monitors are counted from 1, not from 0.

List windows

The list operation lists windows, one entry per line. If a window ID is provided as argument, list only this window.

The option are as follows:

  • -l

    Long list format. More information on this format below.

  • -s

    Sort by stacking order.

If the -l option is given, the following information (delimited by tabs) is displayed for each window: window state, window desktop, window geometry (size and position), ID of the container window is on, ID of the row window is on, ID of the window, name of the window.

The state consists of a sequence of eight characters, each one meaning a state for the container. If a character is - the state is not set or does not apply to the window.

  • The first character is d to indicate that the window is a dialog.
  • The second character is y to indicate that the window's container is sticky.
  • The third character is M to indicate that the window's container is maximized.
  • The fourth character is m to indicate that the window's container is minimized.
  • The fifth character is f to indicate that the window's container is fullscreen.
  • The sixth character is a to indicate that the window's container is above others, or b to indicate that the window's container is below others.
  • The seventh character is u to indicate that the window has the urgency hint set, a to indicate that the window demands attention, or U to indicate that the window is both urgent and demands attention.
  • The eighth and last character is a to indicate that the window is active, f to indicate that the window is focused, or A to indicate that the window is both active and focused.

Send To Desktop

The sendto operation sends to the desktop ID provided as first argument the container of the window whose ID provided as second argument. If no window ID is provided, sends the container of the active window to that desktop. Different of other window managers, shod counts desktop from 1; So the first desktop is the desktop 1, not the desktop 0.

The options are as follows:

  • -M monitor

    Sends to a desktop on the provided monitor rather than on the currently focused monitor. Monitors are counted from 1, not from 0.

Set Container State

The state operation sets the state of the container of the window whose ID is provided as argument. If no argument is provided, sets the state of the container of the active window.

The options are as follows:

  • -a

    Set state above. Raise container above others.

  • -b

    Set state below. Lower container below others.

  • -f

    Set state fullscreen. Make container fullscreen.

  • -M

    Set state maximized. Maximize container

  • -m

    Set state minimized. Minimize container.

  • -s

    Set state sticky. Stick container to the monitor.

  • -A

    Add (set) state. Force state to be set.

  • -T

    Toggle state. Set state if it is unset, or unset it if it is set.

  • -R

    Remove (unset) state. Force state to be unset.

DESKTOP

shod maintains one virtual monitor for each physical monitor found by Xinerama(1). One of the monitors is the focused one, where new windows go to when they are created. Each monitor contains a different set of virtual desktops (or "desktop", for short). One of the desktops of a monitor is the focused desktop for that monitor.

Each monitor has an area called container area, within containers are spawned and can be maximized. The size and position of a monitor's container area can be changed by bars and the dock.

Most client windows are displayed in containers; but some windows are special and are displayed in different ways.

CONTAINERS

Containers are floating windows where the windows of clients are mapped in. A container contains client-windows organized in columns, rows, and tabs; each client-window can also contain dialog windows associated with it. A new client-window is mapped inside a new container that floats in the focused desktop of the focused monitor. This new container is placed in a empty area of the screen or in an area with few windows over it.

Components of a container

The components of a container are listed below.

  • Border

    Around each container lies its border, that is used to resize and move the container. Borders are always visible, except when the container is fullscreen (in which case the border is hidden until the container loses its fullscreen state). A border is composed of eight handles: four edges and four corners. The mouse cursor changes when hovering a handle; there is one cursor for each handle. Dragging a handle with the mouse button 1 (the left mouse button) resizes the container to the direction of that handle. Dragging a handle with the mouse button 3 (the right mouse button) moves the container.

  • Divisors

    When a container has more than one column, a column divisor appears to separate those columns. Dragging a column divisor with the mouse button 1 (the left mouse button) resizes the columns it divides. When a column has more than one row, a row divisor appears to separate those rows. Dragging a row divisor with the mouse button 1 (the left mouse button) resizes the rows it divides. When a column has a maximized row, row divisors are hidden.

  • Columns

    A container can have one or more columns. Columns split a conteiner horizontally, and each container appears next to the other. Columns are divided into rows. A column can have either no maximized row, in which case all rows are visible; or can have a single maximized row, in which case only that row is visible. The process of maximizing a row or unmaximizing it is called restacking. Restacking is controlled with the left title bar button.

  • Rows

    A column can have one or more rows. Rows split a column vertically, and each row appears on top of the other. Rows are divided into tabs. At the top of the row is the title bar. The title bar lists the tabs of the row and contains two buttons: the left button (used to restack the column of the row) and the right button (used to close the active tab of the row). The title bar is always visible, even when the content of the row is hidden by another maximized row.

  • Title-bar

    Title-bar is a region of the container where the tabs of the client-windows are placed and the left and right title-bar buttons appear. There is one title bar for each row.

  • Left title-bar button

    The left title-bar button is used to control its row and container. Clicking on the left title-bar button with the mouse button 1 (the left mouse button) restacks the column by maximizing its row (and minimizing the other rows in the same column) or by returning the rows to their usual size. Dragging the left title-bar button with the mouse button 3 (the right mouse button) moves the row through the column or to other columns.

  • Tabs

    A row can have one or more tabs. Tabs split a column in the Z axis, and each tab appears above the other. A tab contain a client-window and all the dialogs associated to that client-window. A tab contains the current title of the client-window and is placed on the title bar of a row. Dragging a tab with the mouse button 1 (the left mouse button) moves the container. Dragging a tab with the mouse button 3 (the right mouse button) dettach the tab from the container. A dettached tab, while being dragged, can be reattached in other container (or the same container) in the title bar of a row (and be part of that row), on a row divisor (and create a new row), or on a column divisor (and create a new column).

  • Client-window.

    A client-window is the actual window where the actual content of the client (such as a terminal emulator) is drawn. A client-window can have one or more dialogs associated with it; however only one dialog is visible per time.

  • Dialogs

    A client-window can have a dialog. A dialog appears above the client window, and is centered on it.

The following illustration is an example of a container with several client-windows in it. This container contains two columns: one column in the left and another in the right. The column in the left contain three rows, the top row is maximized and visible (and has a dialog above it), while the two rows on the bottom (one of them with two tabs) are hidden. The column in the right contain two rows: the top row with a single tab, and the bottom row with two tabs. The border handles and divisors are represented by double line. The title-bar buttons are represented by two squares around the title-bars.

╔═╤═════════════════════════╤═╦═╤═════════════════════════╤═╗
╟─┴─────────────────────────┴─╫─┴─────────────────────────┴─╢
║                             ║                             ║
║                             ║                             ║
║                             ║                             ║
║                             ║                             ║
║ ╔═════════════════════════╗ ║                             ║
║ ║                         ║ ║                             ║
║ ║                         ║ ║                             ║
║ ║                         ║ ║                             ║
║ ║                         ║ ╠═╤════════════╤════════════╤═╣
║ ║                         ║ ╟─┴────────────┴────────────┴─╢
║ ║                         ║ ║                             ║
║ ╚═════════════════════════╝ ║                             ║
║                             ║                             ║
║                             ║                             ║
║                             ║                             ║
║                             ║                             ║
╟─┬─────────────────────────┬─╢                             ║
╟─┼────────────┬────────────┼─╢                             ║
╚═╧════════════╧════════════╧═╩═════════════════════════════╝

Focus history

When a client-window is focused it gets keyboard input. A focused client-window continues to get keyboard input until it is closed, its container is hidden, or another client-window is explicitly selected to be focused. Only one client-window can be focused at a time. Each container has a client-window, called the selected client-window that is focused when the focus goes to that container.

The container of the focused client-window is called the focused container and is decorated with a visually distinct decoration (blue in the default theme); while other containers have either the common decoration (gray in the default theme), or have the urgent decoration (red in the default theme).

shod maintains a list of focused containers called the focus history. The focused container is the first container in the focus history. When a client-window gains focus, its container is moved to the beginning of the focus history. When a focused client-window loses focus, the focus goes to another client-window in the same container, or (if there's no other client-window in that container) to the selected client-window of the next container in the focus history that is visible and in the same desktop or monitor, or (if there's no other container to focus), no window gets the focus.

A container can be focused with the mouse. The mouse buttons set with the -f command-line option are used to focus a container when clicking on it. If no mouse button is specified, the focus follows the mouse pointer.

Stacking order

Containers are stacked one above the other in the virtual Z axis. The position of the container in this Z axis can be changed by a operation called raising.

The list of containers in this Z axis, from the one in the bottom to the topmost, is called the stacking order. The stacking order is organized in four layers. When a container in is raised, it moves to the top of the other containers in the same layer.

  • The bottom layer

    At the bottom of the stacking order, lays the containers with the bottom state set. They appear below any other container.

  • The normal layer

    Above the containers in the bottom layer, lays the containers that have not set any of the states that change the stacking order (that is, the below, above or fullscreen states).

  • The above layer

    Above the containers in the normal layer, lays the container with the above state set.

  • The fullscreen layer

    Above the containers in the above layer, lays the container with the fullscreen state set. They appear above any other container.

A container can have either the above state or the below state set, but not both. When a container has the fullscreen state set and either the above or the below state also set, the fullscreen state has priority (so the container belongs to the fullscreen layer).

A container can be raised with the mouse. The mouse buttons set with the -r command-line option are used to raise a container to the top of its layer when clicking on it.

Moving and Resizing

A container can be moved by various methods, which are listed below. When a container is moved from one monitor to another, that container moves from the desktop it is in to the focused desktop of the monitor it is moved to. Container moving can only be performed if the container is not fullscreen and not maximized.

  • By pressing the modifier key (set with the -m command-line option) and dragging any part of a container with the mouse button 1 (the left mouse button).
  • By dragging the container border with the mouse button 3 (the right mouse button), without pressing any modifier.
  • By dragging a tab with the mouse button 1 (the left mouse button), without pressing any modifier.

A container can be resized by various methods, which are listed below. Container resizing can only be performed if the container is not fullscreen and not maximized.

  • By pressing the modifier key (set with the -m command-line option) and dragging any part of a container with the mouse button 3 (the right mouse button).
  • By dragging the container border with the mouse button 1 (the left mouse button), without pressing any modifier.

Container states

Each container can or not have each one of the following states. By default, a container has no state.

  • Maximized

    Maximized containers occupies the entire space on the monitor available for windows (a region called container area). When a maximized container is unmaximized, it restores its previous size and position.

  • Fullscreen

    Fullscreen containers occupies the entire monitor space. When a fullscreen container is made not full, it restores its previous size and position.

  • Minimized

    Minimized containers are not shown on the screen. When a minimized container is unminimized, it goes to the focused monitor.

  • Sticky

    Sticky containers are “sticked” to the monitor, and they appear on the screen no matter which desktop is focused on that monitor.

  • Above or below.

    A container can be raised above or lowered below other containers.

PROMPT

A window of type _NET_WM_WINDOW_TYPE_PROMPT (called prompt window) is mapped on the top of the focused monitor. This window will stay focused and mapped until be closed or a mouse button is pressed outside that window. This is an EWMH extension, only used by xprompt(1).

shod does not change the size of the prompt window. However, shod changes its position.

DESKTOP WINDOWS

Windows of type _NET_WM_WINDOW_TYPE_DESKTOP (called desktop windows) are mapped bellow all other windows and are stacked on the order they are spawned. Desktop windows cannot be manipulated. Desktop windows have no decoration around them.

Desktop windows indicates a desktop feature. That includes windows such as conky(1) and windows that manage desktop icons.

shod does not change the size nor the position of desktop windows.

NOTIFICATIONS

Windows of type _NET_WM_WINDOW_TYPE_NOTIFICATION (called notifications) are popped up on the top right corner, one above another. Notification windows cannot be manipulated. Notification windows have a decoration around them; this decoration is the same as the borders of the active container (or, for urgent notifications, the same as the borders of an urgent container).

An example of a notification window would be a bubble appearing with informative text such as "Your laptop is running out of power" etc.

The screen corner where notification windows pop up can be changed with the -N command-line option.

shod can change the size and the position of notification windows.

BARS

Windows of type _NET_WM_WINDOW_TYPE_DOCK (called, panels, bars, or external docks (to distinguish them from shod's internal dock)) are mapped on a side of a monitor. Dock windows cannot be manipulated, have no decoration and do not receive input focus.

A bar window can change the size of a region of the monitor called container area. The container area is the region of the monitor that a maximized container occupies. The container area is also the region of the monitor inside which containers are spawned.

Example of bar are a taskbar (that shows which programs are currently running), and a statusbar (that shows information about the system, such as memory usage and system time).

shod does not change the size nor the position of bar windows.

DOCKAPPS

Windows that initiates in the WithdrawnState (called dockapps) are mapped inside the dock. The dock is a panel or bar that appears on the edge of the first monitor. Inside the dock, dockapps are organized by order of map request.

Dockapps, or docked applications are windows which appear to reside inside an icon or a dock rather than a container.

The placement of the dock can be changed with the -D command-line option.

ENVIRONMENT

The following environment variables affect the execution of shod

  • DISPLAY

    The display to start shod on.

SEE ALSO

X(1), xprompt(1), xnotify(1)

BUGS

XSizeHints(3) are ignored. Size hints make no sense in a tiled and tabbed window manager. They only make sense when the size of a single container depends only on a single window, and a single window dictates the size of a single container. When the size of a container depends on the size of other windows (as in the tiled situation), or when a set of windows must have the same size (as in a tabbed situation), it makes no sense to constrain the size of a container based on the size hints of a single window, because the relation from windows to containers is no more one-to-one.

Shaped client-windows do not have shaped containers. They are mapped inside a rectangular container.

Dockapps are ignored, they may be supported in a future version of shod.

Clone this wiki locally