Created
July 21, 2014 14:20
-
-
Save p120ph37/51b4491097b2dd5707e7 to your computer and use it in GitHub Desktop.
Date/time popup action for openbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<openbox_menu> | |
<menu id="date-popup" label="Date & Time" | |
execute="date +'<openbox_pipe_menu><item label=": %a %B %d, %Y %H:%M:%S"/></openbox_pipe_menu>'" | |
/> | |
</openbox_menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<keyboard> | |
<keybind key="W-D"> | |
<action name="ShowMenu"> | |
<menu>date-popup</menu> | |
</action> | |
</keybind> | |
</keyboard> | |
</openbox_config> |
The colon in the popup menu is for justification purposes: leading spaces are stripped and I wanted to push the date popup far enough to the right so that the mouse cursor doesn't obscure the text.
for the sake of completeness :
also add to rc.xml:
<file>date-popup.xml</file>
and to reload settings without relogin:
openbox --reconfigure
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place the
date-popup.xml
file into your~/.config/openbox
folder, and add thekeybind
tag to the appropriate place in your~/.config/openbox/rc.xml
file. This particular keybind is for the Windows-D key combination. You can read more about openbox keybindings, the ShowMenu action, and pipe menus.