<commit_before># Copyright (c) 2015 <NAME> [l0aCk3r]

from libqtile.config import Key, Screen, Group, Drag, Click, hook, Match
from libqtile.command import lazy
from libqtile import layout, bar, widget
import os
import subprocess

mod = "mod4"
alt = "mod1"
printkey = "Print"

keys = [
    # Switch between windows in current stack pane
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "h", lazy.layout.previous()),
    Key([mod], "l", lazy.layout.next()),

    # Move windows up or down in current stack
    Key([mod, "shift"], "k", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_up()),

    # Move windows from stack to stack
    Key([mod, "shift"], "l", lazy.layout.client_to_next()),
    Key([mod, "shift"], "h", lazy.layout.client_to_previous()),

    # Vertical layout
    Key([mod], 'm', lazy.layout.maximize()),
    Key([mod], 'n', lazy.layout.normalize()),

    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.layout.next()),

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate()),

    # Toggle floating
    Key([mod], "t", lazy.window.toggle_floating()),
    Key([mod], "f", lazy.window.toggle_fullscreen()),

    # this is usefull when floating windows get buried
    Key([alt], "grave", lazy.window.bring_to_front()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),

    # Kill a window
    Key([mod], "w", lazy.window.kill()),

    # Restart or shutdown qtile
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),

    # Run command
    Key([mod], "r", lazy.spawncmd()),

    # Dual monitor
    Key([mod, alt], "Tab", lazy.window.to_next_screen()),  # Don't work
    Key([mod, alt], "1", lazy.to_screen(0), lazy.group.toscreen(0)),
    Key([mod, alt], "2", lazy.to_screen(1), lazy.group.toscreen(1)),

    # Decrease ratio of current window
    Key([mod, "shift"], "l", lazy.layout.decrease_ratio()),

    # Increase ratio of current window
    Key([mod, "shift"], "h", lazy.layout.increase_ratio()),

    # Spin up applications
    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([alt], "c", lazy.spawn("urxvt -e weechat-curses")),
    Key([alt], "d", lazy.spawn("firefox-bin")),
    Key([alt], "g", lazy.spawn("chromium")),
    Key([alt], "s", lazy.spawn("skype")),
    Key([alt], "m", lazy.spawn("thunderbird-bin")),
    Key([alt, "shift"], printkey, lazy.spawn("scrot -sb '%d-%m-%Y_%H-%M-%S_$wx$h_scrot_selection.png' -e 'mv $f ~/pictures/screenshots'")),
    Key([alt], printkey, lazy.spawn("scrot -ub '%d-%m-%Y_%H-%M-%S_$wx$h_scrot_window.png' -e 'mv $f ~/pictures/screenshots'")),
]

#groups = [Group(i) for i in "123456890"]

# Use "xprop WM_CLASS" command to retrieve the wm_class attribute of a window
groups = [
    Group("1", matches=[
        Match(wm_class=["URxvt"])]),
    Group("2", matches=[
        Match(wm_class=["Firefox"]),
        Match(wm_class=["chromium-browser-chromium"])]),
    Group("3", matches=[
        Match(wm_class=["Thunderbird"]),
        Match(wm_class=["Skype"])]),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9"),
    Group("0", matches=[
        Match(wm_class=["rdesktop"])]),
]

for i in groups:
    # mod1 + number of group = switch to group
    keys.append(
        Key([mod], i.name, lazy.group[i.name].toscreen())
    )

    # mod1 + shift + number of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name))
    )

layouts = [
    layout.Max(),
    layout.VerticalTile(),
    layout.Stack(num_stacks=2),
    layout.Tile(ratio=0.25),
]

widget_defaults = dict(
    font='Andale',
    fontsize=12,
    padding=3,
)

