Exemplo n.º 1
0
def top():
    widgets = [widget.Sep(padding=10, foreground='000000'),
               glyph_backward(foreground=theme['colors']['color6']),
               widget.GroupBox(margin_x=0, background=theme['colors']['color6'], foreground=theme['colors']['color8'], this_current_screen_border=theme['colors']['color4'], highlight_method='block', rounded=False, use_mouse_wheel=False, center_aligned=True),   # selected color 4, text 8
               glyph_forward(background='000000', foreground=theme['colors']['color6']),
               widget.WindowName(),
               glyph_backward(background='000000', foreground=theme['colors']['color2']),
               widget.CurrentLayoutIcon(background=theme['colors']['color2']),
               glyph_forward(background=theme['colors']['color5'], foreground=theme['colors']['color2']),
               widget.Volume(emoji=True, background=theme['colors']['color5']),
               widget.Volume(emoji=False, background=theme['colors']['color5'])]
    widgets.extend(battery())
    widgets.extend([widget.Sep(padding=10, foreground='000000'),
                    widget.Sep(padding=10, foreground='000000'),
                    widget.Systray(),
                    widget.Clipboard(background=theme['colors']['color3']),
                    widget.TextBox(text='\uf073'),
                    widget.Clock(format='%a %H:%M %Y-%m-%d')])
    return widgets
Exemplo n.º 2
0
def get_bar():
    return bar.Bar([
        widget.GroupBox(font=font,
                        fontsize=fontsize,
                        active=foreground,
                        urgent_border=alert,
                        padding=0,
                        borderwidth=3,
                        margin_x=3,
                        margin_y=0),
        widget.Sep(),
        widget.CurrentLayout(**font_params),
        widget.Sep(),
        widget.WindowName(**font_params),
        Metrics(**font_params),
        widget.Systray(icon_size=15),
        widget.Sep(foreground="#000000"),
        widget.Clock(format="%c", **font_params),
    ], 20)
Exemplo n.º 3
0
def init_widgets_bottom():
    widgets_bottom = [
        widget.GroupBox(
            font="FuraMono Nerd",
            fontsize = 16,
            margin_y = 0,
            margin_x = 0,
            padding_y = 5,
            padding_x = 5,
            borderwidth = 1,
            spacing = 4,
            active = colors[2],
            inactive = colors[2],
            rounded = False,
            highlight_method = "block",
            this_current_screen_border = colors[1],
            this_screen_border = colors [4],
            other_current_screen_border = colors[0],
            other_screen_border = colors[0],
            foreground = colors[2],
            background = colors[0]
        ),
        widget.Spacer(
        ),
        widget.TextBox(
            font = "FuraMono Nerd",
            text = "",
            padding = 5,
            background = colors[0],
            fontsize = 14
        ),
        widget.Memory(
            fmt = '{MemUsed}M',
            update_interval = 1,
            background = colors[0]
        ),
        widget.TextBox(
            font = "FuraMono Nerd",
            text = "",
            foreground = colors[2],
            background = colors[0],
            padding = 5,
            fontsize = 14
        ),
        widget.ThermalSensor(
            foreground = colors[2],
            background = colors[0],
        ),
        widget.Sep(
            linewidth = 0,
            padding = 5,
            foreground = colors[0],
            background = colors[0]
        )]
    return widgets_bottom
Exemplo n.º 4
0
def test_padding_and_width(manager_nospawn, minimal_conf_noscreen):
    sep = widget.Sep(padding=5, linewidth=7)

    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([sep], 10))]

    manager_nospawn.start(config)
    topbar = manager_nospawn.c.bar["top"]

    w = topbar.info()["widgets"][0]
    assert w["width"] == 12
Exemplo n.º 5
0
def powerline(widgets=[],
              colors=theme.power_line_colors,
              separator_font=user.powerline_font):
    separator = {
        "powerline": "",
        "nerd": "",
        "unicode": "◀",
    }
    separator_size = {
        "powerline": 23,
        "nerd": 64,
        "unicode": 28,
    }
    separator_padding = {
        "powerline": 0,
        "nerd": -14,
        "unicode": -4,
    }
    w_container = []
    is_first_color_iteration = True

    for iw in range(len(widgets)):
        # Generate a looping color index
        ic = iw
        while ic >= len(colors):
            ic = ic - len(colors)
            is_first_color_iteration = False

        # Set the background color for the current segment
        current_color = colors[ic]

        # Set the background color for the preceding segment
        if ic != 0:
            previous_color = colors[ic - 1]
        else:
            if is_first_color_iteration:
                previous_color = theme.background
            else:
                previous_color = colors[len(colors) - 1]

        # Create a segment
        w_container.extend([
            widget.TextBox(
                text=separator[separator_font],
                foreground=current_color,
                background=previous_color,
                fontsize=separator_size[separator_font],
                padding=separator_padding[separator_font],
            ),
            *widgets[iw](current_color, theme.fg_dark),
            widget.Sep(linewidth=0, padding=4, background=current_color),
        ])

    return w_container
