Exposè for i3 WM. Fork of https://gitlab.com/d.reis/i3expo to fix crashes and improve features/usability

Overview

Overwiew

Expo is an simple and straightforward way to get a visual impression of all your current virtual desktops that many compositing window managers use. It's not a very powerful approach, but a very intuitive one and especially fits workflows that use lots of temporary windows or those in which the workspaces are mentally arranged in a grid.

i3expo emulates that function within the limitations of a non-compositing window manager. By listening to the IPC, it takes a screenshot whenever a window event occurrs. Thanks to an extremely fast C library, this produces negligible overhead in normal operation and allows the script to remember what state you left a workspace in.

The script is run as a background process and reacts to signals in order to open its UI in which you get an overview of the known state of your workspaces and can select another with the mouse or keyboard.

This fork

This fork adds:

  • Dynamic workspace grid (changes size depending on how many workspaces you have)
  • Multi-monitor support
  • Vertical monitor support
  • Compact view for better use of screen real estate
  • Drag focused window to a new or different workspace
  • Create a new workspace on any monitor with one click
  • Bugfixes and performance improvements (via cache)
  • Visual/Aesthetic perks
  • Zero configuration service with reasonable default settings

Example output:

Sample

Dependencies

  • Python 3
  • PyGame
  • i3ipc

Usage

Compile the prtscn.c as follows:

gcc -shared -O3 -Wall -fPIC -Wl,-soname,prtscn -o prtscn.so prtscn.c -lX11

Put the prtscn.so in the same directory as the Python script (or adjust the location in the code).

Copy the default config to your .config folder like so:

mkdir -p ~/.config/i3expo
cp defaultconfig ~/.config/i3expo/config

Colors can be specified by using their PyGame names or in #fff or #ffffff hex.

Display output names can be unpleasant to read but you can alias them in hte config file if you wish. Here's an example:

[OUTPUT_ALIASES]

DVI-D-0 = Center
HDMI-A-0 = Right
DisplayPort-0 = Left

Add this to your i3 config exec_always "~/i3expo-ng/i3expod.py -f -w /home/user/Images/wallpapers/14.jpg"

-f is for fullscreen (causes pygame to crash on a black screen on some distros)

-w is for wallpaper. Should match your i3 wallpaper

All parameters are optional.

Send SIGUSR1 to i3expod.py to show the Expo UI, for example by adding bindsym $mod+Tab exec --no-startup-id "killall -s SIGUSR1 i3expod.py" to your i3 config. Send SIGHUP to have the application reload its configuration.

Navigate the UI with the mouse or with they keyboard using hjkl, the arrow keys, Return and Escape.

Known issues

On some distros (or hardware? has to be investigated more) fullscreen mode will crash pygame on a black screen. Simple workaround is to remove -f flag and use the program windowed

Limitations

Since it works by taking screenshots, the application cannot know workspaces it hasn't seen yet. Furthermore, the updates are less continuous than you might be used to if you're coming from a compositing WM where they can happen live and in the background.

When you drag the active window to a new or another workspace, the screenshot of the current workspace won't be updated until the workspace isn't visited back again, and will continue to show the window you moved. There's no clean way to handle this as it would require taking a screenshot of the workspace after you changed it and before jumping to the new/other workspace you dragged your window to.

Empty workspaces don't technically exist to i3 and are thus inaccessible in the default config because it's not possible to handle named inexistant workspaces. If you still want to access them, you will have to set switch_to_empty_workspaces to True and define your names under Workspaces like e. g. workspace_1 = 1:Firefox.

Bugs

Stalled windows whose content i3 doesn't know cause interface bugs and could probably be handled better, but this needs more testing.

Todo

It's theoretically feasible to take the window information from i3's tree and allow for dragging of windows from one workspace to another or even from container to container. However, this would be massively complex (especially on the UI side) and it's not clear if it would be worth the effort. <-- Kind of did it. It was worth it :)

And getting it into a publishable state, obviously.

Credit

Stackoverflow user JHolta for the screenshot library to be found in this thread: https://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux

GitLab/Reddit user d.reis for the idea and initial implementation which got me started :) https://www.reddit.com/r/i3wm/comments/8at5dv/i_wrote_an_expolike_script_for_i3/

https://gitlab.com/d.reis/i3expo

Find live blooket games easy with python.

Blooket-pin-finder Find live blooket games easy with python. info when you start you will see what looks like error DON'T STOP those are just the thre

