diff --git a/README.md b/README.md index bd9e963..40c1826 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,27 @@ # Cortile -Linux auto tiling manager with hot corner support for [Xfce](https://en.wikipedia.org/wiki/Xfce), [Openbox](https://en.wikipedia.org/wiki/Openbox) and other [EWMH](https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints#List_of_window_managers_that_support_Extended_Window_Manager_Hints) compliant window managers using the [X11](https://en.wikipedia.org/wiki/X_Window_System) window system. -Simply keep your current window manager and **install cortile on top** of it. +Linux auto tiling manager with hot corner support for Openbox, Fluxbox, IceWM, Xfwm, KWin, Marco, Muffin, Mutter and other [EWMH](https://en.wikipedia.org/wiki/Extended_Window_Manager_Hints#List_of_window_managers_that_support_Extended_Window_Manager_Hints) compliant window managers using the [X11](https://en.wikipedia.org/wiki/X_Window_System) window system. +Therefore, this project provides dynamic tiling for XFCE, LXDE, LXQt, KDE and GNOME (Mate, Deepin, Cinnamon, Budgie) based desktop environments. + +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 [![features](https://img.shields.io/github/stars/leukipp/cortile)](#features-) -- [x] Tiling mode gui. - [x] Workspace based tiling. -- [x] Keyboard and hot corner events. -- [x] Socket communication commands. -- [x] Floating windows via "Always on Top". -- [x] Persistent windows via "Always on Visible Workspace". +- [x] Auto detection of panels. +- [x] User interface for tiling mode. +- [x] Systray icon indicator and menu. +- [x] Keyboard, hot corner and systray events. - [x] Vertical, horizontal and fullscreen mode. -- [x] Adjustments of layout proportions. +- [x] Socket communication commands. +- [x] Adjustment of layout proportions. +- [x] Floating and persistent windows. - [x] Drag & drop window swap. -- [x] Auto detection of panels. - [x] Multi monitor support. -Support for **keyboard and mouse navigation** sets cortile apart from other tiling solutions. +Support for **keyboard and mouse** events 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. [![demo](https://raw.githubusercontent.com/leukipp/cortile/main/assets/images/demo.gif)](https://github.com/leukipp/cortile/blob/main/assets/images/demo.gif) @@ -60,14 +62,16 @@ 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+Home | Tile current workspace | +| Ctrl+Shift+End | Untile current workspace | +| Ctrl+Shift+T | Toggle between tile and untile | +| Ctrl+Shift+Next | Cycle through next layouts | +| Ctrl+Shift+Prior | Cycle through previous 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+Up | Activate horizontal-top layout | +| Ctrl+Shift+Down | 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 | @@ -78,19 +82,30 @@ If some of them are already in use by your system, update the default values in | 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: +Hot corner events are defined under the `[corners]` section and will be triggered when the pointer enters one of the target areas: | Corners | Description | | ----------------------------------- | ---------------------------------------- | | Top-Left | Focus previous window | -| Top-Center | Activate horizontal-top layout | +| Top-Center | - | | Top-Right | Make the active window master | -| Center-Right | Activate vertical-right layout | +| Center-Right | - | | Bottom-Right | Increase proportion of master-slave area | -| Bottom-Center | Activate horizontal-bottom layout | +| Bottom-Center | - | | Bottom-Left | Decrease proportion of master-slave area | -| Center-Left | Activate vertical-left layout | - -Useful mouse shortcuts in Xfce environments: +| Center-Left | - | + +Systray events are defined under the `[systray]` section and are triggered when the pointer keys are pressed while the mouse hovers the icon: +| Pointer | Description | +| ---------------------------------- | ---------------------------------------- | +| Left-Click | - | +| Middle-Click | Toggle between tile and untile | +| Right-Click | - | +| Scroll-Up | Cycle through previous layouts | +| Scroll-Down | Cycle through next layouts | +| Scroll-Left | Decrease proportion of master-slave area | +| Scroll-Right | Increase proportion of master-slave area | + +Common pointer shortcuts used in some environments: - Move window: Alt+Left-Click. - Resize window: Alt+Right-Click. - Maximize window: Alt+Double-Click. @@ -101,10 +116,9 @@ The sock parameter (`-sock /tmp/cortile.sock`) defines a path for a socket file Internally however, two socket files are used. One is for incoming (`/tmp/cortile.sock.in`) and one for outgoing (`/tmp/cortile.sock.out`) communication. -
Communication - Outgoing
+
Outgoing - Events
### Outgoing events and states - User triggered events (e.g. tile workspace) are broadcasted to the outgoing socket as json string. One can listen to them by using [netcat](https://en.wikipedia.org/wiki/Netcat) or similar [alternatives](https://en.wikipedia.org/wiki/Netcat#Ports_and_reimplementations): ```bash @@ -126,10 +140,9 @@ socat -v UNIX-LISTEN:/tmp/cortile.sock.out,reuseaddr,fork OPEN:/tmp/cortile.json
-
Communication - Incoming
+
Incoming - Commands
### Incoming commands and requests - Similarly, requests about the internal state of cortile can be sent to the incoming socket: ```bash # Netcat @@ -144,7 +157,6 @@ Since the communication is asynchronous, it is necessary to listen to the outgoi Example files for sending commands and receiving states can be found in the [scripts](https://github.com/leukipp/cortile/tree/main/assets/scripts) folder. - ## Development [![development](https://img.shields.io/github/go-mod/go-version/leukipp/cortile)](#development-) You need [go >= 1.18](https://go.dev/dl/) to compile cortile. @@ -191,15 +203,15 @@ go env | grep "GOPATH\|GOVERSION"
Install - cortile
### Option 1: Install cortile via remote source -Install directly from main branch: +Install directly from develop branch: ```bash -go install github.com/leukipp/cortile@main +go install github.com/leukipp/cortile@develop ``` ### Option 2: Install cortile via local source -Clone source code from main branch: +Clone source code from develop branch: ```bash -git clone https://github.com/leukipp/cortile.git -b main +git clone https://github.com/leukipp/cortile.git -b develop cd cortile ``` @@ -227,19 +239,20 @@ Hot corners: - 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. -Companion tools: -- You can install a [minimal-gtk](https://www.xfce-look.org/p/1016504) theme and leave `window_decoration = true`. -- Simply add cortile to your startup applications to run it after login. +Systray: +- Use the `tiling_icon` property to add any external command to the systray menu. + - e.g. use `tiling_icon = [...,['firefox', 'Open Browser'],..]` to add a web browser entry. ## Issues [![issues](https://img.shields.io/github/issues-closed/leukipp/cortile)](#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`. +- It's recommended to disable all build-in window snapping features (snap to other windows, snap to screen borders). +- Window managers not supporting StatusNotifierItem for displaying system tray icons will need to install [snixembed](https://github.com/fyne-io/systray#linuxbsd). +- Some GNOME based desktop environments (Mate, Deepin, Cinnamon, Budgie) may cause issues during resizing. +- If you encounter problems start the process with `cortile -vv`, which provides additional debug outputs. +- A log file is created by default under `/tmp/cortile.log`. ## Credits [![credits](https://img.shields.io/github/contributors/leukipp/cortile)](#credits-) -Based on [zentile](https://github.com/blrsn/zentile) from [Berin Larson](https://github.com/blrsn). +Based on [zentile](https://github.com/blrsn/zentile) ([Berin Larson](https://github.com/blrsn)) and [pytyle3](https://github.com/BurntSushi/pytyle3) ([Andrew Gallant](https://github.com/BurntSushi)). +The main libraries used in this project are [xgbutil](https://github.com/BurntSushi/xgbutil), [toml](https://github.com/BurntSushi/toml), [systray](https://github.com/fyne-io/systray), [dbus](https://github.com/godbus/dbus), [fsnotify](https://github.com/fsnotify/fsnotify) and [logrus](https://github.com/sirupsen/logrus). ## License [![license](https://img.shields.io/github/license/leukipp/cortile)](#license-) [MIT](https://github.com/leukipp/cortile/blob/main/LICENSE) diff --git a/config.toml b/config.toml index ef8a63c..3e7f669 100644 --- a/config.toml +++ b/config.toml @@ -15,7 +15,7 @@ tiling_layout = "vertical-right" # An overlay window is displayed for this time period [ms] when the layout was changed (0 = disabled). tiling_gui = 1500 -# Menu entries in systray which indicates the tiling state as icon ([] = disabled). +# Menu entries in systray which shows the tiling state as icon ([] = disabled). # tiling_icon = [ # ['ACTION', 'TEXT'] = ['action strings from [keys] section', 'text to show in the menu'], # ['', ''] = 'render a separator', @@ -110,13 +110,13 @@ icon_foreground = [255, 255, 255, 255] ################################################################################ # Tile the current workspace. -tile = "Control-Shift-T" +tile = "Control-Shift-Home" # Untile the current workspace. -untile = "Control-Shift-U" +untile = "Control-Shift-End" # Toggle between tile and untile. -toggle = "Control-Shift-KP_5" +toggle = "Control-Shift-T" # Cycles through next layouts. cycle_next = "Control-Shift-Next"