Exemplo n.º 6
0
def bar_widgets(colors):
    seperator = widget.Sep(linewidth=3,
                           padding=4,
                           foreground=colors["foreground"])
    return [
        widget.GroupBox(
            active=colors["foreground"],
            inactive=colors["foreground-alt"],
            highlight_method="line",
            highlight_color=colors["highlight"],
            this_current_screen_border=colors["underline"],
            urgent_border=colors["alert"],
        ),
        widget.Spacer(),
        seperator,
        playerctl_control("~/.config/qtile/icons/firefox.png", "firefox"),
        playerctl_control("~/.config/qtile/icons/youtubemusic.png",
                          "chromium"),
        seperator,
        widget.Image(filename="~/.config/qtile/icons/sound.png", margin=4),
        widget.PulseVolume(volume_app="pavucontrol", padding=4, fontsize=18),
        seperator,
        widget.Image(filename="~/.config/qtile/icons/network.png", margin=4),
        widget.Net(format="{down} ↓↑ {up}"),
        seperator,
        widget.Image(filename="~/.config/qtile/icons/memory.png", margin=4),
        widget.Memory(format="{MemUsed}M/{MemTotal}M"),
        seperator,
        widget.Image(filename="~/.config/qtile/icons/cpu.png", margin=4),
        widget.CPU(format="{freq_current}GHz {load_percent}%"),
        seperator,
        widget.Image(filename="~/.config/qtile/icons/temp.png", margin=4),
        widget.ThermalSensor(),
        seperator,
        widget.CurrentLayoutIcon(
            foreground=colors["underline"],
            custom_icon_paths=["~/.config/qtile/icons/layouts/"],
            padding=5),
        seperator,
        widget.Clock(
            foreground=colors["foreground"],
            format="%A, %B %d - %H:%M",
        ),
        seperator,
        widget.Systray(icon_size=24, padding=5),
        seperator,
        system_action("~/.config/qtile/icons/notification-resume.png",
                      "notify-send \"DUNST_COMMAND_TOGGLE\""),
        system_action("~/.config/qtile/icons/restart.png", "systemctl reboot"),
        system_action("~/.config/qtile/icons/suspend.png", "dm-tool lock"),
        system_action("~/.config/qtile/icons/shutdown.png",
                      "systemctl poweroff"),
    ]
Exemplo n.º 7
0
def powerline_arrow(direction, color1, color2):
    if direction == "r":
        return [
            widget.TextBox(
                text=u"\ue0b0",
                foreground=color1,
                background=color2,
                fontsize=panel_height,
            ),
            widget.Sep(padding=5, linewidth=0, background=color2),
        ]
    else:
        return [
            widget.Sep(padding=14, linewidth=0, background=color1),
            widget.TextBox(
                text=u"\ue0b2",
                foreground=color2,
                background=color1,
                fontsize=panel_height,
            ),
        ]
Exemplo n.º 8
0
def widget_stack():
    gmail_config = {
        'update_interval': 50,
        'fmt': 'in[%s] unread(%s)',
        **get_gmail_config()
    }
    return [
        widget.CurrentScreen(),
        widget.GroupBox(),
        widget.Prompt(),
        widget.TaskList(),
        widget.GmailChecker(**gmail_config),
        widget.Sep(),
        widget.CheckUpdates(),
        widget.Sep(),
        widget.Wlan(interface=auto_detect_interface()),
        widget.Sep(),
        widget.DF(visible_on_warn=False, format="Disk free {r:.1f}%"),
        widget.Sep(),
        widget.CPUGraph(),
        widget.Memory(),
        widget.Sep(),
        widget.Battery(update_interval=1, format="🔋 {char} {percent:2.0%}"),
        widget.Sep(),
        widget.Systray(),
        widget.Notify(),
        widget.Clock(),
        widget.CurrentLayoutIcon(),
    ]
Exemplo n.º 9
0
def workspaces():
    return [
        widget.Sep(**separator(),
        **base(bg='bg')),
        widget.GroupBox(**group_box),
        widget.Image(
            filename=img['gb-dark']
        ),
        widget.Image(
            filename=img['testgb']
        ),
        widget.WindowName(**window_name,format='{class} @mrmango1')
    ]
