Merged in oblogout-distutils r58-r68.

This commit is contained in:
2009-01-29 22:25:53 +00:00
parent a9aaa278dc
commit 5209135f87
50 changed files with 104 additions and 152 deletions

98
data/oblogout Executable file
View File

@@ -0,0 +1,98 @@
#!/usr/bin/env python2.5
# Crunchbang Openbox Logout
# - GTK/Cairo based logout box styled for Crunchbang
#
# Andrew Williams <andy@tensixtyone.com>
#
# Originally based on code by:
# adcomp <david.madbox@gmail.com>
# iggykoopa <etrombly@yahoo.com>
#
# 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.
#
# 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.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
import os
import sys
import getopt
import logging
import logging.handlers
from oblogout import oblogout
class Usage(Exception):
def __init__(self, msg):
self.msg = msg
def main(argv = None):
# Start logger instace used by the OpenboxLogout class
logger = logging.getLogger('oblogout')
logout = logging.StreamHandler(sys.stdout)
logout.setFormatter(logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s"))
logger.addHandler(logout)
verbose = None
config = None
local_mode = None
if argv is None:
argv = sys.argv
try:
try:
opts, args = getopt.getopt(argv[1:], "hvc:l", ["help", "verbose", "config=", "local"])
except getopt.error, msg:
raise Usage(msg)
# more code, unchanged
except Usage, err:
logger.error(err.msg)
logger.error("for help use --help")
return 2
for o, a in opts:
if o in ("-h", "--help"):
print __doc__
return 0
elif o in ("-v", "--verbose"):
verbose = True
elif o in ("-c", "--config"):
config = a
elif o in ("-l", "--local"):
local_mode = True
if not config:
if not local_mode:
config = '/etc/oblogout.conf'
else:
config = 'data/oblogout.conf'
# Check config in local path, if it exists pass it on
if not os.path.exists(config):
logger.error("Invalid config file: %s" % config)
return 1
# If debug mode is enabled, output debug messages
if verbose:
logger.setLevel(logging.DEBUG)
else:
logger.setLevel(logging.INFO)
# Start the application
app = oblogout.OpenboxLogout(config, local_mode)
app.run_logout()
return 0
if __name__ == "__main__":
sys.exit(main())

15
data/oblogout.conf Normal file
View File

@@ -0,0 +1,15 @@
[looks]
opacity = 70
bgcolor = black
buttontheme = foom
buttons = cancel, logout, restart, shutdown, suspend, lock
[shortcuts]
cancel = Escape
shutdown = S
restart = R
suspend = U
logout = L
lock = K
hibernate = H

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB