LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2020, 10:17 AM   #1
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Rep: Reputation: Disabled
Minimal window managers written with xlib


Still learning to write my own WM. What are some small WMs (500 lines max) whose source code I can study? I am looking for WMs that are easy to understand but still demonstrate all the key concepts (Substructure redirect, key grabbings, and maybe databases?). Ones like DWM are WAY too complicated for me to pick up... but ones like TinyWM, which has only 50 lines of source code, do not teach anything either... I know the very basics of Xlib (event handling, drawing, and just learning the resource manager) and am looking to advance my knowledge. Please help...
 
Old 02-17-2020, 01:17 PM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,493

Rep: Reputation: Disabled
Maybe check out the code for TWM or CWM, both are minimal WMs.

(Don't know if they use Xlib or not.)

Last edited by fatmac; 02-17-2020 at 01:18 PM.
 
Old 02-17-2020, 02:22 PM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
50/500 lines sounds implausible... My guess would be 15000 for a minimalist WM like twm.
 
Old 02-17-2020, 04:31 PM   #4
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
50/500 lines sounds implausible... My guess would be 15000 for a minimalist WM like twm.
DWM only has 2000 lines of source code, and it used to have a lot less back in the days. I am not looking for ones that people actually use... just ones that provide good educational resources.
 
1 members found this post helpful.
Old 02-17-2020, 07:32 PM   #5
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Maybe this will be of help. Huge history resource. http://www.xwinman.org/others.php
 
Old 02-18-2020, 08:23 PM   #6
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,781

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
https://github.com/mil/simple-wm says

Quote:
A very simple window manager work in progress. Mainly for teaching myself how to use Xlib and XCB. Should not currently be considered usable.
The README has an "inspiration" section listing a few other minimal window managers.
 
Old 02-18-2020, 09:30 PM   #7
JWJones
Senior Member
 
Registered: Jun 2009
Posts: 1,444

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
TinyWM, around 50 lines of C:
http://incise.org/tinywm.html

A good resource:
https://www.gilesorr.com/wm/

EvilWM is another good one:
http://www.6809.org.uk/evilwm/

Last edited by JWJones; 02-18-2020 at 09:31 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can window managers be written using Xt and Motif widgets? Otacon 141.12 Programming 9 11-14-2017 11:41 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol ... ousoso@webmail.co.za Linux - Newbie 1 05-06-2008 07:46 AM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified rajnivanza Linux - Software 1 03-13-2008 01:16 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 08:22 AM
Window Managers vs. Desktop Managers mikeshn Linux - General 4 02-11-2004 11:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration