Hallo Leute,
ich würde gerne einen Kalender als "pipe menu" in mein Openbox Menü "einbauen". Das Problem ist, dass es einfach nicht funktionieren will, es öffnet sich beim klicken einfach nur ein 3x3 Pixel großes inhaltsleeres Fenster, aber kein Kalender.
Hier mal die "menu.xml"
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="
http://openbox.org/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://openbox.org/ file:///usr/X11R6/share/openbox/menu.xsd">
<menu id="root-menu" label="openbox3">
<item label="Terminal"><action name="Execute"><execute>terminal</execute></action></item>
<item label="Dateimanager"><action name="Execute"><execute>thunar</execute></action></item>
<item label="Netzwerknavigator"><action name="Execute"><execute>firefox</execute></action></item>
<item label="Sofortnachrichten"><action name="Execute"><execute>pidgin</execute></action></item>
<item label="Editor"><action name="Execute"><execute>geany</execute></action></item>
<item label="Kommando ausführen"><action name="Execute"><execute>gmrun</execute></action></item>
<menu execute="/home/philipp/Dokumente/date-menu.sh" id="date-menu" label="Kalender"/>
<separator />
<menu id="client-list-combined-menu" />
... gekürzt
Und hier die "date-menu.sh"
#!/bin/sh
#
# date-menu.sh
#
# This is in the public domain. Honestly, how can you claim anything to something
# this simple?
#
# Outputs a simple openbox pipe menu to display the date, time, and calendar.
# You need 'date' and 'cal'. You should have these. Additionally, the calendar
# only appears properly formated if you use a mono spaced font.
# Outputs the selected row from the calender output.
# If you don't use a mono spaced font, you would have to play with spacing here.
# It would probably involve a very complicated mess. Is there a way to force a
# different font per menu?
function calRow() {
cal | gawk -v row=$1 '{ if (NR==row) { print $0 } }'
}
# Build the menu
cat << EOFMENU
<openbox_pipe_menu>
<separator label="`date +%A\ \ \ \ \ \ \ \ \ \ \ \ %I\:%M\ %p`" />
<item label="`date +%B\ %d,\ %Y`" />
<separator />
<item label="`calRow 2`" />
<item label="`calRow 3`" />
<item label="`calRow 4`" />
<item label="`calRow 5`" />
<item label="`calRow 6`" />
<item label="`calRow 7`" />
<item label="`calRow 8`" />
</openbox_pipe_menu>
EOFMENU
Die "date-menu.sh" ist natürlich ausführbar gemacht.
Kann mir jemand bitte helfen?
Danke schonmal..