[dev] PARENT_XID environment variable.

From: Hadrian Węgrzynowski <hadrian_AT_hawski.com>
Date: Sun, 6 Nov 2011 00:23:18 +0100

Hi.
I hacked tabbed, st and sxiv [1] (and surf, but I couldn't compile
it with recent webkit) for support of PARENT_XID environment variable.
Tabbed set such variable with its XID. St and sxiv embed in window
identified by PARENT_XID if present.
This way I can easily browse images "within" terminal "window".
Example:
Firstly:
        $ tabbed st

Then st in tabbed:
        $ sxiv example.png

Now sxiv is in front. After sxiv is closed we return to st.

Two more things.
outwin script:
        #!/bin/sh
        unset -v PARENT_XID
        exec $_AT_

subsp - substitute parent (based on sbase nohup command)
        usage: subsp command
nohup command and kill -sighup parent_process
Example; st in tabbed:
        $ subsp sxiv example.png

Few things I consider to add to tabbed: hide bar, exit with last client.
I would like to add support for surf, zathura and others I use daily.

Highly experimental, but works. What do you think?

Patches and code:
http://www.hawski.com/suckless/

[1] sxiv - https://github.com/muennich/sxiv
Received on Sun Nov 06 2011 - 00:23:18 CET

This archive was generated by hypermail 2.3.0 : Sun Nov 06 2011 - 00:24:03 CET