Exemple #1
0
def create_gap(size=30):
    """
    Create a gap where qtile will avoid placing windows.

    size - The "thickness" of the gap, i.e. the height of a horizontal gap,
    or the width of a vertical gap.
    """

    return bar.Gap(size)
Exemple #2
0
def create_screen(n, *args, **kwargs):
    values = {}
    if theme.top_bar and top_bars:
        values["top"] = top_bars.pop(0)
    if theme.bottom_bar and bottom_bars:
        values["bottom"] = bottom_bars.pop(0)

    if n == 0 and not theme.top_bar and not theme.bottom_bar:
        theme["bottom"] = default_bar

    if "top" not in values and "bottom" not in values:
        values["top"] = bar.Gap(24)
    values.update(kwargs)
    return Screen(*args, **values)
Exemple #3
0
def init_screens():
    return [
        Screen(top=bar.Bar(init_widgets_screen1(), 32, margin=[0, -4, 21, -4]),
               bottom=bar.Gap(18),
               left=bar.Gap(18),
               right=bar.Gap(18)),
        Screen(top=bar.Bar(init_widgets_screen1(), 32, margin=[0, -4, 21, -4]),
               bottom=bar.Gap(18),
               left=bar.Gap(18),
               right=bar.Gap(18))
    ]
Exemple #4
0
def init_screens():
    return [
        Screen(
            top=bar.Bar(widgets=init_widgets_list(),
                        size=40,
                        opacity=1,
                        margin=[0, 0, 10, 0]),
            left=bar.Gap(3),
            right=bar.Gap(3),
            bottom=bar.Gap(10),
        ),
        Screen(
            top=bar.Bar(
                widgets=init_widgets_list_secondary(),
                size=40,
                opacity=1,
            ),
            left=bar.Gap(3),
            right=bar.Gap(3),
            bottom=bar.Gap(10),
        ),
    ]
Exemple #5
0
def init_screens():
    return [Screen(bottom=bar.Gap(size=35), top=bar.Gap(size=35))]
                 background=colors[1],
                 foreground=colors[0],
                 format="%m/%d %A %H:%M:%S",
                 fontsize=text_size,
             ),
             widget.Sep(
                 background=colors[1],
                 linewidth=0,
                 padding=25,
                 size_percent=50,
             ),
         ],
         50,
         margin=[0, -10, 5, -10],
     ),
     bottom=bar.Gap(5),
     left=bar.Gap(5),
     right=bar.Gap(5),
 ),
 Screen(
     wallpaper="~/Pictures/qtile/wallpaper.png",
     wallpaper_mode="fill",
     top=bar.Bar(
         [
             widget.Sep(
                 linewidth=0,
                 background=colors[1],
                 padding=30,
                 size_percent=40,
             ),
             widget.TextBox(
Exemple #7
0
            fontsize=23,
            padding=0,
        ), )
    for widget_type, kwargs in widget_group:
        widgets.append(
            widget_type(background=COLOR, foreground=COLORS["hlfg"], **kwargs))

screens = [
    Screen(
        top=bar.Bar(
            widgets=widgets,
            opacity=0.86,
            size=24,
            margin=[0, 0, 3, 0],
        ),
        bottom=bar.Gap(3),
        left=bar.Gap(3),
        right=bar.Gap(3),
    )
]

# Set up layouts and groups
layout_theme = {
    "border_width": 3,
    "margin": 2,
    "border_focus": COLORS["hl1"],
    "border_normal": COLORS["bg"],
    "ratio": 0.5,
}

layouts = [
                sep,
                emoji_volume,
                text_volume,
                sep,
                clock,
                sep,
                power,
                sep,
                systray,
            ],
            30,
            margin=[0, 0, 5, 0],
            background="#000000.0",
            opacity=1.0,
        ),
        left=bar.Gap(size=5),
        right=bar.Gap(size=5),
        bottom=bar.Gap(size=5),
    ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position(),
         desc="Move window"),
    Drag([mod],
         "Button3",
         lazy.window.set_size_floating(),
Exemple #9
0
    widget.Spacer(background=color_lightwhite, length=6),  # +0
    widget.TextBox(background=color_lightwhite,
                   foreground=color_black,
                   text=' ',
                   padding=0),
    widget.Clock(background=color_lightwhite,
                 foreground=color_black,
                 padding=0,
                 format='%H:%M',
                 mouse_callbacks={'Button1': toggle_calcurse}),
    widget.Spacer(background=color_lightwhite, length=9)
]

