Exemplo n.º 1
0
def init_layouts(layout_theme: dict) -> List:
    layouts = [
        layout.MonadTall(**layout_theme),
        layout.MonadWide(**layout_theme),
        layout.Max(),
    ]
    return layouts
Exemplo n.º 2
0
class WhenConfig(Config):
    keys = [
        config.Key(
            ["control"],
            "k",
            lazy.window.toggle_floating(),
        ),
        config.Key(
            ["control"],
            "j",
            lazy.window.toggle_floating().when(focused=config.Match(wm_class="TestWindow")),
        ),
        config.Key(
            ["control"],
            "h",
            lazy.window.toggle_floating().when(focused=config.Match(wm_class="idonotexist")),
        ),
        config.Key(
            ["control"],
            "n",
            lazy.next_layout().when(focused=config.Match(wm_class="TestWindow")),
        ),
        config.Key(
            ["control"],
            "m",
            lazy.next_layout().when(
                focused=config.Match(wm_class="TestWindow"), if_no_focused=True
            ),
        ),
    ]
    layouts = [layout.MonadWide(), layout.MonadTall()]
Exemplo n.º 3
0
def init_layouts():
    return [
        layout.MonadTall(**layout_theme),
        layout.MonadWide(**layout_theme),
        layout.Bsp(**layout_theme),
        layout.Floating(border_focus="#3B4022")
    ]
Exemplo n.º 4
0
def init_layouts():
    return [
        layout.Max(**layout_theme),
        layout.MonadTall(**layout_theme),
        layout.MonadWide(**layout_theme),
        layout.Bsp(**layout_theme),
        #layout.TreeTab(
        #    font = "Noto Sans ",
        #    fontsize = 10,
        #    sections = ["FIRST", "SECOND"],
        #    section_fontsize = 11,
        #    bg_color = "141414",
        #    active_bg = "90C435",
        #    active_fg = "000000",
        #    inactive_bg = "384323",
        #    inactive_fg = "a0a0a0",
        #    padding_y = 5,
        #    section_top = 10,
        #    panel_width = 320,
        #    **layout_theme
        #    ),
        #layout.Stack(stacks=2, **layout_theme),
        #layout.Columns(**layout_theme),
        layout.RatioTile(**layout_theme),
        #layout.VerticalTile(**layout_theme),
        layout.Tile(shift_windows=True, **layout_theme),
        #layout.Matrix(**layout_theme),
        #layout.Zoomy(**layout_theme),
        layout.Floating(**layout_theme)
    ]
Exemplo n.º 5
0
def init_layouts():
    return [layout.Max(**layout_theme),
            layout.MonadTall(**layout_theme),
            layout.MonadWide(**layout_theme),
            layout.Bsp(**layout_theme),
            layout.TreeTab(
                font = "Ubuntu",
                fontsize = 10,
                sections = ["FIRST", "SECOND"],
                section_fontsize = 11,
                bg_color = "141414",
                active_bg = "90C435",
                active_fg = "000000",
                inactive_bg = "384323",
                inactive_fg = "a0a0a0",
                padding_y = 5,
                section_top = 10,
                panel_width = 320,
                **layout_theme
                ),
            layout.Slice(side="left", width=192, name="gimp", role="gimp-toolbox",
                fallback=layout.Slice(side="right", width=256, role="gimp-dock",
                fallback=layout.Stack(num_stacks=1, **border_args))),
            #layout.Stack(stacks=2, **layout_theme),
            #layout.Columns(**layout_theme),
            #layout.RatioTile(**layout_theme),
            #layout.VerticalTile(**layout_theme),
            #layout.Tile(shift_windows=True, **layout_theme),
            #layout.Matrix(**layout_theme),
            #layout.Zoomy(**layout_theme),
            layout.Floating(**layout_theme)]
Exemplo n.º 6
0
class MonadWideConfig(Config):
    auto_fullscreen = True
    groups = [libqtile.config.Group("a")]
    layouts = [layout.MonadWide()]
    floating_layout = libqtile.layout.floating.Floating()
    keys = []
    mouse = []
    screens = []
    follow_mouse_focus = False
Exemplo n.º 7
0
class MonadWideMarginsConfig(Config):
    auto_fullscreen = True
    groups = [libqtile.config.Group("a")]
    layouts = [layout.MonadWide(margin=4)]
    floating_layout = libqtile.resources.default_config.floating_layout
    keys = []
    mouse = []
    screens = []
    follow_mouse_focus = False