Exemplo n.º 10
0
def gen_bar():
    return bar.Bar(
        [
            widget.CPUGraph(),
            widget.NetGraph(),
            GroupBoxWidget(inactive='606060',
                           highlight_method='block',
                           other_screen_border='214458'),
            widget.Prompt(),
            widget.WindowName(),
            widget.CurrentLayout(),
            widget.Sep(padding=5, linewidth=0),
            widget.Systray(),
        ] + ([
            BatteryWidget(),
        ] if HOSTNAME == 'saya' else []) + [
            widget.Sep(padding=5, linewidth=0),
            widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
            #widget.DebugInfo(),
        ],
        BAR_HEIGHT,
    )
Exemplo n.º 11
0
def init_widgets():
    widgets = [
	widget.Sep(linewidth = 2, padding = 6),
	widget.Image(filename="~/.config/qtile/icons/python.png"),
        CurrentLayoutIcon(scale=0.6, padding=8),
        GroupBox(fontsize=8, padding=4, borderwidth=1, urgent_border="6272a4",
                 disable_drag=True, highlight_method="block",
                 this_screen_border="6272a4", other_screen_border="ff5555",
                 this_current_screen_border="8be9fd",
                 other_current_screen_border="ffb86c"),
        widget.Prompt(),    
        widget.WindowName(),
        widget.Systray(),
        Notify(fmt=" 🔥 {} "),
        widget.Sep(linewidth = 2, padding = 6),
        widget.BitcoinTicker(format="BTC: {avg}", **widget_defaults),
        #PulseVolume(fmt=" {}", emoji=True, volume_app="pavucontrol"),
        #PulseVolume(volume_app="pavucontrol"),
        Clock(format=" ⏱ %H:%M  <span color='#666'>%A %d-%m-%Y</span>"),
        widget.Sep(linewidth = 2, padding = 6),
        ]
    return widgets
Exemplo n.º 12
0
def topbar_widgets():
    widgets = []

    widgets.extend([
        widget.CurrentLayoutIcon(
            padding=0,
            scale=0.6,
        ),
        widget.GroupBox(
            disable_drag=True,
            spacing=2,
        ),
        widget.Sep(
            padding=8,
            size_percent=100,
        ),
        widget.Prompt(record_history=False, ),
        widget.TaskList(
            spacing=2,
            max_title_width=200,
            txt_floating='🗗 ',
            txt_maximized='🗖 ',
            txt_minimized='🗕 ',
        ),
        widget.PulseVolume(),
    ])

    if Path('/sys/class/power_supply/BAT0').exists():
        widgets.extend([
            widget.Battery(
                format=
                '<span size="8000" rise="1550">{char}</span>{percent:.0%}',
                charge_char='🡱 ',
                discharge_char='🡳 ',
                empty_char='',
                full_char='',
                unknown_char='',
            ),
        ])

    widgets.extend([
        widget.Spacer(length=4, ),
        widget.Clock(
            padding=0,
            format='%I:%M%p %d/%m/%Y',
        ),
        widget.Systray(padding=4, ),
        widget.Spacer(length=4, ),
    ])

    return widgets
