Commits

Adam Gomaa  committed 27e5faf

kill prep: add qtile confs

  • Participants
  • Parent commits 4dc7d77

Comments (0)

Files changed (2)

File .config/qtile/config.py

+from libqtile.manager import Key, Screen, Group, Drag
+from libqtile.command import lazy
+from libqtile import layout, bar, widget, hook
+
+MOD = "mod1"
+
+
+# The bindings below are for use with a Kinesis keyboard, and may not make
+# sense for standard keyboards.
+def ModKey(*args):
+    return Key([MOD], *args)
+keys = [
+    # First, a set of bindings to control the layouts
+    Key(
+        [MOD], "k",
+        lazy.layout.down()
+    ),
+    Key(
+        [MOD], "j",
+        lazy.layout.up()
+    ),
+    Key(
+        [MOD], "space",
+        lazy.nextlayout()
+    ),
+    Key(
+        [MOD, "shift"], "space",
+        lazy.layout.rotate()
+    ),
+    Key(
+        [MOD], "F10",
+        lazy.window.toggle_floating()
+    ),
+    Key([MOD], "Return", lazy.spawn("urxvt")),
+    Key([MOD, "shift"], "Return", lazy.spawn("dwb")),
+    Key([MOD], "F4",      lazy.window.kill()),
+    Key([MOD], "F9",      lazy.spawn("note")),
+    Key([MOD], "Left",      lazy.spawn("_qscreen left")),
+    Key([MOD], "Right",      lazy.spawn("_qscreen right")),
+]
+
+
+
+# Next, we specify group names, and use the group name list to generate an appropriate
+# set of bindings for group switching.
+group_names = "1 2 3 4 5 6 7 8 9 0".split()
+screens = [
+    # Screen(bottom=bar.Bar(
+    #         [widget.Systray(),
+    #          widget.Volume()],
+    #         30
+    #         )),
+    Screen(),
+    Screen(),
+    #Screen(),
+    #Screen(),
+    ]
+groups = []
+for i, s in enumerate(screens):
+    for gn in group_names:
+        groups.append(Group("s{i}g{gn}".format(i=i, gn=gn)))
+    # end up with [s0g1, ..., s0g9, s0g0, s1g1, ...]
+
+for gn in group_names:
+    keys.append(
+        Key([MOD, "shift"], gn, lazy.window.togroup("s0g" + gn))
+        )
+    groupnames = ["s{si}g{gn}".format(si=si, gn=gn) for si in range(2)]
+    cmds = []
+    for i in range(2):
+        #cmds.append(lazy.group["s{0}g{1}".format(i, gn)].toscreen())
+        cmds.append(
+            lazy.group["s{0}g{1}".format(i, gn)].toscreen(i))
+    keys.append(Key([MOD], gn, *cmds))
+
+
+
+# Two simple layout instances:
+layouts = [
+    layout.VTile(),
+    layout.Max(),
+    layout.Floating(),
+]
+
+mouse = [
+    Drag([MOD], "Button1", lazy.window.set_position_floating(),
+        start=lazy.window.get_position()),
+    Drag([MOD], "Button3", lazy.window.set_size_floating(),
+        start=lazy.window.get_size()),
+    ]
+
+
+# I have two screens, each of which has a Bar at the bottom. Each Bar has two
+# simple widgets - a GroupBox, and a WindowName.
+#    Screen(
+#        bottom = bar.Bar(
+#                    [
+#                        widget.GroupBox(),
+#                        widget.WindowName()
+#                    ],
+#                    30,
+#                ),
+#    )
+
+
+@hook.subscribe.client_new
+def dialogs(window):
+    try:
+        if window.window.get_wm_class()[0] == 'urxvt' and False:
+            window.floating = True
+    except Exception:
+        pass
+    if(window.window.get_wm_type() == 'dialog'
+       or window.window.get_wm_transient_for()):
+        window.floating = True

File .config/qtile/session-startup

+#!/bin/sh
+sleep 3
+xmodmap ~/.xmodmap-propane
+xsetroot -solid '#002020'
+#xsetroot -solid black
+#nm-applet &
+#synapse -s &
+xset m 10 1
+