openbox-3.6.1/ 0000755 0001753 0000144 00000000000 12544731565 010207 5 0000000 0000000 openbox-3.6.1/data/ 0000755 0001753 0000144 00000000000 12544731565 011120 5 0000000 0000000 openbox-3.6.1/data/autostart/ 0000755 0001753 0000144 00000000000 12544731565 013146 5 0000000 0000000 openbox-3.6.1/data/autostart/openbox-xdg-autostart 0000755 0001753 0000144 00000014702 12133512457 017265 0000000 0000000 #!/usr/bin/env python
# openbox-xdg-autostart runs things based on the XDG autostart specification
# Copyright (C) 2008 Dana Jansens
#
# XDG autostart specification can be found here:
# http://standards.freedesktop.org/autostart-spec/
#
#
#
# LICENSE:
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
ME="openbox-xdg-autostart"
VERSION="1.1"
import os, glob, sys
try:
from xdg import BaseDirectory
from xdg.DesktopEntry import DesktopEntry
from xdg.Exceptions import ParsingError
except ImportError:
print
print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed"
print
sys.exit(1)
def main(argv=sys.argv):
if "--help" in argv[1:]:
show_help()
return 0
if "--version" in argv[1:]:
show_version()
return 0
# get the autostart directories
autodirs = BaseDirectory.load_config_paths("autostart")
# find all the autostart files
files = []
for dir in autodirs:
for path in glob.glob(os.path.join(dir, '*.desktop')):
try:
autofile = AutostartFile(path)
except ParsingError:
print "Invalid .desktop file: " + path
else:
if not autofile in files:
files.append(autofile)
list = False
if "--list" in argv[1:]:
list = True
argv.remove("--list")
# run them !
environments = argv[1:]
for autofile in files:
if list: autofile.display(environments)
else: autofile.run(environments)
class AutostartFile:
def __init__(self, path):
self.path = path
self.filename = os.path.basename(path)
self.dirname = os.path.dirname(path)
self.de = DesktopEntry(path)
def __eq__(self, other):
return self.filename == other.filename
def __str__(self):
return self.path + " : " + self.de.getName()
def _isexecfile(self, path):
return os.access(path, os.X_OK)
def _findFile(self, path, search, match_func):
# check empty path
if not path: return None
# check absolute path
if path[0] == '/':
if match_func(path): return path
else: return None
else:
# check relative path
for dirname in search.split(os.pathsep):
if dirname != "":
candidate = os.path.join(dirname, path)
if (match_func(candidate)): return candidate
def _alert(self, str, info=False):
if info:
print "\t ", str
else:
print "\t*", str
def _showInEnvironment(self, envs, verbose=False):
default = not self.de.getOnlyShowIn()
noshow = False
force = False
for i in self.de.getOnlyShowIn():
if i in envs: force = True
for i in self.de.getNotShowIn():
if i in envs: noshow = True
if verbose:
if not default and not force:
s = ""
for i in self.de.getOnlyShowIn():
if s: s += ", "
s += i
self._alert("Excluded by: OnlyShowIn (" + s + ")")
if default and noshow and not force:
s = ""
for i in self.de.getNotShowIn():
if s: s += ", "
s += i
self._alert("Excluded by: NotShowIn (" + s + ")")
return (default and not noshow) or force
def _shouldRun(self, envs, verbose=False):
if not self.de.getExec():
if verbose: self._alert("Excluded by: Missing Exec field")
return False
if self.de.getHidden():
if verbose: self._alert("Excluded by: Hidden")
return False
if self.de.getTryExec():
if not self._findFile(self.de.getTryExec(), os.getenv("PATH"),
self._isexecfile):
if verbose: self._alert("Excluded by: TryExec (" +
self.de.getTryExec() + ")")
return False
if not self._showInEnvironment(envs, verbose):
return False
return True
def display(self, envs):
if self._shouldRun(envs):
print "[*] " + self.de.getName()
else:
print "[ ] " + self.de.getName()
self._alert("File: " + self.path, info=True)
if self.de.getExec():
self._alert("Executes: " + self.de.getExec(), info=True)
self._shouldRun(envs, True)
print
def run(self, envs):
here = os.getcwd()
if self.de.getPath():
os.chdir(self.de.getPath())
if self._shouldRun(envs):
args = ["/bin/sh", "-c", "exec " + self.de.getExec()]
os.spawnv(os.P_NOWAIT, args[0], args);
os.chdir(here)
def show_help():
print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..."
print
print "This tool will run xdg autostart .desktop files"
print
print "OPTIONS"
print " --list Show a list of the files which would be run"
print " Files which would be run are marked with an asterix"
print " symbol [*]. For files which would not be run,"
print " information is given for why they are excluded"
print " --help Show this help and exit"
print " --version Show version and copyright information"
print
print "ENVIRONMENT specifies a list of environments for which to run autostart"
print "applications. If none are specified, only applications which do not "
print "limit themselves to certain environments will be run."
print
print "ENVIRONMENT can be one or more of:"
print " GNOME Gnome Desktop"
print " KDE KDE Desktop"
print " ROX ROX Desktop"
print " XFCE XFCE Desktop"
print " Old Legacy systems"
print
def show_version():
print ME, VERSION
print "Copyright (c) 2008 Dana Jansens"
print
if __name__ == "__main__":
sys.exit(main())
openbox-3.6.1/data/autostart/autostart.in 0000644 0001753 0000144 00000000715 12426360220 015430 0000000 0000000 #
# These things are run when an Openbox X Session is started.
# You may place a similar script in $HOME/.config/openbox/autostart
# to run user-specific things.
#
# If you want to use GNOME config tools...
#
#if test -x @libexecdir@/gnome-settings-daemon >/dev/null; then
# @libexecdir@/gnome-settings-daemon &
#elif which gnome-settings-daemon >/dev/null; then
# gnome-settings-daemon &
#fi
# If you want to use XFCE config tools...
#
#xfce-mcs-manager &
openbox-3.6.1/data/autostart/openbox-autostart.in 0000755 0001753 0000144 00000001631 12426360170 017105 0000000 0000000 #!/bin/sh
# Set a background color
BG=""
if which hsetroot >/dev/null 2>/dev/null; then
BG=hsetroot
elif which esetroot >/dev/null 2>/dev/null; then
BG=esetroot
elif which xsetroot >/dev/null 2>/dev/null; then
BG=xsetroot
fi
test -z $BG || $BG -solid "#303030"
GLOBALAUTOSTART="@rcdir@/autostart"
AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart"
# Run the global openbox autostart script
if test -f $GLOBALAUTOSTART; then
sh $GLOBALAUTOSTART
elif test -f $GLOBALAUTOSTART.sh; then
sh $GLOBALAUTOSTART.sh
fi
# Run the user openbox autostart script
if test -f $AUTOSTART; then
sh $AUTOSTART
elif test -f $AUTOSTART.sh; then
sh $AUTOSTART.sh
fi
# Run the XDG autostart stuff. These are found in /etc/xdg/autostart and
# in $HOME/.config/autostart. This requires PyXDG to be installed.
# See openbox-xdg-autostart --help for more details.
@libexecdir@/openbox-xdg-autostart "$@"
openbox-3.6.1/data/gnome-session/ 0000755 0001753 0000144 00000000000 12544731565 013706 5 0000000 0000000 openbox-3.6.1/data/gnome-session/openbox-gnome.session 0000644 0001753 0000144 00000000234 12455022442 017773 0000000 0000000 [GNOME Session]
Name=GNOME/Openbox
RequiredComponents=openbox;gnome-settings-daemon;gnome-panel;nautilus-classic;gnome-flashback-services
DesktopName=GNOME
openbox-3.6.1/data/gnome-session/openbox-gnome-fallback.session 0000644 0001753 0000144 00000000173 12455022442 021532 0000000 0000000 [GNOME Session]
Name=GNOME/Openbox fallback (Safe Mode)
RequiredComponents=openbox;gnome-settings-daemon
DesktopName=GNOME
openbox-3.6.1/data/gnome-wm-properties/ 0000755 0001753 0000144 00000000000 12544731565 015040 5 0000000 0000000 openbox-3.6.1/data/gnome-wm-properties/openbox.desktop 0000644 0001753 0000144 00000000310 11345434251 020005 0000000 0000000 [Desktop Entry]
Type=Application
Name=Openbox
Exec=openbox
# name we put on the WM spec check window
X-GNOME-WMName=Openbox
# our config tool
ConfigExec=obconf
[Window Manager]
SessionManaged=true
openbox-3.6.1/data/xbm/ 0000755 0001753 0000144 00000000000 12544731565 011706 5 0000000 0000000 openbox-3.6.1/data/xbm/bullet.xbm 0000644 0001753 0000144 00000000205 11003645205 013602 0000000 0000000 #define bullet_width 4
#define bullet_height 7
static unsigned char bullet_bits[] = {
0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
openbox-3.6.1/data/xbm/close.xbm 0000644 0001753 0000144 00000000174 11003645205 013425 0000000 0000000 #define close_width 6
#define close_height 6
static unsigned char close_bits[] = {
0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 };
openbox-3.6.1/data/xbm/desk_toggled.xbm 0000644 0001753 0000144 00000000216 11003645205 014750 0000000 0000000 #define desk_toggle_width 6
#define desk_toggle_height 6
static unsigned char desk_toggle_bits[] = {
0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 };
openbox-3.6.1/data/xbm/desk.xbm 0000644 0001753 0000144 00000000171 11003645205 013243 0000000 0000000 #define desk_width 6
#define desk_height 6
static unsigned char desk_bits[] = {
0x33, 0x33, 0x00, 0x00, 0x33, 0x33 };
openbox-3.6.1/data/xbm/iconify.xbm 0000644 0001753 0000144 00000000202 11003645205 013750 0000000 0000000 #define iconify_width 6
#define iconify_height 6
static unsigned char iconify_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f };
openbox-3.6.1/data/xbm/max_toggled.xbm 0000644 0001753 0000144 00000000166 11003645205 014613 0000000 0000000 #define max_width 6
#define max_height 6
static unsigned char max_bits[] = {
0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f };
openbox-3.6.1/data/xbm/max.xbm 0000644 0001753 0000144 00000000166 11003645205 013106 0000000 0000000 #define max_width 6
#define max_height 6
static unsigned char max_bits[] = {
0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f };
openbox-3.6.1/data/xbm/shade_toggled.xbm 0000644 0001753 0000144 00000000202 11003645205 015101 0000000 0000000 #define iconify_width 6
#define iconify_height 6
static unsigned char iconify_bits[] = {
0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
openbox-3.6.1/data/xbm/shade.xbm 0000644 0001753 0000144 00000000202 11003645205 013374 0000000 0000000 #define iconify_width 6
#define iconify_height 6
static unsigned char iconify_bits[] = {
0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00 };
openbox-3.6.1/data/xsession/ 0000755 0001753 0000144 00000000000 12544731565 012773 5 0000000 0000000 openbox-3.6.1/data/xsession/openbox.desktop.in 0000644 0001753 0000144 00000000306 12133512457 016353 0000000 0000000 [Desktop Entry]
Name=Openbox
Comment=Log in using the Openbox window manager (without a session manager)
Exec=@bindir@/openbox-session
TryExec=@bindir@/openbox-session
Icon=openbox
Type=Application
openbox-3.6.1/data/xsession/openbox-gnome.desktop.in 0000644 0001753 0000144 00000000312 12133512457 017453 0000000 0000000 [Desktop Entry]
Name=GNOME/Openbox
Comment=Use the Openbox window manager inside of the GNOME desktop environment
Exec=@bindir@/openbox-gnome-session
TryExec=gnome-session
Icon=openbox
Type=Application
openbox-3.6.1/data/xsession/openbox-kde.desktop.in 0000644 0001753 0000144 00000000275 12133512457 017121 0000000 0000000 [Desktop Entry]
Name=KDE/Openbox
Comment=Use the Openbox window manager inside of the K Desktop Environment
Exec=@bindir@/openbox-kde-session
TryExec=startkde
Icon=openbox
Type=Application
openbox-3.6.1/data/xsession/openbox-session.in 0000644 0001753 0000144 00000001110 11337574134 016363 0000000 0000000 #!/bin/sh
if test -n "$1"; then
echo "Syntax: openbox-session"
echo
echo "See the openbox-session(1) manpage for help."
exit
fi
# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_DESKTOP_NAMES \
-remove _NET_CURRENT_DESKTOP 2> /dev/null
# Set up the environment
A="@configdir@/openbox/environment"
test -r $A && . $A
A="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/environment"
test -r $A && . $A
# Run Openbox, and have it run the autostart stuff
exec @bindir@/openbox --startup "@libexecdir@/openbox-autostart OPENBOX" "$@"
openbox-3.6.1/data/xsession/openbox-gnome-session.in 0000644 0001753 0000144 00000003747 11646601236 017505 0000000 0000000 #!/bin/sh
if test -n "$1"; then
echo "Syntax: openbox-gnome-session"
echo
echo "See the openbox-gnome-session(1) manpage for help."
exit
fi
# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_DESKTOP_NAMES \
-remove _NET_CURRENT_DESKTOP 2> /dev/null
VER=$(gnome-session --version 2>/dev/null | \
sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/')
MAJOR=$(echo $VER | cut -d . -f 1)
MINOR=$(echo $VER | cut -d . -f 2)
# run GNOME with Openbox as its window manager
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
# older gnome-session was easy to work with
export WINDOW_MANAGER="@bindir@/openbox"
exec gnome-session --choose-session=openbox-session "$@"
elif test $MAJOR -lt 3; then
# old gnome-session requires openbox to be set in gconf and an
# openbox.desktop to be installed in the applications directory
SPATH=/desktop/gnome/session
# get the current default session
SESSION=$(gconftool-2 -g $SPATH/default_session 2> /dev/null)
# make sure openbox is going to be run
if test -z "$SESSION"; then
# if its empty then just run openbox
SESSION="[openbox]"
elif ! echo "$SESSION" | grep -q openbox; then
# if openbox isn't in the session then append it
SESSION="${SESSION%]},openbox]"
fi
# get the current GNOME/Openbox session
OB_SESSION=$(gconftool-2 -g $SPATH/openbox_session 2> /dev/null)
# update the GNOME/Openbox session if needed
if test x$OB_SESSION != x$SESSION; then
# the default session changed or we didn't run GNOME/Openbox before
gconftool-2 -t list --list-type=strings -s $SPATH/openbox_session \
"$SESSION" 2> /dev/null
fi
# run GNOME/Openbox
exec gnome-session --default-session-key $SPATH/openbox_session "$@"
else
# new gnome-session requires session file installed in
# /usr/share/gnome-session/sessions as well as openbox.desktop to be
# installed in the applications directory
exec gnome-session --session=openbox-gnome
fi
openbox-3.6.1/data/xsession/openbox-kde-session.in 0000644 0001753 0000144 00000000734 11646601236 017134 0000000 0000000 #!/bin/sh
if test -n "$1"; then
echo "Syntax: openbox-kde-session"
echo
echo "See the openbox-kde-session(1) manpage for help."
exit
fi
# Set the prefix for the menu layout to use
export XDG_MENU_PREFIX="kde-4-"
# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_DESKTOP_NAMES \
-remove _NET_CURRENT_DESKTOP 2> /dev/null
# Run KDE with Openbox as its window manager
export KDEWM="@bindir@/openbox"
exec startkde "$@"
openbox-3.6.1/data/openbox.desktop 0000644 0001753 0000144 00000000522 12133512457 014073 0000000 0000000 [Desktop Entry]
Type=Application
Name=Openbox
Exec=openbox
Icon=openbox
NoDisplay=true
# name we put on the WM spec check window
X-GNOME-WMName=Openbox
# gnome-session autostart
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
# Ubuntu stuff
X-Ubuntu-Gettext-Domain=openbox
# back compat
X-GNOME-Autostart-Notify=true
openbox-3.6.1/data/rc.xsd 0000644 0001753 0000144 00000073137 12256575510 012173 0000000 0000000
]>
all these elements are expected in a openbox config file
defines behaviour of windows when close to each other or the screen edge
defines aspects of window focus
defines how new windows are placed
defines desktop margins
defines the number and names of desktops
openbox-3.6.1/data/menu.xsd 0000644 0001753 0000144 00000032332 11224205530 012505 0000000 0000000
]>
openbox-3.6.1/data/openbox.png 0000644 0001753 0000144 00000002770 11003645205 013206 0000000 0000000 PNG
IHDR 0 0 W bKGD pHYs tIME*u IDAThYMoE}5;&b !bP8"'\@$p?'BHEƱ;$&x^z鞮];8v$F{v3]իbq2bdA >
"@D@cd2)>ؾwinw~su5h/۟ (6`gw\pڸ|y{05%ӹ$0t %Ce:{ x :rD,z# P@"D@йzM$gˁH$+ [ZQeN9뾽u;zªbO31gXp*
8(pk;ae%vC~* {AKD$ç_@r?GQ6
) S&5oKcX%4UpЖ1_QGZjM1&Ge 'be5`RVz!h(rJXtzqQ)W+]Ho 'e;F/ArBrk -dHO7*2
'N6jdS۲ι9E | 猀{3 ?s)Pӛ*R!cT u%}A0&LbSȋPdHga/{Ƿ:4#H(ɚ.Td=jsԁ@-&%.rDk
_fR R3{!҄}ogP%ҡK}mJ<^HC0vEEm[wfuPQM%n+՛-=Nԉ_K$q9W(һQ%h|V iVqU8֥)$$f CUz{+sJoqF;
"6Dj@njO+`[
(0q@+Utr1k t<cgۻtOdfYynϥo~?2`0ҫfn-2 !$$ Xb
o|y1-0zo
!ϴ5M߸ ,JL0- zh8:|G:CGe~VFx| 9 ~n6>ߙLqHS,y> G2:'K~v K Vd r rCY 8e00000r ,سs 8Fs`