Exemplo n.º 8
0
class MonadWideNewClientPositionTopConfig(Config):
    auto_fullscreen = True
    groups = [libqtile.config.Group("a")]
    layouts = [layout.MonadWide(new_client_position="top")]
    floating_layout = libqtile.resources.default_config.floating_layout
    keys = []
    mouse = []
    screens = []
    follow_mouse_focus = False
Exemplo n.º 9
0
class MonadWideMarginsConfig:
    auto_fullscreen = True
    main = None
    groups = [libqtile.config.Group("a")]
    layouts = [layout.MonadWide(margin=4)]
    floating_layout = libqtile.layout.floating.Floating()
    keys = []
    mouse = []
    screens = []
    follow_mouse_focus = False
Exemplo n.º 10
0
def init_layouts():
    return [layout.Max(**layout_theme),
            layout.MonadTall(**layout_theme),
            layout.MonadWide(**layout_theme),
            layout.Bsp(**layout_theme),
            #layout.Stack(stacks=2, **layout_theme),
            #layout.Columns(**layout_theme),
            #layout.RatioTile(**layout_theme),
            #layout.VerticalTile(**layout_theme),
            #layout.Tile(shift_windows=True, **layout_theme),
            #layout.Matrix(**layout_theme),
            #layout.Zoomy(**layout_theme),
            layout.Floating(**layout_theme)]
Exemplo n.º 11
0
 def init_layouts(self, my_gaps):
     return [
         layout.MonadTall(
             border_width=2,
             single_border_width=2,
             margin=my_gaps,
         ),
         layout.MonadWide(
             border_width=2,
             single_border_width=2,
             margin=my_gaps,
         ),
         layout.TreeTab(),
     ]
