Key Features • Intro • Install • How To Use • Configuration • Credits • Contribute • License
- Tile using a layout and a grid
- Use a global mousebind to tile windows
- Tile by snapping windows to areas
- Flexible CLI + GUI app
- Compatible with most GNU/Linux desktop environments
- No dependencies, just a binary
Prostokat uses profiles to manage different tilling configurations.
A profile is a configuration for your tilling: it has a grid and a layout.
A grid represents the way the screen is divided in equally sized cells
- A 3x1 grid would divide a screen into 3, using 3 columns and 1 row.
- A 4x2 grid would divide a screen into 8, using 4 columns and 2 rows.
- A
n
xm
grid would divide a screen inton*m
, usingn
columns andm
rows
# 3x1 grid
|-+-+-|
| | | |
|-+-+-|
# 4x2 grid
|-+-+-+-|
| | | | |
|-+-+-+-|
| | | | |
|-+-+-+-|
A layout is an array of areas in your grid which will be used to tile your windows to. You can have as many areas in your layout as grid cells, so for a 2x2 grid you could have up to 4 areas.
- A layout in a 2x2 grid could have 4 areas, one per grid cell
- A layout in a 3x1 grid could have 3 areas, dividing the screen in thirds
- A layout in a 4x1 grid could have 3 areas too: 1 big one at the middle, and 2 smaller ones at the sides
# 2x2 grid with 4 areas
|-+-| |-+-|
| | | |1|2|
|-+-| -> |-+-|
| | | |3|4|
|-+-| |-+-|
# 3x1 grid with 3 areas
|-+-+-| |-+-+-|
| | | | -> |1|2|3|
|-+-+-| |-+-+-|
# 4x1 grid with 3 areas
|-+-+-+-| |-+-+-+-|
| | | | | -> |1| 2 |3|
|-+-+-+-| |-+-+-+-|
An area is a tilling region that has coordinates and dimensions.
posx
: x position in gridposy
: y position in gridheight
: number of rows to spanwidth
: number of columns to span
# profiles/default.yaml
grid:
cols: 3
rows: 1
# splits monitor in thirds (grid: 3x1)
# |-+-+-| |-+-+-|
# | | | | -> |1|2|3|
# |-+-+-| |-+-+-|
layouts:
# area 1: pos(0, 0) dim(1x1)
- posx: 0
posy: 0
width: 1
height: 1
# area 2: pos(1, 0) dim(1x1)
- posx: 1
posy: 0
width: 1
height: 1
# area 3: pos(2, 0) dim(1x1)
- posx: 2
posy: 0
width: 1
height: 1
You can download the latest installable version of Prostokat for GNU/Linux distros.
To clone and run this application, you'll need Git and Golang installed on your computer. From your command line:
# Clone this repository
$ git clone https://github.com/pedrobarco/prostokat.git
# Go into the repository
$ cd prostokat
# Build the app
$ make clean && make build
# Install it
$ sudo make install
# Run the CLI
$ pk -h
Start prostokat via its CLI by running pk start
.
You should now be able to use Shift + Mouse 3
to tile an active window to the closest tilling area.
Note: Prostokat uses the current mouse position to detect to which area should the window be tilled to.
Usage:
pk [command]
Available Commands:
completion generate the autocompletion script for the specified shell
help Help about any command
init Initialize or reinitialize pk
profiles Manage prostokat profiles
start Start prostokat window manager
Flags:
-h, --help help for pk
Use "pk [command] --help" for more information about a command.
The default configuration splits the monitor in thirds. However, you can have as many profiles as you would like.
Using pk profiles
you can easily manage your profiles.
Suppose we want to have 2 new profiles: a dev
and games
.
For the dev
profile:
- tile to corners
- divides our monitor in 4
For the games
profile:
- a large area at the center
- two equally sized areas at the sides
# profile/dev
|-+-| |-+-|
| | | |1|2|
|-+-| -> |-+-|
| | | |3|4|
|-+-| |-+-|
# profile/games
|-+-+-+-| |-+-+-+-|
| | | | | -> |1| 2 |3|
|-+-+-+-| |-+-+-+-|
Let's start by creating our profiles.
Note: pk uses the default profile template to create new profiles.
$ pk profiles create dev
+ $HOME/.config/prostokat/profiles/dev.yaml
Profile dev was successfully created
$ pk profiles create games
+ $HOME/.config/prostokat/profiles/games.yaml
Profile games was successfully created
Now we can edit the profiles.
- For the
dev
profile we want a 2x2 grid with a 4 area layout. - For the
games
profile we want a 4x1 grid with a 3 area layout.
Open and edit your profiles with pk profiles edit [profile]
$ pk profiles edit dev
# profiles/dev.yaml
grid:
cols: 2
rows: 2
layouts:
- posx: 0
posy: 0
width: 1
height: 1
- posx: 1
posy: 0
width: 1
height: 1
- posx: 0
posy: 1
width: 1
height: 1
- posx: 1
posy: 1
width: 1
height: 1
$ pk profiles edit games
# profiles/games.yaml
grid:
cols: 4
rows: 1
layouts:
- posx: 0
posy: 0
width: 1
height: 1
- posx: 1
posy: 0
width: 2
height: 1
- posx: 3
posy: 0
width: 1
height: 1
Now we can run $ pk profiles activate dev
to set our default profile to dev.
Running $ pk start
will now use the dev profile by default.
When playing games, we can run prostokat with a custom profile: $ pk start -p games
.
Have fun!
This software uses the following open source packages:
- Fork it
- Create your feature branch (
git checkout -b feature/myFeature
) - Commit your changes (
git commit -am 'feat: add something'
) - Push to the branch (
git push origin feature/myFeature
) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details
pedrobarco.github.io · GitHub @pedrobarco