JigsawWM is a dynamic window manager for Windows10/11 just like the suckless dwm for the X. JigsawWM is a free and open-source project that aims to increase your productivity.
2023-01-01_18-56-36.mp4
Tested on Windows 11 Build 22000 and Python 3.11.1. Should work on Windows 10 and Python 3.8
Install from pypi
pip install jigsawwm
Install from github repo
pip install git+https://github.com/klesh/JigsawWM.git
JigsawWm follows the suckless philosophy and works just like dwm - dynamic window manager | suckless.org software that sucks less. All windows are treated as a Ordered List
, they will be moved into places based on their Order
and specified Layout
automatically to improve your productivity.
- Download the example.pyw to your local hard drive
- Edit the code as you see fit
- Double-click the file and it should launch with a tray icon, or you may have to create a file association to the
Python
program - Create a shortcut in your
Startup
folder if you like it
Win + j
: activate next window and move cursor to its centerWin + k
: activate previous window and move cursor to its centerWin + Shift + j
: move active window down in the list / swap with the next oneWin + Shift + k
: move active window up in the list / swap with the previous oneWin + n
: minimized active windowWin + m
: maximize/unmaximized active windowWin + /
: swap active window with first window in the list or second window if it is the first window alreadyWin + q
: kill active windowWin + Space
: next theme,Theme
consists ofLayout
,Background
,gap
, etc. to determine how windows should be placedWin + i
: activate first window of the next monitor if any or move cursor onlyWin + u
: activate first window of the previous monitor if any or move cursor onlyWin + Shift + i
: move active window to next monitorWin + Shift + u
: move active window to previous monitorWin + Control + i
: inspect active window
- Open your Startup folder by pressing
Win + r
to activate the Run dialog and type inshell:startup
, a FileExplorer should pop up. - Create a shortcut to your
.pyw
file. Done!
To run a console program (e.g. syncthing) in the background as a service
from jigsawwm.daemon import Daemon
class MyDaemon(Daemon):
def setup(self):
from jigsawwm.services import ServiceEntry, register_service
register_service(
ServiceEntry(
name="syncthing",
args=[
r"C:\Programs\syncthing-windows-amd64-v1.23.2\syncthing.exe",
"-no-browser",
"-no-restart",
"-no-upgrade",
],
log_path=r"C:\Programs\syncthing-windows-amd64-v1.23.2\syncthing.log",
)
)
MyDaemon(Daemon)
To launch apps/tasks at login conditionally
- What if I would like a folder named
daily
in my Chrome Bookmark Bar to be opened automatically on my first boot-up every day?
from jigsawwm.daemon import Daemon
class MyDaemon(Daemon):
def setup(self):
from jigsawwm.smartstart import (
SmartStartEntry,
daily_once,
open_chrome_fav_folder,
register_smartstart,
)
register_smartstart(
SmartStartEntry(
name="daily routine",
launch=lambda: open_chrome_fav_folder("bookmark_bar", "daily"),
condition=lambda: daily_once("daily websites"),
)
)
MyDaemon(Daemon)
- What if I would like a couple of apps to be launched when I boot up the computer within work hours?
holiday_book = ChinaHolidayBook()
def open_worklog():
"""Open worklog (a markdown file) for today (create if it doesn't exist yet)."""
next_workday = holiday_book.next_workday()
latest_workday = holiday_book.latest_workday()
worklog_path = os.path.join(
os.path.expanduser("~/Documents/Sync/worklog"),
f"{next_workday.isoformat()}.md",
)
if not os.path.exists(worklog_path):
with open(worklog_path, "w") as f:
prevdate = latest_workday.strftime("%m/%d")
nextdate = next_workday.strftime("%m/%d")
f.write(f"{prevdate}\n1. \n\n{nextdate}\n1. ")
os.startfile(worklog_path)
register_smartstart(
SmartStartEntry(
name="workhour routine",
launch=[
r"C:\Users\Klesh\AppData\Local\Feishu\Feishu.exe",
r"C:\Program Files\Mozilla Thunderbird\thunderbird.exe",
open_worklog,
],
# in case I might boot up the computer a little bit earlier
condition=lambda: holiday_book.is_workhour(extend=timedelta(hours=2)),
)
)
Functionalities:
- Stop/start a
service
- Run a
smartstart
without condition
- add
smartstart
feature - BREAKING CHANGE: rename
svcmgr
toservices
- adopt
pyproject.toml
- add
svcmgr
feature
- support portrait mode monitor (rotate layout by 90 degree)
- update readme