Crazedpotato 1 Mar 07, 2022
Just a simple Tic Tac Toe game, built with Python

TicTacToe Author: Gabriel Lima Table of Contents About Getting Started Linux Windows About This is one of the first projects I built when I first star

1 Nov 28, 2021
A Game Engine Made in Python with the Pygame Module

MandawEngine A Game Engine Made in Python with the Pygame Module Discord: https://discord.gg/MPPqj9PNt3 Installation To Get The Latest Version of Mand

Mandaw 14 Jun 24, 2022
Useful tools for Minecraft worlds such as remove unused chunks, find blocks or entities.

Useful tools for Minecraft worlds such as removing unused chunks and finding blocks, command blocks or entities.

Rapha149 1 Feb 17, 2022
Gamelib is a pure-Python single-file library/framework for writing simple games.

Gamelib is a pure-Python single-file library/framework for writing simple games. It is intended for educational purposes (e.g. to be used in b

Diego Essaya 15 Dec 22, 2022
learn and have fun developing 2D retro games using python and pygame

Retro 2D Game Development Using Python + PyGame Skill up your programming skills with a walk down the memory lane. Learn how to create a retro 2D game

Marvin Trilles 1 Feb 23, 2022
Vitrix is an open-source FPS video game coded in python

Vitrix is an open-source FPS video game coded in python Table of contents Usage Game Server Installing Requirements Hardware Requirements Software Req

Vitrix 1 Feb 13, 2022
Made to help you create UI using pygame in python, gonna add way more to this project

Pygame visualizer Made to help you create UI using pygame in python, gonna add way more to this project. As of now, this is only hours worth of work.

Ayza 2 Feb 08, 2022
Client-Server design (guess the closest number to the average score game)

Multiplayer game (enter the number closest to the average) Design Client-Server design The client's side is responsible for sending numbers from the g

Adam Piszczek 0 Jun 29, 2022
Simple wordle clone + solver + backtesting

Wordle clone + solver + backtesting I created something. Or rather, I found about this game last week and decided that one challenge a day wasn't goin

1 Feb 08, 2022
Guess Your Card - A Multiplayer Python Game

Guess Your Card - A Multiplayer Python Game This is a guessing card game having two levels - Developed in Python and can be played between two to four

Hammad Ahmed ~ 1 Oct 20, 2021
It calculates the Nim sum of a nim game.

nim-sum It calculates the Nim sum of a nim game. The rules of Nim The traditional game of Nim is played with a number of coins arranged in heaps: the

2 Jan 02, 2022
AI Mario challenges you to clear all stage of Super Mario game.

mario-ai-challenge Challenge AI Mario to clear all stages of Super Mario. GitHub Pages Site Rules Enjoy building AI Mario. Share information. Use Goog

karaage 48 Dec 10, 2022
Pygame for humans (pip install hooman) (25k+ downloads)

hooman ~ pygame for humans pip install hooman join discord: https://discord.gg/Q23ATve The package for clearer, shorter and cleaner PyGame codebases!

Abdur-Rahmaan Janhangeer 31 Nov 08, 2022
Open source translation for the Tsukihime Remake game

Tsukihime-Translation Open source translation for the Tsukihime Remake game prepared by Clovermoon and Tsukihimates. Copyright Disclaimer under Sectio

118 Jan 01, 2023
A minimal open source mtg-like tcg game made in python that can be played on a terminal emulator using a keyboard.

A minimal open source mtg-like tcg game made in python that can be played on a terminal emulator using a keyboard.

Amos 3 Aug 29, 2021
An interactive pygame implementation of quadtree spatial quantization

QuadTree-py An interactive pygame implementation of quadtree spatial quantization Contents Installation Usage API Reference TODO Installation Clone th

Ethan 1 Dec 05, 2021
This is Minesweeper coded in Python. It has almost all features from the main game

Minesweeper This is Minesweeper coded in Python. It has almost all features from the main game Use right click to open tile, right click on an open ti

3 Jul 12, 2022
Ghdl-interactive-sim - Interactive GHDL simulation of a VHDL adder using Python, Cocotb, and pygame

GHDL Interactive Simulation This is an interactive test bench for a simple VHDL adder. It uses GHDL to elaborate/run the simulation. It is coded in Py

Chuck Benedict 2 Aug 11, 2022
Termordle - a terminal based wordle clone in python

Termordle - a terminal based wordle clone in python

2 Feb 08, 2022