Skip to content
My scripts for enhancing i3wm
Branch: master
Clone or download
justbuchanan Merge pull request #17 from justbuchanan/norenumber_workspaces
add cmdline option to disable workspace re-numbering
Latest commit 7ad7ff9 Feb 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
autoname_workspaces.py add cmdline option to disable workspace re-numbering Jan 10, 2019
i3splat.py Add github url to all files Aug 8, 2018
new_workspace.py
readme.md Update readme.md Sep 19, 2018
rename_workspace.py use namedtuple for "name parts" object Aug 14, 2018
util.py Changed xprop regex Oct 12, 2018

readme.md

i3 Scripts

This repo contains a few scripts I've put together for i3. Below are the highlights, but see the script files themselves for more detailed info and instructions. Note that they function independently, so you can try out one in your workflow without committing to using the rest.

autorename_workspaces.py

This script dynamically updates the i3 bar to show icons for running programs next to the workspace names. It does this by listening for i3 window events and updating the workspace's "name".

In addition to showing program icons, it also renumbers i3 workspaces in ascending order. This makes it easier to navigate.

Here's a demo.

new_workspace.py

Opens a new workspace on the current monitor, using the first available number.

rename_workspace.py

Presents a small modal window with a text box that allows for renaming the current workspace.

i3splat.py

This module provides a compact way to specify layouts for i3wm and launch the corresponding programs. Create a Workspace object containing the containers and apps you want, then call launch(). The specified layout will be loaded into i3, then the individual apps are launched in their places. See the file itself for more detailed documentation.

Here's an example program:

from i3splat import *

mydir = "~/src"
ws = Workspace("code", [
    (0.5, chrome(["stackoverflow.com"])),
    (0.5, Container(SPLITV, [
        (0.7, Container(TABBED, [
            (0.5, urxvt(wdir=mydir, command="vim file.txt")),
            (0.5, sublime([mydir])),
        ])),
        (0.3, urxvt(wdir=mydir)),
    ])
)])
ws.launch()
You can’t perform that action at this time.