Пример #1
0
class WindowTabsConfig(Config):
    auto_fullscreen = True
    groups = [libqtile.config.Group("a"), libqtile.config.Group("b")]
    layouts = [layout.Stack()]
    floating_layout = libqtile.resources.default_config.floating_layout
    keys = []
    mouse = []
    fake_screens = [
        Screen(
            top=bar.Bar(
                [
                    widget.WindowTabs(),
                ],
                24,
            ),
            bottom=bar.Bar(
                [
                    widget.WindowTabs(selected="!!"),
                ],
                24,
            ),
            x=0,
            y=0,
            width=900,
            height=960,
        ),
    ]
    screens = []
Пример #2
0
class Bars(object):
    def __groupbox():
        """GroupBox widget to be used on all bars."""
        return widget.GroupBox(highlight_method="block",
                               this_current_screen_border=theme.colors["blue"],
                               this_screen_border=theme.colors["base6"],
                               inactive=theme.colors["base6"],
                               active=theme.colors["fg"])

    left = bar.Bar(
        widgets=[
            __groupbox(),
            widget.CurrentLayout(),
            widget.Prompt(),
            widget.WindowTabs(),
            widget.TextBox("cpu: ", name="cpu"),
            widget.CPUGraph(),
            widget.TextBox(" mem:", name="mem"),
            widget.Memory(),
            widget.Systray(),
            widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
        ],
        size=24,
        background=[theme.colors["base0"]],
    )

    mid = bar.Bar(
        widgets=[
            __groupbox(),
            widget.Prompt(),
            widget.WindowTabs(),
            widget.CurrentLayout(),
            widget.Clock(format="%I:%M %p"),
        ],
        size=24,
        background=[theme.colors["base0"]],
    )

    right = bar.Bar(
        widgets=[
            __groupbox(),
            widget.Prompt(),
            widget.WindowTabs(),
            widget.CurrentLayout(),
            widget.Clock(format="%I:%M %p"),
        ],
        size=24,
        background=[theme.colors["base0"]],
    )
Пример #3
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0, padding=3),
        widget.CurrentScreen(
            active_text="◉",
            active_color=colors[3],
            inactive_text="◉",
            inactive_color=colors[1],
            padding=2,
        ),
        widget.CurrentLayoutIcon(scale=0.57, padding=2),
        widget.GroupBox(
            margin_x=2,
            padding_y=2,
            padding_x=3,
            borderwidth=1,
            disable_drag=True,
            active=colors[5],
            inactive=colors[2],
            rounded=True,
            hide_unused=True,
            highlight_color=colors[1],
            highlight_method="border",
            this_current_screen_border=colors[2],
            this_screen_border=colors[4],
            other_current_screen_border=colors[1],
            other_screen_border=colors[1],
        ),
        widget.Sep(linewidth=0, padding=20),
        widget.WindowTabs(),
        widget.Sep(linewidth=0, padding=20),
        widget.Notify(audiofile=qtile_dir + "/.sounds/notify-sound.mp3"),
        widget.Sep(linewidth=0, padding=20),
        widget.Spacer(length=bar.STRETCH),
        widget.CheckUpdates(),
        widget.Sep(linewidth=0, padding=20),
        widget.Battery(
            discharge_char="-",
            charge_char="+",
            unknown_char="*",
            update_interval=30,
            format="{char}{percent:2.0%}",
        ),
        widget.Sep(linewidth=0),
        widget.Wlan(
            interface="wlp0s20f3",
            disconnected_message="W: N/A",
            format="{essid}",
        ),
        widget.Sep(linewidth=0),
        widget.Volume(),
        widget.Sep(linewidth=0),
        widget.Clock(format="%a, %H:%M (%d/%m)", update_interval=60),
        widget.Sep(linewidth=0),
    ]
    return widgets_list