screens = [
    Screen(top=bar.Bar(widgets_primary_display, 20),
           bottom=bar.Gap(0),
           left=bar.Gap(0),
           right=bar.Gap(0)),
    Screen(top=bar.Bar(widgets_secondary_display, 20),
           bottom=bar.Gap(0),
           left=bar.Gap(0),
           right=bar.Gap(0)),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
Exemple #10
0
                        ),
                widget.Sep(
                    padding = 6,
                    linewidth = 0,
                    background = ColorH,
                    foreground = ColorH,
                ),
                #widget.QuickExit(
                #background=ColorZ,
                #),
            ],
            31,
            margin=[10, 15, 5, 15],
            opacity=0.75,
        ),
        bottom=bar.Gap(18),
        left=bar.Gap(18),
        right=bar.Gap(18),
    ),
]

# Drag floating layouts.
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()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]

dgroups_key_binder = None
Exemple #11
0
def bottombar():
    return bar.Bar([
        widget.CPU(),
        widget.CPUGraph(),
    ],
                   24,
                   opacity=0.4,
                   margin=[10, 0, 0, 0])


screens = [
    Screen(top=topbar()),
    Screen(
        top=topbar(),
        left=bar.Gap(10),
        right=bar.Gap(10),
        bottom=bar.Gap(10),
    ),
]

# Drag floating layouts.
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()),
Exemple #12
0
def screen_nobar():
    return [Screen(top=bar.Gap(size=0))]
Exemple #13
0
        widget.Clock(format='%A, %d %b %Y %I:%M%p'),
        widget.Spacer(length=8),
        widget.QuickExit(padding=1,
                         foreground='fb4934',
                         default_text='[  ]',
                         countdown_format='[ {} ]'),
    ],
    30,
    margin=[4, 0, 0, 0],
    background='202020')

screens = [
    Screen(
        top=top_bar,
        bottom=bottom_bar,
        left=bar.Gap(size=8),
        right=bar.Gap(size=8),
    ),
]

#####! ADDITIONAL VARIABLES !#####

