Jump to content

How to set up a Dev environment for your window manager


ryoh
 Share

Recommended Posts

 

https://wiki.archlinux.org/title/Xephyr

 

Before Reading this post I recommend watching the above video and wiki page. Here I only provide an example script of setting up a dev environment. 

#!/bin/sh
Xephyr -br -ac -noreset -screen 800x600 :1 &
DISPLAY=:1 awesome --config ./rc.lua &

  ls ./*.lua | entr kill -s SIGHUP $(ps | grep -Po '([0-9]*)(?=( p.*\.awesome))') &

 

Explanation:

first lines runs a Xephyr instance and creates a DISPLAY :1

next line starts the window manager using the config file in the current directory. 

next line uses entr to listen for changes to the file and send a SIGHUP signal to the window manager to reload the rc.lua.

 

also in case you need to kill everything running in the background of you pty

for string in `ps | cut -d ' ' -f 1`; do kill -s term $string; done

 

Result 

image.thumb.png.79b4ea31d5b4e1453d229c751e8c1b64.png

  • I Like This! 1
Link to comment
Share on other sites

Beyond just running an X Window in a nested X Server, I think this is a really cool example of running Window Managers....from a Config File! I assume you have been playing around with Nix more and taking inspiration from that? This is very cool stuff.

Time to go play with Awesome

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...