Skip to content

A micro window manager in Python3

Notifications You must be signed in to change notification settings

hardkorebob/tinywm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 

Repository files navigation

TWMApp is written by Roberto Rodriguez Jr & ChatGPT <hardkorebob@gmail.com> in 2023.
TinyWM was written by Nick Welch <nick@incise.org> in 2005 & 2011.
http://incise.org/tinywm.html

Micro window manager implemented in Python3 in as few lines as possible, 
without being obfuscated or entirely useless. It allows you to move, resize, focus (sloppy), and raise windows. 
To serve as a quick example of some window manager programming basics.

Depends:
  python-xlib
  xterm
  xsetroot
  xinit

Usage:

  Mod4 = Super [Command(Mac)] 
  Focus follows pointer.

  Mod4+Button1, drag: interactive window move
  Mod4+Button3, drag: interactive window resize [Right-Click]
  Mod4+Tab:           raise focused window
  Ctrl-q: exit: [pointer over] Python logo

Suggested Test Environment:
  
  #$HOME/.xinitrc
    xsetroot -solid dimgray
    xterm &
    while true; do sleep 1000000; done
  
  $ startx
  $_python3 /path/to/twmapp.py &


Recommended Play Env:

  $ mv twmapp.py /usr/local/bin
  $ pkill X

  #$HOME/.xinitrc
    xsetroot -solid dimgray
    exec twmapp.py

  $ startx

About

A micro window manager in Python3

Resources

Stars

Watchers

Forks

Contributors

Languages

  • Python 100.0%