Exemplo n.º 12
0
 def init_layouts(self):
     """"""
     layouts = [
         layout.Max(),
         layout.Bsp(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"]),
         # layout.Columns(),
         # layout.Stack(num_stacks=2, border_focus=self.theme["border"]),
         layout.Matrix(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"]),
         layout.MonadTall(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"]),
         layout.MonadWide(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"]),
         layout.Floating(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"]),
         #layout.TreeTab(active_bg=self.theme["border"], font=self.theme["font-family"], sections=[""]),
         # layout.Zoomy(columnwidth=300, property_small="0.5", property_big="1.5"),
         layout.RatioTile(border_focus=self.theme["border"], border_normal=self.theme["active"], border_width=self.theme["border-width"], fancy=True),
         # layout.Slice(),
         #layout.Tile(border_focus=self.theme["border"], border_width=self.theme["border-width"]),
         # layout.Wmii(),
     ]
     return layouts
Exemplo n.º 13
0
LAYOUT_PARAMS = {
    'border_normal': GRAY,
    'border_focus': WHITE,
    'border_width': 2,
    'margin': 7
}

layouts = [
    layout.Max(),
    layout.Stack(num_stacks=2, **LAYOUT_PARAMS),
    layout.VerticalTile(**LAYOUT_PARAMS),
    layout.Bsp(**LAYOUT_PARAMS),
    layout.TreeTab(),
    layout.MonadTall(**LAYOUT_PARAMS),
    layout.MonadWide(**LAYOUT_PARAMS)
]

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

extension_defaults = widget_defaults.copy()

#bar initialization

main_bar = bar.Bar([
    widget.GroupBox(background=GRAY,
                    highlight_method="block",
                    urgent_border=SECONDARY,
                    inactive=BLACK,
                    disable_drag=True,
                    other_current_screen_border=TERTIARY,
Exemplo n.º 14
0
alt_l = 'mod1'
alt_r = 'mod3'
super_l = 'mod4'
super_r = 'mod5'
mod = alt_r


def get_win_id(w):
    return w.info()['id']


layouts = [
    layout.Columns(),
    #  layout.MonadTall(),
    #  layout.tree.TreeTab(),
    layout.MonadWide(min_secondary_size=10, min_ratio=0.1, max_ratio=0.9),
    #  layout.bsp.Bsp(),
    layout.Max(),
]


##
# @brief toggle_layout 更改布局
#
# @param qtile this
#
# @return null
def toggle_layout(qtile):
    if eq(str(qtile.currentLayout.info()['name']), 'columns'):
        qtile.currentGroup.toLayoutIndex(1)
    else:
Exemplo n.º 15
0
        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, "shift"],
            i.name,
            lazy.window.togroup(i.name, switch_group=True),
            desc="Switch to & move focused window to group {}".format(i.name)),
    ])

layouts = [
    # layout.Max(),
    layout.MonadTall(border_focus=onedark["blue"],
                     border_normal=onedark["black"],
                     border_width=1,
                     single_border_width=0,
                     margin=10),
    layout.MonadWide(border_focus=onedark["blue"],
                     border_normal=onedark["white"],
                     border_width=1,
                     margin=10),
    layout.Bsp(border_focus=onedark["light_red"],
               border_normal=onedark["black"],
               border_width=1,
               margin=5,
               fair=False)
]

widget_defaults = dict(
    # Changing font from default 'sans' made the text appear more centered
    # instead of slightly too high in the bar
    font="JetBrains Mono Bold",
    fontsize=13,
    padding=3,
)
Exemplo n.º 16
0
        "margin": 10,
        "border_width": 2,
        "border_focus": "#ff00ff",
        "border_normal": "#f4c2c2"
    }


layout_theme = init_layout_theme()

layouts = [
    layout.MonadTall(margin=16,
                     border_width=2,
                     border_focus="#ff00ff",
                     border_normal="#f4c2c2"),
    layout.MonadWide(margin=16,
                     border_width=2,
                     border_focus="#ff00ff",
                     border_normal="#f4c2c2"),
    layout.Matrix(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.Floating(**layout_theme),
    layout.RatioTile(**layout_theme),
    layout.Max(**layout_theme),
    layout.Columns(**layout_theme),
    layout.Stack(**layout_theme),
    layout.Tile(**layout_theme),
    layout.TreeTab(sections=['FIRST', 'SECOND'],
                   bg_color='#141414',
                   active_bg='#0000ff',
                   inactive_bg='#1e90ff',
                   padding_y=5,
                   section_top=10,
Exemplo n.º 17
0
    ])


def init_layout_theme():
    return {"margin":5,
            "border_width":1,
            "border_focus": "#4c566a",
            "border_normal": "#4c566a"
            }

layout_theme = init_layout_theme()


layouts = [
    layout.MonadTall(margin=6, border_width=1, border_focus="#4c566a", border_normal="#4c566a"),
    layout.MonadWide(margin=6, border_width=1, border_focus="#4c566a", border_normal="#4c566a"),
    layout.Matrix(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.Floating(**layout_theme),
    layout.RatioTile(**layout_theme),
    layout.Max(**layout_theme)
]

# COLORS FOR THE BAR

def init_colors():
    return [["#2F343F", "#2F343F"], # color 0
            ["#2F343F", "#2F343F"], # color 1
            ["#3384d0", "#3384d0"], # color 2
            ["#f1fa8c", "#f1fa8c"], # color 3
            ["#f1fa8c", "#f1fa8c"], # color 4
Exemplo n.º 18
0
for i, (name, keybinding, kwargs) in enumerate(group_names, 1):
    keys.append(Key([mod], keybinding,
                    lazy.group[name].toscreen()))  # Switch to another group
    keys.append(
        Key([mod, "shift"], keybinding,
            lazy.window.togroup(name)))  # Send current window to another group

layout_theme = {
    "border_width": 2,
    "margin": 12,
    "border_focus": "e1acff",
    "border_normal": "1D2330"
}

layouts = [
    layout.MonadWide(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.Stack(stacks=2, **layout_theme),
    layout.Columns(**layout_theme),
    #layout.RatioTile(**layout_theme),
    #layout.VerticalTile(**layout_theme),
    #layout.Matrix(**layout_theme),
    #layout.Zoomy(**layout_theme),
    layout.MonadTall(**layout_theme),
    layout.Max(**layout_theme),
    layout.Tile(shift_windows=True, **layout_theme),
    layout.Stack(num_stacks=2),
    layout.TreeTab(font="Inconsolata Nerd Font",
                   fontsize=13,
                   sections=["FIRST", "SECOND"],
                   section_fontsize=15,
Exemplo n.º 19
0
layout_settings = {
    'margin': 5,
    'border_width': 2,
    'border_focus': '#999999',
    'border_normal': '#000000',
}

layouts = [
    #  layout.Max(),
    #  layout.Stack(num_stacks=2),
    # Try more layouts by unleashing below layouts.
    #  layout.Bsp(),
    #  layout.Columns(),
    #  layout.Matrix(),
    layout.MonadTall(**layout_settings),
    layout.MonadWide(**layout_settings),
    #  layout.RatioTile(),
    #  layout.Tile(),
    layout.TreeTab(**layout_settings),
    #  layout.VerticalTile(),
    #  layout.Zoomy(),
]

# }}}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#                                    Widgets
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# {{{

widget_defaults = dict(
    font='victor mono',
Exemplo n.º 20
0
        "margin": 5,
        "border_width": 2,
        "border_focus": "#5e81ac",
        "border_normal": "#4c566a"
    }


layout_theme = init_layout_theme()

layouts = [
    layout.MonadTall(margin=2,
                     border_width=5,
                     border_focus="#4c7899",
                     border_normal="#434745"),
    layout.MonadWide(margin=2,
                     border_width=5,
                     border_focus="#4c7899",
                     border_normal="#434745"),
    layout.Matrix(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.Floating(**layout_theme),
    layout.RatioTile(**layout_theme),
    layout.Max(**layout_theme)
]

# COLORS FOR THE BAR


def init_colors():
    return [
        ["#2F343F", "#2F343F"],  # color 0
        ["#2F343F", "#2F343F"],  # color 1
Exemplo n.º 21
0
        Key([mod], actual_key, lazy.group[group.name].toscreen()),
        # Send window to workspace N (actual_key)
        Key([mod, "shift"], actual_key, lazy.window.togroup(group.name))
    ])

# LAYOUTS

layout_conf = {
    'border_focus': colors['primary'][0],
    'border_width': 1,
    'margin': 4
}

layouts = [
    layout.MonadTall(**layout_conf),
    layout.MonadWide(**layout_conf),
    layout.Matrix(columns=2, **layout_conf),
    # layout.Bsp(),
    # layout.Columns(),
    # layout.RatioTile(),
    # layout.Tile(),
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
    layout.Max(),
]

# WIDGETS

# Reusable configs for displaying different widgets on different screens
Exemplo n.º 22
0
from libqtile import layout
from libqtile.config import Match
from settings.theme import colors

layouts = [
    layout.Max(),
    layout.MonadTall(margin=3, border_focus=colors['black']),
    layout.MonadWide(margin=3, border_focus=colors['black']),
    layout.RatioTile(border_focus=colors['black'])
]

float_settings = layout.Floating()
Exemplo n.º 23
0
from libqtile import layout
from colors import colors

commonProperties = dict(
    border_focus = colors['color2'],
    border_normal = colors['color0'],
    border_width = 2,
    margin = 6,
)

layouts = [
    layout.MonadTall(**commonProperties, name = "﬿"),
    layout.MonadWide(**commonProperties, name = ""),
    layout.Columns(insert_position = 1, fair = True, num_columns=3, **commonProperties, name = "﩯"),
    layout.Max(name = ""),
    layout.Floating(**commonProperties, name = ""),
]
Exemplo n.º 24
0
            desc="Switch to & move focused window to group {}".format(i.name)),
        # Or, use below if you prefer not to switch to that group.
        # # mod1 + shift + letter of group = move focused window to group
        # Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
        #     desc="move focused window to group {}".format(i.name)),
    ])

layouts = [
    layout.Columns(border_focus='#4C7899', border_width=4),
    layout.Max(),
    # Try more layouts by unleashing below layouts.
    #layout.Stack(border_focus='$4C7899', border_width=4, num_stacks=2),
    layout.Bsp(border_focus='#4C7899', border_width=4),
    layout.Matrix(border_focus='#4C7899', border_width=4),
    layout.MonadTall(border_focus='#4C7899', border_width=4),
    layout.MonadWide(border_focus='#4C7899', border_width=4),
    layout.RatioTile(border_focus='#4C7899', border_width=4),
    layout.Tile(border_focus='#4C7899', border_width=4),
    layout.TreeTab(border_focus='#4C7899', border_width=4),
    layout.VerticalTile(border_focus='#4C7899', border_width=4),
    layout.Zoomy(),
]

widget_defaults = dict(
    font='sans',
    fontsize=12,
    padding=3,
)
extension_defaults = widget_defaults.copy()

screens = [
Exemplo n.º 25
0
          layout="max"),
]

##### LAYOUTS #####
layout_config = dict(
    margin=6,  # Gap between windows
    border_focus=def_colors["window active"],  # Focused window border color
    border_normal=def_colors[
        "window inactive"],  # Inactive window border color
    border_width=3,  # Width of focused and inactive borders
)

layouts = [
    layout.Max(margin=layout_config["margin"]),
    layout.MonadTall(**layout_config, ),
    layout.MonadWide(**layout_config, ),
    layout.floating.Floating(
        auto_float_types="toolbar",
        border_normal=COLORS["Frost"][0],
        border_focus=COLORS["Aurora"][3],
        **({
            key: val
            for key, val in layout_config.items()
            if key != 'border_normal' and key != 'border_focus'
        }),
    ),
]

##### KEYS #####
keys = [
    # Switch between windows in current stack pane
Exemplo n.º 26
0
        "margin": 5,
        "border_width": 2,
        "border_focus": "#5e81ac",
        "border_normal": "#4c566a"
    }


layout_theme = init_layout_theme()

layouts = [
    layout.MonadTall(margin=8,
                     border_width=2,
                     border_focus="#5e81ac",
                     border_normal="#4c566a"),
    layout.MonadWide(margin=8,
                     border_width=2,
                     border_focus="#5e81ac",
                     border_normal="#4c566a"),
    layout.Matrix(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.Floating(**layout_theme),
    layout.RatioTile(**layout_theme),
    layout.Max(**layout_theme)
]

# COLORS FOR THE BAR


def init_colors():
    return [
        ["#2F343F", "#2F343F"],  # color 0
        ["#2F343F", "#2F343F"],  # color 1
Exemplo n.º 27
0
    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()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]

layouts = [
    layout.Max(),
    layout.Stack(border_width=2, num_stacks=2, border_focus=current_style['tetriary']),
    # Try more layouts by unleashing below layouts.
    layout.Bsp(),
    # layout.Columns(),
    # layout.Matrix(),
    layout.MonadTall(border_width=2, margin=5, border_focus=current_style['secondary']),
    layout.MonadWide(border_width=2, margin=10, border_focus=current_style['secondary']),
    # layout.RatioTile(),
    # layout.Tile(),
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
]

floating_layout = layout.Floating(float_rules=[
    # Run the utility of `xprop` to see the wm class and name of an X client.
    {'wmclass': 'confirm'},
    {'wmclass': 'dialog'},
    {'wmclass': 'download'},
    {'wmclass': 'error'},
    {'wmclass': 'file_progress'},
    {'wmclass': 'notification'},
Exemplo n.º 28
0
    '#ffbcbc',  # border line color for current tab
    '#b7efcd'
]  # border line color for other tab and odd widgets

layout_theme = {
    "border_focus": colors[3],
    "margin": 2,
    "border_width": 3,
}

layouts = [
    layout.Tile(add_after_last=True, add_on_top=False,
                **layout_theme),  # I want this
    layout.Max(),
    layout.MonadTall(**layout_theme),  # I want this
    layout.MonadWide(**layout_theme),  # I want this
    layout.RatioTile(**layout_theme),  # I want this
    layout.Matrix(**layout_theme),  # I want this
    # layout.Stack(num_stacks=2),
    # layout.Bsp(),
    # layout.Columns(),
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
]

widget_defaults = dict(
    font='DejaVu',
    fontsize=12,
    padding=3,
)
Exemplo n.º 29
0
keys.extend([
    Key([mod], 't', lazy.group['scratchpad'].dropdown_toggle('telegram')),
])

layouts = [
    layout.MonadTall(margin=0,
                     border_width=2,
                     border_focus="#66d9ef",
                     border_normal="#000000"),
    layout.Max(),
    layout.Stack(num_stacks=2),
    # Try more layouts by unleashing below layouts.
    # layout.Bsp(),
    # layout.Columns(),
    # layout.Matrix(),
    layout.MonadWide(),
    # layout.RatioTile(),
    # layout.Tile(),
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
    layout.Floating(),
]

colors = [
    ["#272822", "#272822"],  # panel background
    ["#75715e", "#71715e"],  # background for current screen tab
    ["#f8f8f2", "#f8f8f2"],  # font color for group names
    ["#f92672", "#f92672"],  # border line color for current tab
    ["#66d9ef", "#66d9ef"],  # border line color for other tab and odd widgets
    ["#ae81ff", "#ae81ff"],  # color for the even widgets
Exemplo n.º 30
0
 ),
 layout.Max(),
 layout.MonadTall(
     border_focus=COLORS.LIGHT_PRIMARY,
     border_normal=COLORS.DARK_PRIMARY,
     border_width=1,
     change_size=4,
     margin=3,
     single_border_width=0,
     single_margin=0,
 ),
 layout.MonadWide(
     border_focus=COLORS.LIGHT_PRIMARY,
     border_normal=COLORS.DARK_PRIMARY,
     border_width=1,
     change_size=4,
     margin=2,
     single_border_width=0,
     single_margin=0,
 ),
 layout.RatioTile(
     border_focus=COLORS.LIGHT_PRIMARY,
     border_normal=COLORS.DARK_PRIMARY,
     border_width=1,
     margin=1,
 ),
 layout.TreeTab(
     active_bg=COLORS.LIGHT_PRIMARY,
     active_fg=COLORS.DARK_FONT,
     bg_color=COLORS.BACKGROUND + f".{widget_trans + 1}",
     border_width=1,