Restore some order to your i3 workspaces
- Create a virtual environment:
python -m venv venv
- Enter the virtual environment:
. venv/bin/active
- Install the requirements:
pip install -r requirements/development.txt
- Follow the instructions in the Development section
- Generate the dist/ folder:
pyinstaller i3-workspace-reset.py
- Zip the dist/i3-workspace-reset/ folder:
zip -r i3-workspace-reset-#-#-#.zip i3-workspace-reset
(Actually, these questions have literally never been asked. But I figured it would be good to note them here.)
- How do I use i3-workspace-reset with dmenu?
- Create a ~/bin/ folder:
mkdir ~/bin
- Copy the i3-workspace-reset/ folder to the ~/bin/ folder:
cp -r i3-workspace-reset ~/bin
- Create an i3-workspace-reset.sh file:
touch ~/bin/i3-workspace-reset.sh
- Add the below code to the ~/bin/i3-workspace-reset.sh file.
- Make the ~/bin/i3-workspace-reset.sh file executable:
chmod +x ~/bin/i3-workspace-reset.sh
- You might need to log out and log back in to use i3-workspace-reset with dmenu.
- Create a ~/bin/ folder:
#!/bin/bash
(DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" && $DIRECTORY/i3-workspace-reset/i3-workspace-reset)
- How should I use i3-workspace-reset?
- You can use i3-workspace-reset however you want. Consider using i3-workspace-reset with dmenu.
- What if I named my workspaces?
- i3-workspace-reset will ruthlessly erase any semblance of your efforts by restoring your workspace names to integers, just like you wanted.
- What if I'm using multiple outputs?
- i3-workspace-reset works great with multiple outputs, so long as they are oriented in a horizontal fashion. For example, if you use i3-workspace-reset and you have two outputs side by side, then i3-workspace-reset will start with the left output, renaming the workspaces as 1 to
len(output[0].workspaces)
, before moving on to the right output, renaming the workspaces aslen(outputs[0].workspaces) + 1
tolen(outputs[0].workspaces) + len(outputs[1].workspaces)
.
- i3-workspace-reset works great with multiple outputs, so long as they are oriented in a horizontal fashion. For example, if you use i3-workspace-reset and you have two outputs side by side, then i3-workspace-reset will start with the left output, renaming the workspaces as 1 to
- When will i3-workspace-reset support vertically-oriented outputs?
- Probably never since my head only rotates on the horizontal axis. I might consider contributions here if it's a popular request.
- npm files? In a Python project?? Oh, the humanity!
- Don't worry, those files are just here to keep this file formatted with Prettier.
- Download the latest release
- Unzip the i3-workspace-reset-#-#-#.zip file
- Use the i3-workspace-reset file