Skip to main content

i3wins/i3lasts

As the name might suggest, this is a wrapper to rofi acting as a window-switcher.

I found -show window option to be quite slow, and would often get in the way. On another topic, I use i3 in an XFCE environment (for the PM and such)… and the virtual desktops would conflicts, and be generally weird.

i3wins is fast and won't get in the way.

i3lasts is also a window-switcher, but it keeps track of your focused windows through time. It's insanely effective if you go back and forth a lot. It comes as a server (which need to be running at all time) / client as i3 won't keep track of those.

Pre-requisites

  • i3
  • rofi
  • a working python3 environment can help
  • libi3ipc (libi3ipc-glib on ubuntu/debian)

Installation

I recommand using some virtual environments.

python3 -m venv new_folder
source new_folder/bin/activate
pip install i3wins
deactivate

If you're a more yolo-oriented person : pip install --user i3wins

You can now run : new_folder/bin/i3wins

Help !

No help. All options you give to i3wins are directly sent to rofi.

Check rofi manpage.

Settings

Here's a snippet from my i3 config:

i3wins

bindsym Mod1+Tab exec "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3wins -kb-row-down 'Down,Control+n,Alt+Tab' -kb-accept-entry '!Alt+Tab,!Alt_L,!Alt+Alt_L,Return'"

i3lasts

bindsym Mod1+space exec "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3lastc"
[...]
exec --no-startup-id "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3lasts -kb-row-down 'Down,Control+n,Alt+space,space' -kb-accept-entry '!Alt+space,!Alt_L,!Alt+Alt_L,Return'"

Feel free to use it as-is. Or modify it into oblivion.

Some explanation on the i3 config

Long story made short :

  • Faster mode : Hold Alt, then press Tab as many times as needed, when you're where you want : release Tab then Alt.
  • Not so fast : Hold Alt, then press Tab and release Alt while still holding Tab : the window will stay there, you can search text, scroll, validate with a single press on Alt, or the good'ol Enter key

(the spacebar has the same behavior)

You'll get used to it.

More swag

Keys

Have you noticed desktops are displayed with d1, d2, d3, … And that windows are numbered in the relevant order with 'w' ?

Have you noticed how close d and w are close to the tab key ?

… just saying.

Eyes

  • Current desk is pink
  • Current window is yellow
  • I think you're cool
  • Have a mojito.

Colors are hardcoded and were set by yours truly for ecstatic co-workers' high-fives and maximum swaginess in every situation. But they're still designed for darker themes of rofi.

Todo

  • Handles URGENCY,
  • tags Fullscreen windows as such,
  • deal with vim-marks and more i3-specific concepts (tree depth for examples).
  • show current desktop windows in the right order (they are in reverse currently)
  • Support for rofi 1.5.4 (allows icons in dmenu mode)

Release files for i3wins 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for i3wins 0.0.4
File Size Uploaded
i3wins-0.0.4.tar.gz 4.4 kB Details

Release files / i3wins-0.0.4.tar.gz

Download URL i3wins-0.0.4.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d3fb8d5342257f1d86401202da27d929458c9045af81c7d3afd072455f87c88e
BLAKE2b-256 checksum
How to use checksums
f7e77507c6bf62560d06d4fb7309a3b83b3ebdfc9b249cc7029a1e370d955be1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

2 release files

0.0.2

2 release files

0.0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page