From 019b2216281f4d88442eb840817a20a1a8036db7 Mon Sep 17 00:00:00 2001 From: Derek Payton Date: Tue, 24 May 2011 21:43:32 -0700 Subject: [PATCH] X and qtile config --- .Xresources | 10 ++++++ .inputrc | 4 +++ .xsession | 3 ++ qtile/config.py | 80 +++++++++++++++++++++++++++++++++++++++++++ qtile/session-startup | 7 ++++ 5 files changed, 104 insertions(+) create mode 100644 .Xresources create mode 100755 .xsession create mode 100644 qtile/config.py create mode 100755 qtile/session-startup diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..ffcb537 --- /dev/null +++ b/.Xresources @@ -0,0 +1,10 @@ +! to merge: +! xrdb -merge ~/.Xresources + +xterm*background: gray5 +xterm*foreground: gray95 +xterm*faceName: Andale Mono +xterm*faceSize: 10 +XTerm*VT100.translations: #override : select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0) +XTerm*metaSendsEscape: true +XTerm*eightBitInput: false diff --git a/.inputrc b/.inputrc index edd772f..ed2b552 100644 --- a/.inputrc +++ b/.inputrc @@ -25,3 +25,7 @@ set completion-ignore-case On "\e[5~": beginning-of-history "\e[6~": end-of-history "\e[2~": quoted-insert + +set meta-flag on +set convert-meta off +set output-meta on diff --git a/.xsession b/.xsession new file mode 100755 index 0000000..4cf642e --- /dev/null +++ b/.xsession @@ -0,0 +1,3 @@ +#!/bin/sh +~/.config/qtile/session-startup & +exec /usr/local/bin/qtile diff --git a/qtile/config.py b/qtile/config.py new file mode 100644 index 0000000..d74c27b --- /dev/null +++ b/qtile/config.py @@ -0,0 +1,80 @@ +from libqtile.manager import Group, Key, Screen +from libqtile.command import lazy +from libqtile import hook, layout, bar, widget + +mod = 'mod4' + +keys = [ + ## Layout, group, and screen modifiers + Key([mod], 'k', lazy.layout.down()), + Key([mod], 'j', lazy.layout.up()), + + Key([mod, 'control'], 'k', lazy.layout.shuffle_down()), + Key([mod, 'control'], 'j', lazy.layout.shuffle_up()), + + Key([mod], 'space', lazy.layout.next()), + Key([mod], 'Tab', lazy.nextlayout()), + + Key([mod, 'shift'], 'space', lazy.layout.rotate()), + Key([mod, 'shift'], 'Return', lazy.layout.toggle_split()), + + Key([mod], 'Left', lazy.group.prevgroup()), + Key([mod], 'Right', lazy.group.nextgroup()), + + Key([mod, 'shift'], '1', lazy.to_screen(0)), + Key([mod, 'shift'], '2', lazy.to_screen(1)), + + ## Application launchers + Key([mod], 'n', lazy.spawn('/usr/bin/google-chrome')), + Key([mod], 'e', lazy.spawn('/usr/bin/nautilus --no-desktop')), + Key([mod], 'Return', lazy.spawn('/usr/bin/xterm')), + + Key([mod], 'q', lazy.window.kill()), + Key([mod], 'r', lazy.spawncmd(prompt=':')), + Key([mod, 'control'], 'r', lazy.restart()), + Key([mod, 'control'], 'q', lazy.shutdown()), +] + +# Next, we specify group names, and use the group name list to generate an appropriate +# set of bindings for group switching. +groups = [Group(str(x)) for x in xrange(1, 10)] +for g in groups: + keys.append(Key([mod], g.name, lazy.group[g.name].toscreen())) + keys.append(Key([mod, 'shift'], g.name, lazy.window.togroup(g.name))) + + +layouts = (layout.RatioTile(),) + +screens = [ + Screen( + top=bar.Bar([ + widget.GroupBox(fontsize=16), + widget.Prompt(), + widget.WindowName(fontsize=16), + + widget.TextBox('cpu', 'cpu', fontsize=16), + widget.CPUGraph(line_width=1), + widget.TextBox('mem', 'mem', fontsize=16), + widget.MemoryGraph(line_width=1), + widget.TextBox('swp', 'swp', fontsize=16), + widget.SwapGraph(line_width=1), + + widget.Systray(), + widget.Volume(theme_path='/usr/share/icons/Humanity/status/24/'), + #widget.Weather(woeid='2400183', fontsize=16), + widget.Clock(fmt='%I:%M %p', fontsize=16), + ], 35), + ), + Screen( + top=bar.Bar([ + widget.GroupBox(fontsize=16), + widget.WindowName(fontsize=16), + ], 35) + ) +] + +@hook.subscribe.client_new +def dialogs(window): + if window.window.get_wm_type() == 'dialog' \ + or window.window.get_wm_transient_for(): + window.floating = True diff --git a/qtile/session-startup b/qtile/session-startup new file mode 100755 index 0000000..7084d69 --- /dev/null +++ b/qtile/session-startup @@ -0,0 +1,7 @@ +#!/bin/sh +sleep 3 +nm-applet & +#rm /tmp/fluxgui_*.pid && fluxgui & +#update-notifier & +#gnome-power-manager & +dropbox start