Пример #4
0
 def init_widgets_list(self):
     '''
     Function that returns the desired widgets in form of list
     '''
     widgets_list = [
         widget.Sep(linewidth=0,
                    padding=6,
                    foreground=self.colors[2],
                    background=self.colors[0]),
         widget.CurrentLayoutIcon(custom_icon_paths=[
             os.path.expanduser("~/.config/qtile/icons")
         ],
                                  background=self.colors[0],
                                  padding=0,
                                  scale=0.75),
         widget.Sep(linewidth=0,
                    padding=5,
                    foreground=self.colors[2],
                    background=self.colors[0]),
         widget.GroupBox(font="JetBrains Mono",
                         fontsize=12,
                         margin_y=3,
                         margin_x=0,
                         padding_y=5,
                         padding_x=3,
                         borderwidth=3,
                         active=self.colors[2],
                         inactive=self.colors[1],
                         rounded=False,
                         highlight_method="block",
                         urgent_alert_method='block',
                         urgent_border=self.colors[9],
                         this_current_screen_border=self.colors[9],
                         this_screen_border=self.colors[4],
                         other_current_screen_border=self.colors[0],
                         other_screen_border=self.colors[0],
                         foreground=self.colors[2],
                         background=self.colors[0],
                         disable_drag=False),
         widget.Sep(linewidth=0,
                    padding=5,
                    foreground=self.colors[2],
                    background=self.colors[0]),
         widget.WindowTabs(
             foreground=self.colors[6],
             background=self.colors[0],
             padding=0,
         ),
         widget.TextBox(text='',
                        foreground=self.colors[14],
                        background=self.colors[0],
                        padding=0,
                        fontsize=37),
         widget.TextBox(text=" ",
                        foreground=self.colors[7],
                        background=self.colors[14],
                        padding=0,
                        fontsize=14),
         widget.TextBox(text=self.host,
                        foreground=self.colors[7],
                        background=self.colors[14],
                        padding=5,
                        fontsize=13),
         widget.TextBox(text='',
                        foreground=self.colors[11],
                        background=self.colors[14],
                        padding=0,
                        fontsize=37),
         widget.TextBox(text="  ",
                        foreground=self.colors[7],
                        background=self.colors[11],
                        padding=0,
                        fontsize=14),
         widget.KeyboardLayout(
             foreground=self.colors[7],
             background=self.colors[11],
         ),
         widget.TextBox(text='',
                        background=self.colors[11],
                        foreground=self.colors[10],
                        padding=0,
                        fontsize=37),
         widget.TextBox(
             text="   ",
             background=self.colors[10],
             padding=0,
             fontsize=14,
             mouse_callbacks={
                 'Button1':
                 lambda: qtile.cmd_spawn(self.kitty + ' -e sudo pacman -Syu'
                                         )
             },
         ),
         widget.CheckUpdates(
             update_interval=1000,
             mouse_callbacks={
                 'Button1':
                 lambda: qtile.cmd_spawn(self.kitty + ' -e sudo pacman -Syu'
                                         )
             },
             background=self.colors[10],
             display_format='{updates}',
             # colour_have_updates=self.colors[0],
             distro="Arch_checkupdates",
         ),
         widget.TextBox(text='',
                        foreground=self.colors[1],
                        background=self.colors[10],
                        padding=0,
                        fontsize=37),
         widget.TextBox(text="  ",
                        foreground=self.colors[7],
                        background=self.colors[1],
                        padding=0,
                        fontsize=18),
         widget.Clock(background=self.colors[1],
                      format="%A, %B %d - %H:%M "),
         widget.TextBox(text='',
                        foreground=self.colors[0],
                        background=self.colors[1],
                        padding=0,
                        fontsize=37),
         widget.TextBox(
             text="  ",
             background=self.colors[0],
             padding=0,
         ),
         widget.Volume(background=self.colors[0], padding=5),
         widget.Battery(
             background=self.colors[0],
             padding=5,
             update_interval=2,
             format='{char}  {percent:2.0%}  {hour:d}:{min:02d}',
             charge_char='CHR',
             discharge_char='DIS',
             empty_char='EMP',
             full_char='FUL',
             unknown_char='UNK',
         ),
         widget.Systray(background=self.colors[0], padding=5),
     ]
     return widgets_list
Пример #5
0
     inactive='#ffffff',
     fontsize=13,
     borderwidth=2,
     padding=1,
     this_current_screen_border='88bfff',
 ),
 widget.TextBox("[", fontsize=15, foreground='88bfff'),
 widget.TextBox("💤", fontsize=15, foreground='88bfff'),
 widget.Prompt(foreground='88bfff'),
 widget.CurrentLayout(foreground='88bfff', fontsize=16),
 widget.TextBox("]", fontsize=15, foreground='88bfff'),
 #widget.TextBox("🚦",fontsize=15,foreground='88bfff'),
 #widget.TextBox("💻",foreground='88bfff'),
 #widget.TextBox(text='♏',fontsize=15,foreground='bf2a2a'),
 widget.WindowTabs(selected=('[😃', ']'),
                   separator='🚦',
                   fontsize=15,
                   foreground='88bfff'),
 #widget.TextBox("default config", name="default"),
 #widget.Moc(),
 widget.TextBox("🚅", fontsize=16, foreground='eee9e9'),
 widget.Net(interface='enp0s3', foreground='88bfff'),
 widget.TextBox("🐻", fontsize=15, foreground='88bfff'),
 widget.CPUGraph(graph_color='88bfff',
                 border_color='88bfff',
                 border_width=1),
 #widget.MemoryGraph(graph_color='34e2e2',border_color='34e2e2',border_width=1),
 widget.TextBox("📅", fontsize=15, foreground='23e2e2'),
 widget.Clock(format='%Y-%m-%d[%a]', foreground='88bfff'),
 widget.TextBox("⏰", fontsize=15, foreground='fce94f'),
 widget.Clock(format='%I:%M:%S[%p]', foreground='88bfff'),
 widget.TextBox("💬", fontsize=15, foreground='23e2e2'),
