README ¶
Cortile
Linux auto tiling manager with hot corner support for Xfce, Openbox and other EWMH compliant window managers using the X11 window system.
Simply keep your current window manager and install cortile on top of it.
Once enabled, the tiling manager will handle resizing and positioning of existing and new windows.
Features
- Tiling mode gui.
- Workspace based tiling.
- Keyboard and hot corner events.
- Socket communication commands.
- Floating windows via "Always on Top".
- Persistent windows via "Always on Visible Workspace".
- Vertical, horizontal and fullscreen mode.
- Adjustments of layout proportions.
- Drag & drop window swap.
- Auto detection of panels.
- Multi monitor support.
- Selective tiling areas.
Support for keyboard and mouse navigation sets cortile apart from other tiling solutions. The go implementation ensures a fast and responsive system, where multiple layouts, keyboard shortcuts, drag & drop and hot corner events simplify and speed up your daily work.
Installation
Download the latest binary file from the releases:
# extract cortile from the tar.gz archive
tar -xvf cortile_*_linux_amd64.tar.gz
# execute the binary file
./cortile
Alternative installation methods can be found in the development section.
Usage
The layouts are based on the master-slave concept, where one side of the screen is considered to be the master area and the other side is considered to be the slave area:
vertical-right:
split the screen vertically, master area on the right.vertical-left:
split the screen vertically, master area on the left.horizontal-top:
split the screen horizontally, master area on the top.horizontal-bottom:
split the screen horizontally, master area on the bottom.fullscreen:
single window in fullscreen mode.
The number of windows per side and the occupied space can be changed dynamically. Adjustments to window sizes are considered to be proportion changes of the underlying layout.
Windows placed on the master side are static and the layout will only change as long the space is not fully occupied. Once the master area is full, the slave area is used, where the layout changes dynamically based on available space and configuration settings.
Configuration
The configuration file is located at ~/.config/cortile/config.toml
(or XDG_CONFIG_HOME
) and is created with default values during the first startup.
Additional information about individual entries can be found in the comments section of the config.toml file.
Shortcuts
The default keyboard shortcuts are assigned as shown below.
If some of them are already in use by your system, update the default values in the [keys]
section of the configuration file:
Keys | Description |
---|---|
Ctrl+Shift+T | Tile current workspace |
Ctrl+Shift+U | Untile current workspace |
Ctrl+Shift+L | Cycle through layouts |
Ctrl+Shift+Space | Activate fullscreen layout |
Ctrl+Shift+Left | Activate vertical-left layout |
Ctrl+Shift+Right | Activate vertical-right layout |
Ctrl+Shift+Top | Activate horizontal-top layout |
Ctrl+Shift+Bottom | Activate horizontal-bottom layout |
Ctrl+Shift+M | Make the active window master |
Ctrl+Shift+Plus | Increase number of master windows |
Ctrl+Shift+Minus | Decrease number of master windows |
Ctrl+Shift+KP_Add | Increase number of maximum slave windows |
Ctrl+Shift+KP_Subtract | Decrease number of maximum slave windows |
Ctrl+Shift+KP_6 | Increase proportion of master-slave area |
Ctrl+Shift+KP_4 | Decrease proportion of master-slave area |
Ctrl+Shift+KP_2 | Focus next window |
Ctrl+Shift+KP_8 | Focus previous window |
Hot corner events are defined under the [corners]
section and will be triggered when the mouse enters one of the target areas:
Corners | Description |
---|---|
Top-Left | Focus previous window |
Top-Center | Activate horizontal-top layout |
Top-Right | Make the active window master |
Center-Right | Activate vertical-right layout |
Bottom-Right | Increase proportion of master-slave area |
Bottom-Center | Activate horizontal-bottom layout |
Bottom-Left | Decrease proportion of master-slave area |
Center-Left | Activate vertical-left layout |
Useful mouse shortcuts in Xfce environments:
- Move window: Alt+Left-Click.
- Resize window: Alt+Right-Click.
- Maximize window: Alt+Double-Click.
Communication
External processes may communicate directly with cortile using unix domain sockets.
The sock parameter (defaults to -sock /tmp/cortile.sock
) defines a path for a socket file that can be used to exchange data between processes.
Internally however, two socket files are used.
One is for incoming (/tmp/cortile.sock.in
) and one for outgoing (/tmp/cortile.sock.out
) communication.
User triggered events (e.g. tile workspace) are broadcasted to the outgoing socket as json string. One can listen to them by using netcat or similar alternatives:
# Netcat
nc -Ulk /tmp/cortile.sock.out
# Socat
socat UNIX-LISTEN:/tmp/cortile.sock.out,reuseaddr,fork STDOUT
Similarly, requests about the status of cortile can be sent to the incoming socket:
# Netcat
echo '{"State":"workspaces"}' | nc -U /tmp/cortile.sock.in
# Socat
echo '{"State":"workspaces"}' | socat STDIN UNIX-CONNECT:/tmp/cortile.sock.in
Since the communication is asynchronous, it is necessary to listen to the outgoing socket at the same time in order to receive the response. Example files for sending commands and receiving states can be found in the scripts folder.
Development
You need go >= 1.18 to compile cortile.
Install - go
Option 1: Install go via package manager:
Use a package manager supported on your system:
# apt
sudo apt install golang
# yum
sudo yum install golang
# dnf
sudo dnf install golang
# pacman
sudo pacman -S go
Option 2: Install go via archive download:
Download a binary release suitable for your system:
cd /tmp/ && wget https://dl.google.com/go/go1.18.linux-amd64.tar.gz
sudo tar -xvf go1.18.linux-amd64.tar.gz
sudo mv -fi go /usr/local
Set required environment variables:
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.profile
echo "export GOPATH=~/.go" >> ~/.profile
source ~/.profile
Verify the installed go version:
go env | grep "GOPATH\|GOVERSION"
Install - cortile
Option 1: Install cortile via remote source
Install directly from main branch:
go install github.com/leukipp/cortile@main
Option 2: Install cortile via local source
Clone source code from main branch:
git clone https://github.com/leukipp/cortile.git -b main
cd cortile
If necessary you can make local changes, then execute:
go build && go install
Start cortile in verbose mode:
$GOPATH/bin/cortile -v
Additional
Special settings:
- Use the
edge_margin
property to account for additional spaces.- e.g. for deskbar panels or conky infographics.
- Use the
edge_margin
property to enable tiling only for parts of the monitor.- e.g. use a margin that is half the resolution of a large screen to tile only windows that are moved within a specified area.
- Use the
window_slaves_max
property to limit the number of windows.- e.g. with one active master and
window_slaves_max = 2
, all windows following the third window are stacked behind the two slaves.
- e.g. with one active master and
Hot corners:
- Use
tiling_enabled = false
if you prefer to utilize only the hot corner functionalities. - Use the hot
[corners]
properties to execute any external command available on your system.- e.g. use
bottom_center = "firefox"
to open a web browser window.
- e.g. use
Companion tools:
- You can install a minimal-gtk theme and leave
window_decoration = true
. - Simply add cortile to your startup applications to run it after login.
Issues
It's recommended to disable all build-in window snapping features. In Xfce environments, they can be found under "Window Manager" > "Advanced" > "Windows snapping".
If you encounter problems start the process with cortile -vv
, which provides additional verbose outputs.
A log file is created by default under /tmp/cortile.log
.
Known limitations:
- Only the biggest monitor is used for tiling.
Credits
Based on zentile from Berin Larson.
License
Documentation ¶
There is no documentation for this package.