Exemplo n.º 13
0
def create_default_bar():
    return bar.Bar(
        [
            widget.CurrentLayout(),
            widget.GroupBox(),
            widget.Prompt(),
            widget.Spacer(),
            widget.Chord(
                chords_colors={
                    "launch": ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.Sep(),
            widget.Wlan(
                interface="wlp111s0",
                format="{essid} {percent:2.0%}",
            ),
            widget.Sep(),
            widget.TextBox("Battery: "),
            widget.Battery(update_interval=5),
            widget.Sep(),
            widget.GenPollText(func=volume_poll, update_interval=1),
            widget.Sep(),
            widget.TextBox("Brightness: "),
            widget.Backlight(
                brightness_file=
                "/sys/class/backlight/intel_backlight/brightness",
                max_brightness_file=
                "/sys/class/backlight/intel_backlight/max_brightness",
            ),
            widget.Sep(),
            widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
            widget.QuickExit(),
            widget.Systray(),
        ],
        24,
    )
Exemplo n.º 14
0
def get_bar():
    return bar.Bar(
        [
            widget.CurrentScreen(),
            widget.Sep(),
            widget.GroupBox(disable_drag=True),
            widget.Sep(),
            widget.CurrentLayout(),
            widget.Sep(),
            widget.Chord(
                chords_colors={
                    'launch': ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.Prompt(),
            widget.TaskList(),
            widget.BatteryIcon(battery=1),
            #widget.Systray(),
            widget.Clock(format='%a %d %b %H:%M '),
        ],
        24,
    )
Exemplo n.º 15
0
def get_bar():
    return bar.Bar(
        [
            widget.GroupBox(font=font,
                            fontsize=fontsize,
                            active=foreground,
                            urgent_border=alert,
                            padding=0,
                            borderwidth=3,
                            margin_x=3,
                            margin_y=0),
            widget.Sep(),
            widget.CurrentLayout(**font_params),
            widget.Sep(),
            widget.WindowName(**font_params),
            Metrics(**font_params),
            #widget.Battery(format="bat:{percent:2.0%}{char}", charge_char='⬆',
            #               discharge_char='⬇', update_interval=5, **font_params),
            widget.Systray(icon_size=15),
            widget.Sep(foreground="#000000"),
            widget.Clock(format="%c", **font_params),
        ],
        20)
Exemplo n.º 16
0
def get_bar():
    return bar.Bar([
        widget.GroupBox(font=font,
                        fontsize=12,
                        active=foreground,
                        urgent_border=alert,
                        padding=1,
                        borderwidth=3,
                        margin_x=3,
                        margin_y=-2),
        widget.Sep(),
        widget.CurrentLayout(font=font, foreground=foreground),
        widget.Sep(),
        widget.WindowName(font=font, foreground=foreground),
        widget.Mpris(name='deadbeef',
                     objname='org.mpris.deadbeef',
                     font=font,
                     fontsize=12,
                     foreground="#9090A0"),
        Metrics(font=font, fontsize=12, foreground="#A0A090"),
        widget.Systray(icon_size=15),
        widget.Clock(font=font, foreground=foreground),
    ], 15)
Exemplo n.º 17
0
def colorized(widgets=[], colors=theme.power_line_colors, separator_gap=8):
    w_container = []
    is_first_color_iteration = True

    for iw in range(len(widgets)):
        # Generate a looping color index
        ic = iw
        while ic >= len(colors):
            ic = ic - len(colors)
            is_first_color_iteration = False

        # Set the background color for the current segment
        current_color = colors[ic]

        # Set the background color for the preceding segment
        if ic != 0:
            previous_color = colors[ic - 1]
        else:
            if is_first_color_iteration:
                previous_color = theme.background
            else:
                previous_color = colors[len(colors) - 1]

        # Create a segment
        w_container.extend([
            widget.Sep(linewidth=0,
                       padding=separator_gap,
                       background=theme.background),
            *widgets[iw](theme.background, current_color),
        ])

    # Create an extra gap after the widget
    w_container.extend([
        widget.Sep(linewidth=0, padding=4, background=theme.background),
    ])

    return w_container
Exemplo n.º 18
0
def set_widgets():
    sep = widget.Sep(
        linewidth=0,
        padding=50,
    )
    widgets = [
        widget.CurrentLayoutIcon(
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.CurrentLayout(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.Chord(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.GroupBox(
            active=fairyfloss[10],  # Active window font color
            highlight_method="block",
            inactive=fairyfloss[0],  # Inactive window font color
            other_current_screen_border=fairyfloss[9],
            other_screen_border=fairyfloss[9],
            this_current_screen_border=fairyfloss[15],  # Active and focused
            this_screen_border=fairyfloss[9],
        ),
        sep,
        widget.Spacer(length=bar.STRETCH),
        widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
        widget.Systray(),
        widget.Battery(
            format="{percent:2.0%}",
            low_percentage=0.1,
            notify_below=0.1,
        ),
        widget.QuickExit(
            countdown_start=10,
            default_text="[ Logout ]",
        ),
        widget.Wallpaper(
            directory=home + '/Media/Pictures/Wallpapers/kawaii',
            random_selection=True,
            fmt="",
        )
    ]
    return widgets
Exemplo n.º 19
0
def init_widgets_list1():
    widgets_list = left_widgets() + [
        widget.TaskList(background=colors[0], border=colors[0]),
        widget.Net(interface="enp0s3",
                   fmt="{:>20}",
                   format='{down} ↓↑ {up}',
                   foreground=colors[2],
                   background=colors[0],
                   mouse_callbacks={
                       'Button1': lambda qtile: qtile.cmd_spawn("stacer")
                   },
                   padding=0),
        sep_widget,
        widget.CPU(background=colors[0], max_chars=15),
        sep_widget,
        widget.Memory(foreground=colors[2],
                      background=colors[0],
                      mouse_callbacks={
                          'Button1': lambda: qtile.cmd_spawn('kitty -e htop')
                      },
                      padding=5),
        sep_widget,
        widget.TextBox(text=" Vol:",
                       foreground=colors[2],
                       background=colors[0],
                       padding=0),
        widget.Volume(foreground=colors[2], background=colors[0], padding=5),
        sep_widget,
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[0],
            background=colors[0],
            padding=0,
            scale=-1.7),
        widget.CurrentLayout(
            foreground=colors[2], background=colors[0], padding=2),
        sep_widget,
        widget_clock,
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[0],
                   background=colors[0]),
        widget.Systray(background=colors[0], padding=0),
    ]
    return widgets_list
Exemplo n.º 20
0
def init_widgets_list_secondary():
    widgets_list = [
        widget.Spacer(length=2, background=colors[0]),
        # Left Side of the bar
        widget.GroupBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            foreground=colors[2],
            background=colors[0],
            borderwidth=15,
            highlight_method="text",
            this_current_screen_border=colors[5],
            active=colors[3],
            inactive=colors[4],
        ),
        widget.Sep(linewidth=3, margin=5, background=colors[0]),
        tasklist2,
        widget.TextBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            text=" ",
            foreground=colors[5],
            background=colors[0],
        ),
        widget.CurrentLayout(foreground=colors[2], background=colors[0]),
        widget.Spacer(length=bar.STRETCH, background=colors[0]),
        widget.TextBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            text="⏻ ",
            foreground=colors[5],
            background=colors[0],
            mouse_callbacks={
                "Button1": lambda: qtile.cmd_spawn("shutdown -h now")
            },
        ),
        widget.Spacer(length=10, background=colors[0])
        # Right side of Bar
    ]
    return widgets_list
Exemplo n.º 21
0
def init_widgets():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets = [
        widget.Prompt(prompt=prompt,
                      font="DejaVu Sans Mono",
                      padding=10,
                      background=colors[1]),
        widget.TextBox(text="◤ ",
                       fontsize=45,
                       padding=-8,
                       foreground=colors[1],
                       background=colors[2]),
        widget.GroupBox(fontsize=8,
                        padding=4,
                        borderwidth=1,
                        this_current_screen_border=colors[0]),
        widget.TextBox(text="◤",
                       fontsize=45,
                       padding=-1,
                       foreground=colors[2],
                       background=colors[1]),
        widget.TaskList(borderwidth=1,
                        background=colors[1],
                        border=colors[0],
                        urgent_border=colors[0]),
        widget.Systray(background=colors[1]),
        widget.TextBox(text="◤",
                       fontsize=45,
                       padding=-1,
                       foreground=colors[1],
                       background=colors[2]),
        widget.TextBox(text=" ↯", foreground=colors[0], fontsize=14),
        widget.Battery(update_delay=5),
        widget.TextBox(text=" ⌚", foreground=colors[0], fontsize=18),
        widget.Clock(fmt="%a %d-%m-%Y %H:%M")
    ]
    if DEBUG:
        widgets += [widget.Sep(), widget.CurrentLayout()]
    return widgets
Exemplo n.º 22
0
    ["#a1efe4", "#a1efe4"]
]  # window name

##### DEFAULT WIDGET SETTINGS #####
widget_defaults = dict(font='Noto Sans',
                       fontsize=12,
                       padding=3,
                       background=colors[0])

extension_defaults = widget_defaults.copy()

screens = [
    Screen(top=bar.Bar(
        [
            widget.Sep(linewidth=0,
                       padding=6,
                       foreground=colors[2],
                       background=colors[0]),
            widget.GroupBox(this_current_screen_border="#66d9ef",
                            this_screen_border="#66d9ef"),
            widget.Prompt(),
            widget.WindowName(),
            widget.Chord(
                chords_colors={
                    'launch': ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.CurrentLayout(),
            widget.Systray(),
            widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
        ],
Exemplo n.º 23
0
def separator():
    return widget.Sep(**base(), linewidth=0, padding=5)
Exemplo n.º 24
0
)

extension_defaults = widget_defaults.copy()

screens = []
for screen in range(0, num_screens):
    screens.append(
        Screen(
            top=bar.Bar(
                [
                    widget.GroupBox(disable_drag=True),
                    # widget.Prompt(),
                    # widget.WindowName(),
                    widget.TaskList(),
                    widget.Systray(),
                    widget.Sep(linewidth=2, padding=2),
                    widget.TextBox("­ЪДа"),
                    widget.Memory(),
                    widget.Sep(linewidth=2, padding=2),
                    widget.TextBox("­ЪќЦ№ИЈ"),
                    widget.ThermalSensor(tag_sensor="Package id 0"),
                    widget.Sep(linewidth=2, padding=2),
                    widget.TextBox("­ЪЊХ"),
                    widget.Net(interface=["wlo1"],
                               update_interval=10,
                               format='{down}РєЊРєЉ{up}'),
                    widget.Sep(linewidth=2, padding=2),
                    widget.TextBox("­ЪЊй№ИЈ"),
                    widget.ThermalSensor(tag_sensor="temp1"),
                    widget.Sep(linewidth=2, padding=2),
                    #widget.TextBox("­ЪћІ"),
Exemplo n.º 25
0
            [
                # widget.CurrentLayout(),
                widget.GroupBox(),
                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 &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.Systray(),
                widget.Net(),
                widget.Sep(),
                widget.Memory(),
                widget.Sep(),
                widget.Battery(
                    format='{char} {percent:2.0%} {hour:d}:{min:02d}'),
                widget.Sep(),
                widget.Clock(format='%d/%m/%y %a %I:%M'),
                widget.Sep(),
                widget.Volume()
            ],
            20,
        ), ),
]

# Drag floating layouts.
mouse = [
Exemplo n.º 26
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors['color7'],
                   background=colors['color0']),
        widget.GroupBox(font="Cantarell Bold",
                        fontsize=10,
                        margin_y=3,
                        margin_x=0,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active=colors['color5'],
                        inactive=colors['color7'],
                        rounded=False,
                        highlight_color=colors['color0'],
                        highlight_method="line",
                        this_current_screen_border=colors['color5'],
                        this_screen_border=colors['color5'],
                        foreground=colors['color7'],
                        background=colors['color0']),
        widget.Sep(
            linewidth=0,
            padding=30,
            foreground=colors['color7'],
        ),
        widget.WindowName(foreground=colors['color4'],
                          font='Inconsolata Bold',
                          fontsize='15',
                          padding=2),
        widget.Systray(padding=5, margin=5, fontsize=12),
        widget.Sep(
            linewidth=0,
            padding=6,
        ),
        widget.TextBox(text="🌡️", padding=2, fontsize=12),
        widget.ThermalSensor(threshold=90, padding=5),
        widget.Sep(linewidth=0, padding=5),
        widget.TextBox(text="🧠", padding=0, fontsize=14),
        widget.CPU(format='{freq_current}GHz {load_percent}%', padding=5),
        widget.Sep(
            linewidth=0,
            padding=6,
        ),
        widget.TextBox(text="💽", padding=0, fontsize=14),
        widget.Memory(mouse_callbacks={
            'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')
        },
                      format='{MemUsed: .0f}{mm}/{MemTotal: .0f}{mm}',
                      measure_mem='M',
                      padding=5),
        widget.Sep(
            linewidth=0,
            padding=6,
        ),
        widget.TextBox(text="🔉", padding=0),
        widget.PulseVolume(padding=5,
                           mouse_callbacks={
                               'Button1':
                               lambda: qtile.cmd_spawn('pavucontrol')
                           }),
        widget.Sep(
            linewidth=0,
            padding=6,
        ),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(padding=5),
        widget.Sep(
            linewidth=0,
            padding=6,
        ),
        widget.Clock(format="📅 %A, %B %d 🕒 %H:%M "),
    ]
    return widgets_list
Exemplo n.º 27
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.GroupBox(font="FontAwesome",
                        fontsize=16,
                        margin_y=3,
                        margin_x=0,
                        padding_y=6,
                        padding_x=10,
                        borderwidth=0,
                        disable_drag=True,
                        active=colors[9],
                        inactive=colors[5],
                        rounded=False,
                        highlight_method="text",
                        this_current_screen_border=colors[8],
                        foreground=colors[2],
                        background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.CurrentLayout(font="Noto Sans Bold",
                             foreground=colors[5],
                             background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.WindowName(
            font="Noto Sans",
            fontsize=12,
            foreground=colors[5],
            background=colors[1],
        ),
        # widget.Net(
        #          font="Noto Sans",
        #          fontsize=12,
        #          interface="enp0s31f6",
        #          foreground=colors[2],
        #          background=colors[1],
        #          padding = 0,
        #          ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # widget.NetGraph(
        #          font="Noto Sans",
        #          fontsize=12,
        #          bandwidth="down",
        #          interface="auto",
        #          fill_color = colors[8],
        #          foreground=colors[2],
        #          background=colors[1],
        #          graph_color = colors[8],
        #          border_color = colors[2],
        #          padding = 0,
        #          border_width = 1,
        #          line_width = 1,
        #          ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # # do not activate in Virtualbox - will break qtile
        # widget.ThermalSensor(
        #          foreground = colors[5],
        #          foreground_alert = colors[6],
        #          background = colors[1],
        #          metric = True,
        #          padding = 3,
        #          threshold = 80
        #          ),
        # # battery option 1  ArcoLinux Horizontal icons do not forget to import arcobattery at the top
        # # battery option 2  from Qtile
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # widget.Battery(
        #          font="Noto Sans",
        #          update_interval = 10,
        #          fontsize = 12,
        #          foreground = colors[5],
        #          background = colors[1],
        #          ),
        # widget.TextBox(
        #          font="FontAwesome",
        #          text="  ",
        #          foreground=colors[6],
        #          background=colors[1],
        #          padding = 0,
        #          fontsize=16
        #          ),
        # widget.CPUGraph(
        #          border_color = colors[2],
        #          fill_color = colors[8],
        #          graph_color = colors[8],
        #          background=colors[1],
        #          border_width = 1,
        #          line_width = 1,
        #          core = "all",
        #          type = "box"
        #          ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # widget.TextBox(
        #          font="FontAwesome",
        #          text="  ",
        #          foreground=colors[4],
        #          background=colors[1],
        #          padding = 0,
        #          fontsize=16
        #          ),
        # widget.Memory(
        #          font="Noto Sans",
        #          format = '{MemUsed}M/{MemTotal}M',
        #          update_interval = 1,
        #          fontsize = 12,
        #          foreground = colors[5],
        #          background = colors[1],
        #         ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        widget.TextBox(font="FontAwesome",
                       text="  ",
                       foreground=colors[3],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=14,
                     format="%d-%m-%Y"),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.Systray(background=colors[1], icon_size=24, padding=15),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        arcobattery.BatteryIcon(padding=0,
                                scale=0.7,
                                y_poss=2,
                                theme_path=home +
                                "/.config/qtile/icons/battery_icons_horiz",
                                update_interval=5,
                                background=colors[1]),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=16,
                     font="Noto Sans Bold",
                     format="%H:%M"),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
    ]
    return widgets_list
Exemplo n.º 28
0
def init_widgets_list():
    widgets_list = [
        widget.Image(filename="~/.config/qtile/icons/trioptimum-logo.png",
                     margin=2,
                     margin_x=5),
        widget.Sep(linewidth=0,
                   padding=5,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.GroupBox(
            font="Ubuntu Bold",
            #fontsize = 12,
            margin_x=0,
            margin_y=2,
            padding_x=8,
            padding_y=8,
            borderwidth=1,
            active=colors["white"],
            inactive=colors["white"],
            highlight_method="block",
            rounded=False,
            this_current_screen_border=colors["purple"],
            this_screen_border=colors["dark_grey"],
            other_current_screen_border=colors["black_grey"],
            other_screen_border=colors["black_grey"],
            foreground=colors["white"],
            background=colors["black_grey"]),
        widget.Prompt(prompt="{0}@{1}: ".format(os.environ["USER"],
                                                socket.gethostname()),
                      font="Ubuntu Mono",
                      padding=10,
                      foreground=colors["light_red"],
                      background=colors["dark_grey"]),
        widget.WindowName(foreground=colors["purple"]),
        widget.TextBox(background=colors["white"],
                       foreground=colors["black_grey"],
                       text="SkrivRoot-MAIN",
                       name="default"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.Image(filename="~/.config/qtile/icons/rj45.png",
                     margin=2,
                     margin_x=5),
        widget.Net(
            interface="wlp5s0",
            format='{down} ▼▲ {up}'  # format = '{interface}: {down} ▼▲ {up}'
        ),
        widget.TextBox(text="\U000027A4 VPN ", foreground="#33cc00"),
        # VPN Status + Public IP Country
        widget.GenPollText(func=get_vpn_status,
                           update_interval=5,
                           foreground="#33cc00"),
        widget.GenPollText(func=get_current_country,
                           update_interval=5,
                           foreground="#33cc00"),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/processor.png",
                     margin=2,
                     margin_x=5),
        widget.CPU(format='{load_percent}%'),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/ram.png",
                     margin=2,
                     margin_x=5),
        widget.Memory(foreground=colors["white"],
                      background=colors["black_grey"],
                      padding=5,
                      format='{MemUsed}Mb ({MemPercent}%)'),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/hard_drive.png",
                     margin=2,
                     margin_x=5),
        widget.DF(foreground=colors["white"],
                  background=colors["black_grey"],
                  padding=5,
                  partition='/',
                  format='{uf}Gb ({r:.0f}%)',
                  visible_on_warn=False,
                  warn_space=10),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),

        # Bitcoin ticker
        widget.BitcoinTicker(foreground="#f7931a"),

        # Monero ticker
        widget.GenPollText(func=xmr_ticker,
                           update_interval=30,
                           foreground="#fc6a03"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            background=colors["black_grey"],
            padding=0,
            scale=0.5),
        #widget.CurrentLayout(**widget_defaults),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.TextBox(text="\U0001F50B"),
        widget.Battery(format='{percent:2.0%}'),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),

        # Volume
        widget.TextBox(text="\U0001F50A"),
        widget.GenPollText(
            func=get_current_volume1,
            update_interval=0.2,
        ),
        widget.TextBox(text="\U0001F50A"),
        widget.GenPollText(
            func=get_current_volume2,
            update_interval=0.2,
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.TextBox(text="\u2328"),
        widget.GenPollText(
            func=get_kb_layout,
            update_interval=0.5,
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.Clock(
            format='📅  %a, %d %b. %Y - %H:%M:%S'),  # %S for adding seconds
    ]
    return widgets_list
Exemplo n.º 29
0
def init_screen1():
    return Screen(top=bar.Bar(
        widgets=[
            widget.CurrentLayoutIcon(
                scale=0.75,
                foreground=colors[3],
            ),
            widget.Sep(**widget_defaults),
            widget.GroupBox(active='#FFFF99',
                            inactive=colors[2],
                            urgent_alert_method='block',
                            highlight_method='block',
                            this_current_screen_border=colors[3],
                            this_screen_border=colors[0],
                            other_current_screen_border=colors[3],
                            other_screen_border=colors[0],
                            disable_drag=True,
                            spacing=0,
                            padding_x=6,
                            visible_groups=['a', 's', 'd', 'f'],
                            use_mouse_wheel=False,
                            **widget_defaults),
            widget.Sep(**widget_defaults),
            widget.Prompt(padding=10, ),
            widget.TaskList(
                border=colors[5],
                max_title_width=150,
                highlight_method='block',
                spacing=0,
                margin=0,
                padding_x=12,
                fontsize=14,
                txt_floating='[x]',
                icon_size=0,
                rounded=False,
            ),
            widget.Systray(
                background=colors[6],
                **widget_defaults,
            ),
            widget.BatteryIcon(
                theme_path='/home/xiangchong/.config/qtile/battery-icons/',
                background=colors[4],
                spacing=3,
                padding_x=6,
            ),
            widget.CPU(
                foreground=colors[3],
                background=colors[4],
                max_chars=12,
                format='CPU:{load_percent:02.0f}%;',
                spacing=0,
                padding_x=6,
            ),
            widget.Memory(
                foreground=colors[3],
                background=colors[4],
                max_chars=12,
                measure_mem='G',
                measure_swap='G',
                spacing=1,
                padding_x=6,
                format='Mem:{MemUsed:02.0f}{mm}/{MemTotal:.0f}{mm}',
            ),
            widget.Countdown(
                background=colors[6],
                date=datetime(2022, 4, 1),
                format='{D} Days;',
                update_interval=3600,
                # background = colors[1],
                foreground=colors[0],
                spacing=1,
                padding_x=6,
            ),
            widget.Clock(
                background=colors[6],
                foreground=colors[0],
                format="%a, %m-%d; %H:%M",
            ),
        ],
        opacity=.95,
        size=26,
        background='#12141a',
    ))
Exemplo n.º 30
0
        # mod1 + shift + letter of group = switch to & move focused window to group
        Key([mod, 'shift'], i.name, lazy.window.togroup(i.name)),
    ])

##### SCREENS #####

widget_defaults = dict(
    font='FiraMono Nerd',
    fontsize=12,
    padding=3,
    background=def_colors["background"],
    foreground=COLORS["Snow Storm"][2],
)
extension_defaults = widget_defaults.copy()

separator = copy(widget.Sep(linewidth=2))
arrow_left = dict(text='', fontsize=43, padding=0)
icons = dict(fontsize=22, padding=0)

screens = [
    Screen(top=bar.Bar([
        widget.CurrentLayoutIcon(),
        widget.GroupBox(invert_mouse_wheel=True), separator,
        widget.TaskList(
            font="FiraMono Bold",
            markup_focused="<b>{}</b>",
            txt_floating="🗗 ",
            txt_maximized="🗖 ",
            txt_minimized="🗕 ",
            border=COLORS["Polar Night"][3],
        ),