Topic: Show/hide tint2
I'll admit, my first encounter with tint2 was on #!. Before that I'd just run Openbox without any panels, perhaps with trayer in the dock on autohide or some such. I want to go back to the panel-less look (esp. on my netbook) but I enjoyed using tint2 and still want to keep it around. I threw together this quick & dirty script and bound it to 'Super+b' to give my panel a toggle-by-keystroke functionality. It's nothing special but I thought I'd share it with you folks incase any of you like the idea ![]()
#!/usr/bin/python
import commands
import subprocess
output = commands.getoutput('ps -A')
if 'tint2' in output:
subprocess.call( ["killall", "tint2"] )
else:
subprocess.call( ["tint2"] )then in rc.xml:
<keybind key="W-b">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Toggle tint2</name>
</startupnotify>
<command>toggletint</command>
</action>
</keybind> Now pressing Win+B when the panel is running will terminate it. Pressing the same when the panel is not running will summon it. It's magic!