diff --git a/qwerty.py b/qwerty.py
index 89685d3..50f138e 100755
--- a/qwerty.py
+++ b/qwerty.py
@@ -64,11 +64,14 @@ speckeys = {}
def help():
print """Synopsis:
-qwerty.py [-a] [-c | --config /path/to/config] [-f] [-g | --geometry geometry] [-d] [-h | --help]
+qwerty.py [-a] [-t] [-c | --config /path/to/config] [-f] [-g | --geometry geometry] [-d] [-h | --help]
-a
Fill empty keys with keys from other sections
+-t
+ Show taskbar by default
+
-c | --config /path/to/config
Use specified config file instead of ~/.config/qwerty.conf
@@ -282,11 +285,14 @@ def parse_cmdline():
decorate = True
geometry = ''
fill_empty = False
+ taskbar = False
- opts,args = getopt(sys.argv[1:], 'ac:g:fdh',['config=','geometry=','help'])
+ opts,args = getopt(sys.argv[1:], 'atc:g:fdh',['config=','geometry=','help'])
for k,v in opts:
if k == '-a':
fill_empty = True
+ if k == '-t':
+ taskbar = True
if k == '-c' or k == '--config':
config_file = v
if k == '-g' or k == '--geometry':
@@ -302,7 +308,7 @@ def parse_cmdline():
if fullscreen:
decorate = False
- return fill_empty, fullscreen, geometry, decorate
+ return fill_empty, taskbar, fullscreen, geometry, decorate
def dict_from_keylist(keys):
@@ -605,7 +611,7 @@ class KeyEditDialog(object):
self.hide()
class GUI(object):
- def __init__(self, fullscreen, geometry, decorate):
+ def __init__(self, fullscreen, geometry, decorate, taskbar):
global sections
self.buttons = {}
@@ -650,7 +656,7 @@ class GUI(object):
self.rows[2].append(self.buttons[c])
self.taskbar = gtk.VBox()
- self.taskbar_shown = False
+ self.taskbar_shown = taskbar
self.keyboard = gtk.VBox()
box = gtk.HBox()
@@ -683,7 +689,6 @@ class GUI(object):
self.window.add(self.main)
self.window.show_all()
- self.taskbar.hide()
if XLIB:
try:
@@ -692,6 +697,8 @@ class GUI(object):
self.clients_list = []
print 'Could not get list of open windows!'
+ self.switch_taskbar(taskbar)
+
def calc_sizes(self):
global LABEL_FONT_SIZE
global DESC_FONT_SIZE
@@ -777,10 +784,13 @@ class GUI(object):
self.activate_window(self.convert_class(cls)[0])
self.exit()
- def switch_taskbar(self):
+ def switch_taskbar(self, show=None):
if not XLIB:
- return
- self.taskbar_shown = not self.taskbar_shown
+ return
+ if show is None:
+ self.taskbar_shown = not self.taskbar_shown
+ else:
+ self.taskbar_shown = show
if self.taskbar_shown:
self.keyboard.hide()
self.fill_taskbar()
@@ -985,9 +995,9 @@ class GUI(object):
btn.mark_running(K.cls)
self.refresh()
-fill_empty, fullscreen, geometry, decorate = parse_cmdline()
+fill_empty, taskbar, fullscreen, geometry, decorate = parse_cmdline()
parse_config(fill_empty)
-g = GUI(fullscreen, geometry, decorate)
+g = GUI(fullscreen, geometry, decorate, taskbar)
g.show_section(defsection+1,[])
gtk.main()