dgroups_key_binder = None
dgroups_app_rules = [
    Rule(Match(wm_type=[
        "confirm",
        "download",
        "notification",
        "toolbar",
        "splash",
        "dialog",
layouts = [
    layout.Max(**layout_theme),
    layout.Bsp(**layout_theme),
    layout.MonadTall(**layout_theme),
    layout.Stack(num_stacks=2)
]

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

screens = [Screen(bottom=bar.Gap(size=35), top=bar.Gap(size=35))]

# Drag floating layouts.
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()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]

dgroups_key_binder = simple_key_binder(mod)
Exemple #15
0
screens = [
    Screen(
        top=bar.Gap(
            #            [
            #                widget.CurrentLayout(),
            #                widget.GroupBox(
            #                    borderwidth=1,
            #                    rounded=False,
            #                    hide_unused=True
            #                    ),
            #                widget.Prompt(),
            #                widget.WindowName(),
            #                widget.Chord(
            #                    chords_colors={
            #                        'launch': ("#ff0000", "#ffffff"),
            #                    },
            #                    name_transform=lambda name: name.upper(),
            #                ),
            #                widget.TextBox("default config", name="default"),
            #                widget.TextBox("Press <M-r> to spawn", foreground="#d75f5f"),
            #                widget.Systray(),
            #                widget.Sep(),
            #                widget.Battery(charge_char='',discharge_char='',format='{char} {percent:2.0%} {hour:02d}:{min:02d}'),
            #                widget.Sep(),
            #                widget.Clock(font='Roboto Bold',fontsize=12,format='%a | %H:%M | %Y-%m-%d'),
            #                widget.QuickExit(),
            #            ],
            0, ), ),
    Screen()
]
Exemple #16
0
@hook.subscribe.startup
def autostart():
    script = os.path.expanduser("~/.config/qtile/launch.sh")
    subprocess.call([script])


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

screens = [
    Screen(wallpaper="~/Pictures/Wallpaper1-modified.jpg", top=bar.Gap(15))
]

# Drag floating layouts.
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()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]
Exemple #17
0
class FakeScreenConfig(Config):
    auto_fullscreen = True
    groups = [
        libqtile.config.Group("a"),
        libqtile.config.Group("b"),
        libqtile.config.Group("c"),
        libqtile.config.Group("d")
    ]
    layouts = [
        layout.Max(),
        layout.RatioTile(),
        layout.Tile(),
    ]
    floating_layout = libqtile.resources.default_config.floating_layout
    keys = []
    mouse = []
    fake_screens = [
        Screen(bottom=bar.Bar([
            widget.GroupBox(this_screen_border=CHAM3,
                            borderwidth=1,
                            fontsize=FONTSIZE,
                            padding=1,
                            margin_x=1,
                            margin_y=1),
            widget.AGroupBox(),
            widget.Prompt(),
            widget.Sep(),
            widget.WindowName(fontsize=FONTSIZE, margin_x=6),
            widget.Sep(),
            widget.CPUGraph(**GRAPH_KW),
            widget.MemoryGraph(**GRAPH_KW),
            widget.SwapGraph(foreground='20C020', **GRAPH_KW),
            widget.Sep(),
            widget.Clock(format='%H:%M:%S %d.%manager.%Y',
                         fontsize=FONTSIZE,
                         padding=6),
        ],
                              24,
                              background="#555555"),
               left=bar.Gap(16),
               right=bar.Gap(20),
               x=0,
               y=0,
               width=500,
               height=340),
        Screen(top=bar.Bar(
            [widget.GroupBox(),
             widget.WindowName(),
             widget.Clock()],
            30,
        ),
               bottom=bar.Gap(24),
               left=bar.Gap(12),
               x=500,
               y=0,
               width=300,
               height=380),
        Screen(top=bar.Bar(
            [widget.GroupBox(),
             widget.WindowName(),
             widget.Clock()],
            30,
        ),
               bottom=bar.Gap(16),
               right=bar.Gap(40),
               x=0,
               y=340,
               width=450,
               height=220),
        Screen(top=bar.Bar(
            [widget.GroupBox(),
             widget.WindowName(),
             widget.Clock()],
            30,
        ),
               left=bar.Gap(20),
               right=bar.Gap(24),
               x=450,
               y=380,
               width=350,
               height=220),
    ]
    screens = []
Exemple #18
0
extension_defaults = widget_defaults.copy()
fake_screens = [
    Screen(bottom=bar.Bar([
        widget.Prompt(),
        widget.Sep(),
        widget.WindowName(),
        widget.Sep(),
        widget.Systray(),
        widget.Sep(),
        widget.Volume(),
        widget.Sep(),
        widget.Clock(format='%H:%M:%S %d.%m.%Y')
    ],
                          40,
                          background="#282828"),
           right=bar.Gap(5),
           x=0,
           y=0,
           width=2060,
           height=1440),
    Screen(bottom=bar.Bar(
        [widget.GroupBox(),
         widget.WindowName(),
         widget.Clock()],
        40,
    ),
           left=bar.Gap(5),
           x=2060,
           y=0,
           width=1380,
           height=1440),