Пример #6
0
                background=l_gray,
                foreground=black
            ),
            widget.Prompt(
                background=yellow,
                foreground=gray,
                padding=0
            ),
            widget.TextBox(
                text=u"[",
                background=black,
                foreground=gray,
                padding=0
            ),
            widget.WindowTabs(
                background=black,
                foreground=white
            ),
            widget.TextBox(
                text=u"]",
                background=black,
                foreground=white,
                padding=0
            ),
            widget.TextBox("C", background=black, foreground=white),
            widget.CPUGraph(border_width=0, line_width=1, background=black),

            widget.TextBox("M", background=black, foreground=white),
            widget.MemoryGraph(border_width=0, line_width=1, background=black),

            # widget.TextBox('B:', background=orange, foreground=black),
            widget.Battery(background=orange, foreground=black),
Пример #7
0
    fontshadow=SHADOW,
    highlight_method="block",
    this_current_screen_border=highlight,
    this_screen_border=highlight,
    urgent_alert_method="block",
    urgent_border="FF4847",
    urgent_text="FFFFFF",
    disable_drag=True,
    rounded=False,
    use_mouse_wheel=False,
)
window_count = widget.WindowCount(font_size=FONT_SIZE_MED, fmt="({})")
window_tabs = widget.WindowTabs(
    foreground="FFFFFF",
    fontshadow=SHADOW,
    font_size=FONT_SIZE_MED,
    max_chars=200,
    separator=" ⏽ ",
)
clock = widget.Clock(
    format=r"%d/%m %I:%M %p",
    foreground=colors.get("color1"),
    fontshadow=SHADOW,
    padding=PADDING,
)
# pylint: disable=unnecessary-lambda
spacer = lambda length: widget.Spacer(length)

main_screen_widgets = [
    group_box,
    spacer(4),
Пример #8
0
    ]

    #Set groups
    groups = [
        Group("Web"),
        Group("Code"),
        Group("Files"),
        Group("GFX"),
        Group("Misc")
    ]

    #Set screens
    screens = [
        Screen(bottom=bar.Bar([
            widget.GroupBox(),
            widget.WindowTabs(),
            widget.Pacman(),
            widget.Notify(),
            widget.Battery(),
            widget.Clock(format="%H:%M:%S"),
            widget.Sep(
                linewidth=0,
                padding=5,
            ),
            widget.Systray(padding=5),
        ], 30))
    ]

    #Set keybindings
    keys = [
        Key([mod], 'm',
Пример #9
0
    )
]

if num_screens() == 2:
    screens.append(
        Screen(bottom=bar.Bar([
            widget.GroupBox(highlight_method="block",
                            this_current_screen_border=colors["blue"],
                            active=colors["greyfg"],
                            inactive=colors["lgrey"],
                            **style),
            widget.Sep(**sep),
            widget.CurrentLayout(**style),
            widget.Sep(**sep),
            widget.Prompt(),
            widget.WindowTabs(separator="    |    ", **style),
            widget.Systray(),
        ],
                              25,
                              background=colors["greybg"])))

# 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()),
Пример #10
0
#     layout.MonadTall(**border),
# ]
layouts = [
    layout.Max(border_width=2, border_focus='#ee0000'),  # 默认最大化布局
    layout.Stack(stacks=2, border_width=2,
                 border_focus='#ee0000')  # 设置每个屏幕最多显示的栈数(布局的窗口数目)
]

screens = [
    Screen(
        # 顶部
        top=bar.Bar(
            [
                widget.Prompt(),  # 输入命令
                widget.Sep(),
                widget.WindowTabs(),  # bugs
                #widget.WindowName(foreground = "a0a0a0",), # 当前窗口名称
                widget.Sep(),
                widget.Volume(foreground="70ff70"),  # 音量
                widget.Sep(),
                # 电量指示
                widget.Battery(
                    energy_now_file='charge_now',
                    energy_full_file='charge_full',
                    power_now_file='current_now',
                    update_delay=5,
                    foreground="7070ff",
                    charge_char=u'↑',
                    discharge_char=u'↓',
                ),
                widget.Sep(),