https://github.com/deadc0de6/i3smartfocus
i3wm smart focus
https://github.com/deadc0de6/i3smartfocus
i3 i3wm tiling
Last synced: 6 months ago
JSON representation
i3wm smart focus
- Host: GitHub
- URL: https://github.com/deadc0de6/i3smartfocus
- Owner: deadc0de6
- License: gpl-3.0
- Created: 2020-10-02T09:42:23.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-31T07:45:31.000Z (about 3 years ago)
- Last Synced: 2025-01-23T05:13:56.279Z (over 1 year ago)
- Topics: i3, i3wm, tiling
- Language: Python
- Homepage:
- Size: 34.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/deadc0de6/i3smartfocus/actions)
[](https://badge.fury.io/py/i3smartfocus)
[](https://pypi.python.org/pypi/i3smartfocus)
[](http://www.gnu.org/licenses/gpl-3.0)
# i3smartfocus
`i3smartfocus` can be used in place of the default i3wm focus in order
to restore a more natural way of moving focus.
The default focus behavior will focus on the last focused window inside
a container (which might not be the chosen direction) instead of honoring
the direction chosen. `i3smartfocus` fixes this.
# Installation
```bash
sudo pip3 install i3smartfocus
```
Or simply copy [i3smartfocus.py](https://github.com/deadc0de6/i3smartfocus/blob/main/i3smartfocus/i3smartfocus.py)
somewhere in your path.
# Usage
Edit your i3 config `~/.config/i3/config` and replace the default focus tool
```bash
bindsym Mod1+Left exec --no-startup-id "i3smartfocus left"
bindsym Mod1+Down exec --no-startup-id "i3smartfocus down"
bindsym Mod1+Up exec --no-startup-id "i3smartfocus up"
bindsym Mod1+Right exec --no-startup-id "i3smartfocus right"
#bindsym Mod1+Left focus left
#bindsym Mod1+Down focus down
#bindsym Mod1+Up focus up
#bindsym Mod1+Right focus right
```
# Contribution
If you are having trouble installing or using `i3smartfocus`, open an issue.
If you want to contribute, feel free to do a PR (please follow PEP8).
# License
This project is licensed under the terms of the GPLv3 license.