screens = [<commit_msg>Added MonadTall layout<commit_after># Copyright (c) 2015 <NAME> [l0aCk3r]

from libqtile.config import Key, Screen, Group, Drag, Click, hook, Match
from libqtile.command import lazy
from libqtile import layout, bar, widget
import os
import subprocess

mod = "mod4"
alt = "mod1"
printkey = "Print"

keys = [
    # Switch between windows in current stack pane
    Key([mod], "k", lazy.layout.down()),
    Key([mod], "j", lazy.layout.up()),
    Key([mod], "h", lazy.layout.previous()),
    Key([mod], "l", lazy.layout.next()),

    # MonadTall layout
    Key([mod, "shift"], "k", lazy.layout.shuffle_up()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "h", lazy.layout.swap_left()),
    Key([mod, "shift"], "l", lazy.layout.swap_right()),
    Key([mod], "i", lazy.layout.grow()),
    Key([mod], "o", lazy.layout.shrink()),
    Key([mod, "shift"], "space", lazy.layout.flip()),

    # Move windows up or down in current stack
    Key([mod, "shift"], "k", lazy.layout.shuffle_down()),
    Key([mod, "shift"], "j", lazy.layout.shuffle_up()),

    # Move windows from stack to stack
    #Key([mod, "shift"], "l", lazy.layout.client_to_next()),
    #Key([mod, "shift"], "h", lazy.layout.client_to_previous()),

    # Vertical and MonadTall layout
    Key([mod], 'm', lazy.layout.maximize()),
    Key([mod], 'n', lazy.layout.normalize()),

    # Switch window focus to other pane(s) of stack
    Key([mod], "space", lazy.layout.next()),

    # Swap panes of split stack
    Key([mod, "shift"], "space", lazy.layout.rotate()),

    # Toggle floating
    Key([mod], "t", lazy.window.toggle_floating()),

    # Toggle full screen
    Key([mod], "f", lazy.window.toggle_fullscreen()),

    # This should be usefull when floating windows get buried
    Key([alt], "grave", lazy.window.bring_to_front()),

    # Toggle between split and unsplit sides of stack.
    # Split = all windows displayed
    # Unsplit = 1 window displayed, like Max layout, but still with
    # multiple stack panes
    Key([mod, "shift"], "Return", lazy.layout.toggle_split()),

    # Toggle between different layouts as defined below
    Key([mod], "Tab", lazy.next_layout()),

    # Kill a window
    Key([mod], "w", lazy.window.kill()),

    # Restart or shutdown qtile
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),

    # Run command
    Key([mod], "r", lazy.spawncmd()),

    # Dual monitor
    Key([mod, alt], "Tab", lazy.window.to_next_screen()),  # Don't work
    Key([mod, alt], "1", lazy.to_screen(0), lazy.group.toscreen(0)),
    Key([mod, alt], "2", lazy.to_screen(1), lazy.group.toscreen(1)),

    # Decrease ratio of current window
    Key([mod, "shift"], "l", lazy.layout.decrease_ratio()),

    # Increase ratio of current window
    Key([mod, "shift"], "h", lazy.layout.increase_ratio()),

    # Spin up applications
    Key([mod], "Return", lazy.spawn("urxvt")),
    Key([alt], "c", lazy.spawn("urxvt -e weechat-curses")),
    Key([alt], "d", lazy.spawn("firefox-bin")),
    Key([alt], "g", lazy.spawn("chromium")),
    Key([alt], "s", lazy.spawn("skype")),
    Key([alt], "m", lazy.spawn("thunderbird-bin")),
    Key([alt], printkey, lazy.spawn("scrot -sb '%d-%m-%Y_%H-%M-%S_$wx$h_scrot_selection.png' -e 'mv $f ~/pictures/screenshots'")),
    Key([mod], printkey, lazy.spawn("scrot -ub '%d-%m-%Y_%H-%M-%S_$wx$h_scrot_window.png' -e 'mv $f ~/pictures/screenshots'")),
]

#groups = [Group(i) for i in "123456890"]

# Use "xprop WM_CLASS" command to retrieve the wm_class attribute of a window
groups = [
    Group("1", matches=[
        Match(wm_class=["URxvt"])]),
    Group("2", matches=[
        Match(wm_class=["Firefox"]),
        Match(wm_class=["chromium-browser-chromium"])]),
    Group("3", matches=[
        Match(wm_class=["Thunderbird"]),
        Match(wm_class=["Skype"])]),
    Group("4"),
    Group("5"),
    Group("6"),
    Group("7"),
    Group("8"),
    Group("9"),
    Group("0", matches=[
        Match(wm_class=["rdesktop"])]),
]

for i in groups:
    # mod1 + number of group = switch to group
    keys.append(
        Key([mod], i.name, lazy.group[i.name].toscreen())
    )

    # mod1 + shift + number of group = switch to & move focused window to group
    keys.append(
        Key([mod, "shift"], i.name, lazy.window.togroup(i.name))
    )

layouts = [
    layout.Max(),
    layout.VerticalTile(),
    layout.Stack(num_stacks=2),
    layout.MonadTall(),
]

widget_defaults = dict(
    font='Andale',
    fontsize=12,
    padding=3,
)

screens = [
{'fraction_non_alphanumeric': 0.19759509769915598, 'fraction_numerical': 0.009596485142791074, 'mean_word_length': 3.55983131259884, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2784636', 'n_tokens_mistral': 3093, 'n_tokens_neox': 2980, 'n_words': 745}