Exemple #1
0
def test_no_image(manager_nospawn, minimal_conf_noscreen, logger):
    img = widget.Image()

    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([img], 40))]

    manager_nospawn.start(config)

    assert "Image filename not set!" in logger.text
Exemple #2
0
def playerctl_control(icon, name):
    return widget.Image(
        filename=icon,
        margin=2,
        mouse_callbacks={
            "Button1":
            lambda _: subprocess.Popen(f"playerctl --player={name} play-pause",
                                       shell=True)
        })
Exemple #3
0
def powerline_base():
    return [
        widget.CurrentLayoutIcon(**base(bg='secondary'),
                                 **current_layout_icon),
        widget.CurrentLayout(**base(bg='secondary'), **current_layout),
        widget.Image(filename=img['primary']),
        widget.TextBox(**base(bg='primary'), **text_box, text=' 🕒'),
        widget.Clock(**base(bg='primary'), **clock)
    ]
Exemple #4
0
def init_bottom_widgets_list():
    return [
        widget.Sep(
            linewidth=0,
            padding=3,
        ),
        widget.TaskList(
            fontsize=11,
            margin_x=0,
            margin_y=1,
            padding_x=6,
            padding_y=2.3,
            borderwidth=1,
            icon_size=14,
            spacing=1,
            # max_title_width = 190,
            title_width_method='uniform',
            urgent_alert_method="text",
            highlight_method="block",
            txt_minimized="V ",
            txt_maximized="",
            txt_floating="",
            # unfocused_border = "None",
            rounded=True,
            # border = colors["blue"],
        ),
        widget.Sep(
            linewidth=0,
            padding=3,
        ),
        widget.Image(scale=True,
                     filename="~/.config/qtile/bar06.png",
                     background=colors["red"]),
        widget.TextBox(fontsize=14, text=" ↯", background=colors["grey"]),
        widget.ThermalSensor(tag_sensor="CPU",
                             threshold=80,
                             update_interval=1,
                             foreground_alert=colors["red"],
                             foreground=colors["white"],
                             background=colors["grey"]),
        widget.Sep(linewidth=0, padding=3, background=colors["grey"]),
        widget.TextBox(font=fonts["bold"],
                       fontsize=14,
                       text="⌬",
                       background=colors["grey"]),
        widget.Memory(fmt='{MemAvailable}M/{MemTotal}M',
                      update_interval=1,
                      background=colors["grey"]),
        widget.Sep(linewidth=0, padding=3, background=colors["grey"]),
        widget.TextBox(font=fonts["bold"],
                       fontsize=14,
                       text="🕒",
                       background=colors["grey"]),
        widget.Clock(format="%a, %b %d - %H:%M", background=colors["grey"]),
        widget.Sep(linewidth=0, padding=3, background=colors["grey"])
    ]
Exemple #5
0
def test_invalid_path(manager_nospawn, minimal_conf_noscreen, logger):
    filename = "/made/up/file.png"
    img = widget.Image(filename=filename)

    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([img], 40))]

    manager_nospawn.start(config)

    assert f"Image does not exist: {filename}" in logger.text
Exemple #6
0
def test_no_scale(manager_nospawn, minimal_conf_noscreen):
    img2 = widget.Image(filename=IMAGE_FILE, scale=False)

    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([img2], 40))]

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

    info = bar.info()
    assert info["widgets"][0]["width"] == 24
Exemple #7
0
def test_missing_file(manager_nospawn, minimal_conf_noscreen):
    img2 = widget.Image(filename="/this/file/does/not/exist")

    config = minimal_conf_noscreen
    config.screens = [libqtile.config.Screen(top=libqtile.bar.Bar([img2], 40))]

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

    info = bar.info()
    assert info["widgets"][0]["width"] == 0
Exemple #8
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
Exemple #9
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[0]),
        widget.Image(
            filename="~/.config/qtile/icons/tux.png",
            scale="False",
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(myTerm)},
            background=colors[0]),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[0]),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[0]),
        widget.GroupBox(font="FiraCode Nerd Font",
                        fontsize=18,
                        margin_y=3,
                        margin_x=0,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active="#ff71ce",
                        inactive=colors[2],
                        rounded=False,
                        highlight_color=colors[0],
                        highlight_method="line",
                        this_current_screen_border=colors[6],
                        this_screen_border=colors[4],
                        other_current_screen_border=colors[6],
                        other_screen_border=colors[4],
                        foreground=colors[2],
                        background=colors[0]),
        widget.Prompt(prompt=prompt,
                      padding=10,
                      foreground=colors[3],
                      background=colors[1],
                      fontsize=16),
        widget.Sep(linewidth=0,
                   padding=40,
                   foreground=colors[2],
                   background=colors[0]),
        widget.WindowName(foreground=colors[6],
                          background=colors[0],
                          padding=0),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=colors[0]),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.CheckUpdates(
            update_interval=1800,
            distro="Arch_checkupdates",
            display_format="⟳{updates} Updates",
            foreground=colors[2],
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')
            },
            background=colors[0]),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.CPU(format='\uf108 cpu: {load_percent}% {freq_current}GHz',
                   foreground='#ecbe7b',
                   background=colors[0]),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.TextBox(text=" 🌡",
                       padding=2,
                       foreground='#01cdfe',
                       background=colors[0],
                       fontsize=16),
        widget.ThermalSensor(foreground='#01cdfe',
                             background=colors[0],
                             threshold=90,
                             padding=5,
                             tag_sensor="Package id 0"),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.TextBox(text=" 🌡",
                       padding=2,
                       foreground='#05ffa1',
                       background=colors[0],
                       fontsize=16),
        widget.NvidiaSensors(foreground='#05ffa1',
                             background=colors[0],
                             format='gpu: {temp}°C'),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.Memory(foreground='#ff6c6b',
                      background=colors[0],
                      format='\uf233 {MemUsed: .0f}M/{MemTotal: .0f}M',
                      mouse_callbacks={
                          'Button1':
                          lambda: qtile.cmd_spawn(myTerm + ' -e htop')
                      },
                      padding=5),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.Net(interface=interface_name,
                   format='\uf0ab {down}  \uf0aa {up}',
                   foreground='#fffb96',
                   background=colors[0],
                   padding=5),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.TextBox(
            text="",
            foreground='#ff71ce',
            background=colors[0],
            font="Font Awesome 6 Free Solid",
            # fontsize=38,
        ),
        widget.Volume(
            #foreground = '#828CF6',
            foreground='#ff71ce',
            background=colors[0],
            padding=5),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground='#c678dd',
            background=colors[0],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(foreground='#c678dd',
                             background=colors[0],
                             padding=5),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.TextBox(
            text="",
            # text="\uF551",
            foreground='#46d9ff',
            background=colors[0],
            font="Font Awesome 6 Free Solid",
            # fontsize=38,
        ),
        widget.Clock(foreground='#46d9ff',
                     background=colors[0],
                     format="%A, %B %d - %H:%M:%S",
                     mouse_callbacks={
                         'Button1':
                         lambda: qtile.cmd_spawn(
                             myTerm + f" --hold -e cal {current_year}")
                     }),
        widget.TextBox(text='|',
                       background=colors[0],
                       foreground=colors[7],
                       fontsize=20),
        widget.Systray(background=colors[0], icon_size=21, padding=4),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[0],
                   background=colors[0]),
    ]
    return widgets_list
Exemple #10
0
def test_deprecated_argument():
    img1 = widget.Image(filename=IMAGE_FILE, width=10)
    assert img1.length == 10
Exemple #11
0
base = lambda fg, bg: {'foreground': fg, 'background': bg}

icon = lambda fg, bg, fontsize=12, text="?", padding=0: widget.TextBox(
    **base(fg, bg), fontsize=fontsize, text=text, padding=padding)

powerline = lambda fg, bg, : widget.TextBox(
    **base(fg, bg), text='', padding=-1, fontsize=50)

workspaces = lambda: [
    widget.Sep(
        linewidth=0, padding=6, foreground=colors[2], background=colors[0]),
    widget.Image(background=colors[0],
                 filename="/home/anyel/.config/qtile/icons/Manjaro_Icon.svg",
                 mouse_callbacks={
                     'Button1':
                     lambda qtile: qtile.cmd_spawn(
                         '/home/anyel/.config/xmenu/xmenu.sh')
                 },
                 margin=3),
    widget.Sep(
        linewidth=1, padding=10, foreground=colors[7], background=colors[0]),
    widget.Sep(
        linewidth=0, padding=7, foreground=colors[7], background=colors[0]),
    widget.GroupBox(font="Ubuntu Bold",
                    fontsize=13,
                    margin_y=3,
                    margin_x=0,
                    padding_y=5,
                    padding_x=6,
                    borderwidth=3,
                    active=colors[2],
Exemple #12
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=5,
                   foreground=colors[2],
                   background=colors[0]),
        widget.TextBox(text='â—¥',
                       background=colors[0],
                       foreground="#81A1C1",
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.Image(
            filename="~/.config/qtile/icons/arco.png",
            scale="True",
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(
                    "rofi -show drun -font 'JetBrainsMono Nerd Font 12'")
            }),
        widget.TextBox(text='â—£',
                       background=colors[0],
                       foreground="#81A1C1",
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.Sep(linewidth=0,
                   padding=1,
                   foreground=colors[2],
                   background=colors[0]),
        widget.GroupBox(font="JetBrainsMono Nerd Font",
                        fontsize=12,
                        margin_y=3,
                        margin_x=0,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active=colors[2],
                        inactive=colors[2],
                        rounded=False,
                        highlight_color=colors[1],
                        highlight_method="line",
                        this_current_screen_border=colors[6],
                        this_screen_border=colors[4],
                        other_current_screen_border=colors[6],
                        other_screen_border=colors[4],
                        foreground=colors[2],
                        background=colors[0]),
        widget.Prompt(prompt=prompt,
                      font="JetBrainsMono Nerd Font",
                      padding=10,
                      foreground=colors[3],
                      background=colors[1]),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[2],
                   background=colors[0]),
        widget.WindowName(foreground=colors[2],
                          background=colors[0],
                          padding=0,
                          font="JetBrainsMono Nerd Font"),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=colors[0]),
        widget.TextBox(text='â—¥',
                       background=colors[0],
                       foreground=colors[5],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.Net(interface="wlp0s20f3",
                   format='📡 ↓{down} ↑ {up}',
                   foreground=colors[2],
                   background=colors[5],
                   mouse_callbacks={
                       'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e nmtui')
                   },
                   padding=0),
        widget.TextBox(text='â—¢',
                       background=colors[5],
                       foreground=colors[4],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.TextBox(text="💻",
                       padding=2,
                       foreground=colors[2],
                       background=colors[4],
                       fontsize=14),
        widget.CheckUpdates(
            update_interval=1800,
            distro="Arch_checkupdates",
            display_format="{updates} Updates",
            foreground=colors[2],
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')
            },
            background=colors[4]),
        widget.TextBox(text='â—¢',
                       background=colors[4],
                       foreground=colors[5],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.TextBox(text="💾",
                       foreground=colors[2],
                       background=colors[5],
                       padding=0,
                       fontsize=14),
        widget.Memory(foreground=colors[2],
                      background=colors[5],
                      mouse_callbacks={
                          'Button1':
                          lambda: qtile.cmd_spawn(myTerm + ' -e gotop')
                      },
                      padding=5),
        widget.TextBox(text='â—¢',
                       background=colors[5],
                       foreground=colors[4],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.TextBox(text=" 🎧 Vol:",
                       foreground=colors[2],
                       background=colors[4],
                       padding=0),
        widget.Volume(foreground=colors[2], background=colors[4], padding=5),
        widget.TextBox(text='â—¢',
                       background=colors[4],
                       foreground=colors[5],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[0],
            background=colors[5],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(foreground=colors[2],
                             background=colors[5],
                             padding=5),
        widget.TextBox(text='â—¢',
                       background=colors[5],
                       foreground=colors[4],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.Clock(foreground=colors[2],
                     background=colors[4],
                     format="📅 %A, %B %d, %H:%M:%S ",
                     mouse_callbacks={
                         'Button1':
                         lambda: qtile.cmd_spawn(myTerm + ' -e calcurse')
                     }),
        widget.TextBox(text='â—£',
                       background=colors[0],
                       foreground=colors[4],
                       padding=-2,
                       font="Fira Code",
                       fontsize=50),
        widget.Systray(background=colors[0], padding=0),
    ]
    return widgets_list
Exemple #13
0
# Widget specific tests

from os import path

import pytest

import libqtile.bar
import libqtile.config
from libqtile import widget

TEST_DIR = path.dirname(path.abspath(__file__))
DATA_DIR = path.join(TEST_DIR, '..', 'data', 'png')
IMAGE_FILE = path.join(DATA_DIR, 'audio-volume-muted.png')

img = widget.Image(filename=IMAGE_FILE)

parameters = [
    (libqtile.config.Screen(top=libqtile.bar.Bar([img], 40)), "top", "height"),
    (libqtile.config.Screen(left=libqtile.bar.Bar([img], 40)), "left", "width")
]


@pytest.mark.parametrize("screen,location,attribute", parameters)
def test_default_settings(manager_nospawn, minimal_conf_noscreen, screen,
                          location, attribute):
    config = minimal_conf_noscreen
    config.screens = [screen]

    manager_nospawn.start(config)
    bar = manager_nospawn.c.bar[location]
Exemple #14
0
def init_widgets_list():
    widgets_list = [
        # Left Side of the bar
        space,
        #widget.Image(
        #    filename = "/usr/share/pixmaps/archlinux-logo.png",
        #    background = colors[1],
        #    margin = 3
        #),
        widget.Image(
            filename="~/.config/qtile/python.png",
            background=colors[1],
            margin=3,
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn('j4-dmenu'),
                'Button3':
                lambda: qtile.cmd_spawn(
                    f'{terminal} -e vim {home_dir}/.config/qtile/config.py')
            }),
        widget.GroupBox(font="Iosevka Nerd Font",
                        fontsize=15,
                        foreground=colors[2],
                        background=colors[1],
                        borderwidth=4,
                        highlight_method="text",
                        this_current_screen_border=colors[6],
                        active=colors[4],
                        inactive=colors[2]),
        sep,
        nerd_icon("  ", colors[6]),
        widget.Battery(foreground=colors[2],
                       background=colors[1],
                       format="{percent:2.0%}"),
        nerd_icon("墳", colors[3]),
        widget.Volume(foreground=colors[2], background=colors[1]),
        widget.Spacer(length=bar.STRETCH, background=colors[1]),

        # Center bar
        nerd_icon("", colors[7]),
        widget.CurrentLayout(foreground=colors[2], background=colors[1]),
        sep,
        nerd_icon("﬙", colors[3]),
        widget.CPU(format="{load_percent}%",
                   foreground=colors[2],
                   background=colors[1],
                   update_interval=2,
                   mouse_callbacks={
                       'Button1':
                       lambda: qtile.cmd_spawn(f"{terminal} -e gtop")
                   }),
        nerd_icon("", colors[4]),
        widget.Memory(format="{MemUsed:.0f}{mm}",
                      foreground=colors[2],
                      background=colors[1],
                      update_interval=2,
                      mouse_callbacks={
                          'Button1':
                          lambda: qtile.cmd_spawn(f"{terminal} -e gtop")
                      }),
        nerd_icon("", colors[6]),
        widget.GenPollText(foreground=colors[2],
                           background=colors[1],
                           update_interval=5,
                           func=lambda: storage.diskspace('FreeSpace'),
                           mouse_callbacks={
                               'Button1':
                               lambda: qtile.cmd_spawn(f"{terminal} -e gtop")
                           }),
        sep,
        nerd_icon("", colors[4]),
        widget.GenPollText(
            foreground=colors[2],
            background=colors[1],
            update_interval=5,
            func=lambda: subprocess.check_output(
                f"{home_dir}/.config/qtile/scripts/num-installed-pkgs").decode(
                    "utf-8")),

        # Left Side of the bar
        widget.Spacer(length=bar.STRETCH, background=colors[1]),
        nerd_icon("", colors[4]),
        widget.Net(format="{down} ↓↑ {up}",
                   foreground=colors[2],
                   background=colors[1],
                   update_interval=2,
                   mouse_callbacks={
                       'Button1': lambda: qtile.cmd_spawn("def-nmdmenu")
                   }),
        sep,
        nerd_icon("", colors[7]),
        widget.Clock(format='%b %d-%Y',
                     foreground=colors[2],
                     background=colors[1]),
        nerd_icon("", colors[8]),
        widget.Clock(format='%I:%M %p',
                     foreground=colors[2],
                     background=colors[1]),
        widget.Systray(background=colors[1]),
        space
    ]
    return widgets_list
Exemple #15
0
def init_widgets_list():
    widgets_list = [
              widget.Sep(
                       linewidth = 0,
                       padding = 6,
                       foreground = colors[2],
                       background = colors[0]
                       ),
              widget.Image(
                       filename = "~/.config/qtile/icons/python-white.png",
                       scale = "False",
                       mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}
                       ),
             widget.Sep(
                       linewidth = 0,
                       padding = 6,
                       foreground = colors[2],
                       background = colors[0]
                       ),
              widget.GroupBox(
                       font = "Ubuntu Bold",
                       fontsize = 9,
                       margin_y = 3,
                       margin_x = 0,
                       padding_y = 5,
                       padding_x = 3,
                       borderwidth = 3,
                       active = colors[2],
                       inactive = colors[7],
                       rounded = False,
                       highlight_color = colors[1],
                       highlight_method = "line",
                       this_current_screen_border = colors[6],
                       this_screen_border = colors [4],
                       other_current_screen_border = colors[6],
                       other_screen_border = colors[4],
                       foreground = colors[2],
                       background = colors[0]
                       ),
              widget.Prompt(
                       prompt = prompt,
                       font = "Ubuntu Mono",
                       padding = 10,
                       foreground = colors[3],
                       background = colors[1]
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 40,
                       foreground = colors[2],
                       background = colors[0]
                       ),
              widget.WindowName(
                       foreground = colors[6],
                       background = colors[0],
                       padding = 0
                       ),
              widget.Systray(
                       background = colors[0],
                       padding = 5
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 6,
                       foreground = colors[0],
                       background = colors[0]
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[0],
                       foreground = colors[4],
                       padding = 0,
                       fontsize = 37
                       ),
             widget.Net(
                       interface = "enp6s0",
                       format = '{down} ↓↑ {up}',
                       foreground = colors[2],
                       background = colors[4],
                       padding = 5
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[4],
                       foreground = colors[5],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.TextBox(
                       text = " 🌡",
                       padding = 2,
                       foreground = colors[2],
                       background = colors[5],
                       fontsize = 11
                       ),
              widget.ThermalSensor(
                       foreground = colors[2],
                       background = colors[5],
                       threshold = 90,
                       padding = 5
                       ),
              widget.TextBox(
                       text='',
                       background = colors[5],
                       foreground = colors[4],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.TextBox(
                       text = " ⟳",
                       padding = 2,
                       foreground = colors[2],
                       background = colors[4],
                       fontsize = 14
                       ),
              widget.CheckUpdates(
                       update_interval = 1800,
                       distro = "Arch_checkupdates",
                       display_format = "{updates} Updates",
                       foreground = colors[2],
                       mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')},
                       background = colors[4]
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[4],
                       foreground = colors[5],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.TextBox(
                       text = " 🖬",
                       foreground = colors[2],
                       background = colors[5],
                       padding = 0,
                       fontsize = 14
                       ),
              widget.Memory(
                       foreground = colors[2],
                       background = colors[5],
                       mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
                       padding = 5
                       ),
              widget.TextBox(
                       text='',
                       background = colors[5],
                       foreground = colors[4],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.TextBox(
                       text = " â‚¿",
                       padding = 0,
                       foreground = colors[2],
                       background = colors[4],
                       fontsize = 12
                       ),
              widget.BitcoinTicker(
                       foreground = colors[2],
                       background = colors[4],
                       padding = 5
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[4],
                       foreground = colors[5],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.TextBox(
                      text = " Vol:",
                       foreground = colors[2],
                       background = colors[5],
                       padding = 0
                       ),
              widget.Volume(
                       foreground = colors[2],
                       background = colors[5],
                       padding = 5
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[5],
                       foreground = colors[4],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.CurrentLayoutIcon(
                       custom_icon_paths = [os.path.expanduser("~/.config/qtile/icons")],
                       foreground = colors[0],
                       background = colors[4],
                       padding = 0,
                       scale = 0.7
                       ),
              widget.CurrentLayout(
                       foreground = colors[2],
                       background = colors[4],
                       padding = 5
                       ),
              widget.TextBox(
                       text = '',
                       background = colors[4],
                       foreground = colors[5],
                       padding = 0,
                       fontsize = 37
                       ),
              widget.Clock(
                       foreground = colors[2],
                       background = colors[5],
                       format = "%A, %B %d - %H:%M "
                       ),
              ]
    return widgets_list
Exemple #16
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(
            linewidth=0,
            padding=6,
            background=colors[0],
            foreground=colors[6],
        ),
        widget.GroupBox(),
        widget.WindowName(
            background=colors[0],
            foreground=colors[0],
        ),
        widget.Image(filename="~/.config/qtile/pictures/arrow.jpg", ),
        widget.CPU(
            format='CPU {load_percent}%',
            background=colors[5],
            foreground=colors[6],
            padding=2,
        ),
        widget.TextBox(
            text=" Thermal",
            background=colors[5],
            foreground=colors[6],
            padding=2,
        ),
        widget.ThermalSensor(
            background=colors[5],
            foreground=colors[6],
            padding=2,
        ),
        widget.TextBox(
            text=" RAM",
            background=colors[5],
            foreground=colors[6],
            padding=2,
        ),
        widget.Memory(
            background=colors[5],
            foreground=colors[6],
            padding=5,
        ),
        widget.Image(filename="~/.config/qtile/pictures/arrow-blue.jpg", ),
        widget.TextBox(
            text="Free Space",
            background=colors[4],
            foreground=colors[6],
            padding=2,
        ),
        widget.DF(
            background=colors[4],
            foreground=colors[6],
            padding=5,
            update_interval=5,
            visible_on_warn=False,
        ),
        widget.Image(filename="~/.config/qtile/pictures/arrow-red.jpg", ),
        widget.TextBox(
            text="Network ",
            background=colors[3],
            foreground=colors[6],
        ),
        widget.Net(
            format='{down} ↓↑ {up}',
            background=colors[3],
            foreground=colors[6],
            padding=4,
        ),
        widget.TextBox(
            text=" ⟳",
            padding=5,
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')
            },
            foreground=colors[6],
            background=colors[3],
            fontsize=14,
        ),
        widget.CheckUpdates(
            update_interval=180,
            display_format="{updates} Updates",
            no_update_string="0 Updates",
            distro="Arch_checkupdates",
            background=colors[3],
            foreground=colors[6],
            padding=5,
        ),
        widget.Image(filename="~/.config/qtile/pictures/arrow-purple.jpg", ),
        widget.TextBox(
            text="Volume ",
            background=colors[2],
            foreground=colors[6],
            padding=2,
        ),
        widget.Volume(
            background=colors[2],
            foreground=colors[6],
            padding=5,
        ),
        widget.Image(filename="~/.config/qtile/pictures/arrow-purple2.jpg", ),
        widget.Clock(
            format='%a %I:%M %p %m-%d-%Y',
            background=colors[1],
            foreground=colors[6],
        ),
    ]
    return widgets_list
Exemple #17
0
def init_widgets_list():
    widgets_list = [
        # Initial Spacer
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[1]),
        # Python Image to launch terminal
        widget.Image(
            filename="~/.config/qtile/python.png",
            scale="False",
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(myTerminal)}),
        # Group Box
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[1]),
        widget.GroupBox(font="MonoLisa",
                        fontsize=11,
                        margin_y=3,
                        margin_x=0,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active=colors[5],
                        inactive=colors[2],
                        rounded=True,
                        highlight_color=colors[0],
                        this_current_screen_border=colors[6],
                        this_screen_border=colors[4],
                        other_current_screen_border=colors[6],
                        other_screen_border=colors[4],
                        foreground=colors[2],
                        background=colors[1]),
        # Space separator
        widget.Sep(linewidth=0,
                   padding=40,
                   foreground=colors[2],
                   background=colors[1]),
        # Widow Name
        widget.WindowName(max_chars=25,
                          empty_string='---',
                          foreground=colors[6],
                          background=colors[1],
                          padding=0),
        # System Tray
        widget.Systray(background=colors[1], padding=5),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[1],
                   background=colors[1]),
        # Thermal Sensor
        widget.ThermalSensor(foreground=colors[5],
                             background=colors[0],
                             threshold=90,
                             padding=5),
        # Updates
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.CheckUpdates(
            update_interval=1800,
            distro="Arch_checkupdates",
            display_format="{updates} Updates",
            foreground=colors[5],
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(myTerminal + ' -e sudo pacman -Syu')
            },
            background=colors[0]),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # Memory
        widget.TextBox(
            font="MonoLisa Nerd Font",
            text=' ',
            fontsize=16,
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.Memory(foreground=colors[5],
                      background=colors[0],
                      mouse_callbacks={
                          'Button1':
                          lambda: qtile.cmd_spawn(myTerminal + ' -e htop')
                      },
                      padding=5),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # Volume
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.TextBox(
            text=" ",
            foreground=colors[7],
            background=colors[0],
            font="Font Awesome 5 Free Solid",
            # fontsize=38,
        ),
        widget.Volume(
            foreground=colors[7],
            background=colors[0],
            mouse_callbacks={"Button3": open_pavu},
            padding=5,
        ),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # Current Layout
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[5],
            background=colors[0],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(foreground=colors[5],
                             background=colors[0],
                             padding=5),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # CPU
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.CPU(background=colors[0], foreground=colors[6], fontsize=16),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # Clock
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.TextBox(
            text="",
            font="Font Awesome 5 Free Solid",
            foreground=colors[8],  # fontsize=38
            background=colors[0],
        ),
        widget.Clock(foreground=colors[8],
                     background=colors[0],
                     format="%A, %B %d - %H:%M "),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
        # Poweroff Button
        widget.TextBox(
            font="MonoLisa Nerd Font",
            fontsize=16,
            text=' ',
            background=colors[1],
            foreground=colors[0],
            padding=0,
        ),
        widget.TextBox(
            text="⏻",
            foreground=colors[5],
            font="Font Awesome 5 Free Solid",
            fontsize=16,
            padding=10,
            mouse_callbacks={"Button1": open_powermenu},
        ),
        widget.TextBox(font="MonoLisa Nerd Font",
                       text=' ',
                       background=colors[1],
                       foreground=colors[0],
                       padding=0,
                       fontsize=16),
    ]
    return widgets_list
    return [
        widget.CurrentLayoutIcon(**base(bg='secondary'),
                                 **current_layout_icon),
        widget.CurrentLayout(**base(bg='secondary'), **current_layout),
        widget.Image(filename=img['primary']),
        widget.TextBox(**base(bg='primary'), **text_box, text=' 🕒'),
        widget.Clock(**base(bg='primary'), **clock)
    ]


laptop_widgets = [
    *workspaces(),
    widget.Sep(**separator),
    widget.Systray(**systray),
    widget.Sep(**separator),
    widget.Image(filename=img['bg-to-secondary']),
    widget.TextBox(**base(bg='secondary'), **text_box, text=' ⟳'),
    widget.Pacman(**base(bg='secondary'), **pacman),
    widget.Image(filename=img['primary']),
    widget.TextBox(**base(bg='primary'), **text_box, text=' ↯'),
    widget.Net(**base(bg='primary'), **net),
    widget.Image(filename=img['secondary']), *powerline_base()
]

monitor_widgets = [
    *workspaces(),
    widget.Image(filename=img['bg-to-secondary']), *powerline_base()
]

widget_defaults = {'font': 'Ubuntu Mono', 'fontsize': 13, 'padding': 2}
extension_defaults = widget_defaults.copy()
Exemple #19
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
 #                ),
 #            ],
 #            20,
 #        ),
 #    ),
 Screen(
     top=bar.Bar(
         [
             widget.Sep(
                 padding=6,
                 linewidth=0,
             ),
             widget.Image(
                 filename='~/.config/qtile/python.png',
                 scale='False',
                 mouse_callbacks={
                     'Button1':
                     lambda: qtile.cmd_spawn(
                         'alacritty -e code /home/nazgo/.config/qtile')
                 }),
             widget.Sep(padding=6, linewidth=0),
             widget.GroupBox(rounded=False,
                             highlight_method='block',
                             active='ffdab9',
                             inactive=main_color,
                             padding=4,
                             fontsize=12),
             widget.Prompt(),
             widget.WindowName(
                 fontsize=font_size,
                 background='ffdab9',
                 foreground='000000',
Exemple #21
0
    fontsize=15,
    padding=3,
)
extension_defaults = widget_defaults.copy()

background_color = "#000000" #111D13
foreground_color = "#203C2B"
time_bg_color = "#006400"
volume_bg_color = "#013220"

screens = [
    Screen(
        top = bar.Bar(
            [
                widget.Image(
                    filename = '/usr/share/backgrounds/arch.png',
                    margin = 3,
                ),
                widget.Image(
                    filename = '/usr/share/backgrounds/vim.png',
                    margin = 3,
                ),
                widget.CurrentLayout(background = background_color),
                widget.GroupBox(
                    background = background_color,
                    block_highlight_text_color = "#00FF00",
                    this_current_screen_border = foreground_color,
                    use_mouse_wheel = False,
                    disable_drag = True,
                    rounded = True,
                    highlight_method = "line",
                ),
Exemple #22
0
                    margin_y = 0,
                    margin_x = 0,
                    padding_y = 0,
                    padding_x = 5,
                    borderwidth = 1,
                    active = '#ff8800',
                    inactive = "#000000",
                    rounded = False,
                    highlight_method = "block",
                    this_current_screen_border = '#4d88e8',
                    this_screen_border = '#ff8800',),
                widget.Prompt(),
                widget.WindowName(),
				widget.Image(
						scale = True,
                        filename = "~/.config/qtile/img3.png",
						background='#242636',
						),
				widget.CurrentLayoutIcon(background='#8b3f8c'),
				widget.Image(
						scale = True,
                        filename = "~/.config/qtile/img2.png",
						background='#242636',
						),
				widget.Systray(background='#42aabd'),
				widget.Image(
						scale = True,
                        filename = "~/.config/qtile/img1.png",
						background='#242636',
						),
				widget.Clock(format='%Y-%m-%d %a %I:%M %p' , background='#0b0eb8'),
Exemple #23
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[0]),
        widget.Image(filename="~/.config/qtile/icons/python.png",
                     mouse_callbacks={
                         'Button1': lambda qtile: qtile.cmd_spawn('dmenu_run')
                     },
                     margin_x=2,
                     background=colors[0]),
        widget.GroupBox(font="Ubuntu Bold",
                        fontsize=10,
                        margin_y=4,
                        margin_x=0,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active=colors[2],
                        inactive=colors[2],
                        rounded=False,
                        highlight_color=colors[1],
                        highlight_method="block",
                        urgent_alert_method='block',
                        urgent_border=colors[3],
                        this_current_screen_border=colors[4],
                        this_screen_border=colors[4],
                        other_current_screen_border=colors[0],
                        other_screen_border=colors[0],
                        foreground=colors[2],
                        background=colors[0]),
        widget.Sep(linewidth=0,
                   padding=40,
                   foreground=colors[2],
                   background=colors[0]),
        widget.WindowName(foreground=colors[6],
                          background=colors[0],
                          padding=0,
                          fontsize=15),
        widget.TextBox(text='',
                       background=colors[0],
                       foreground=colors[4],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text="",
                       padding=0,
                       foreground=colors[2],
                       background=colors[4],
                       fontsize=20),
        widget.CPU(
            foreground=colors[2],
            background=colors[4],
            padding=5,
            fontsize=14,
            format='{freq_current}GHz {load_percent}%',
            mouse_callbacks={
                'Button1': lambda qtile: qtile.cmd_spawn(myTerm + ' -e htop')
            },
        ),
        widget.TextBox(text='',
                       background=colors[4],
                       foreground=colors[5],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text="",
                       padding=0,
                       foreground=colors[2],
                       background=colors[5],
                       fontsize=15),
        widget.ThermalSensor(foreground=colors[2],
                             background=colors[5],
                             threshold=80,
                             padding=5,
                             fontsize=14),
        widget.TextBox(text='',
                       background=colors[5],
                       foreground=colors[4],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text="🐏",
                       foreground=colors[2],
                       background=colors[4],
                       padding=0,
                       fontsize=14),
        widget.Memory(foreground=colors[2],
                      background=colors[4],
                      mouse_callbacks={
                          'Button1':
                          lambda qtile: qtile.cmd_spawn(myTerm + ' -e htop')
                      },
                      padding=5,
                      fontsize=14),
        widget.TextBox(text='',
                       background=colors[4],
                       foreground=colors[5],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text="",
                       foreground=colors[2],
                       background=colors[5],
                       padding=0,
                       fontsize=22),
        widget.DF(foreground=colors[2],
                  background=colors[5],
                  threshold=90,
                  padding=5,
                  visible_on_warn=False,
                  format='{uf}{m}/{s}{m}|{r:.0f}%',
                  fontsize=14),
        widget.TextBox(text='',
                       background=colors[5],
                       foreground=colors[4],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text=" ",
                       padding=0,
                       foreground=colors[2],
                       background=colors[4],
                       fontsize=12),
        widget.Battery(foreground=colors[2],
                       background=colors[4],
                       padding=2,
                       fontsize=14,
                       change_char='⚡',
                       notify_below=50,
                       show_short_text=False,
                       format='{percent:2.0%}'),
        widget.TextBox(text='',
                       background=colors[4],
                       foreground=colors[5],
                       padding=0,
                       fontsize=37),
        widget.CurrentLayoutIcon(foreground=colors[0],
                                 background=colors[5],
                                 padding=0,
                                 scale=0.7),
        widget.CurrentLayout(foreground=colors[2],
                             background=colors[5],
                             padding=5,
                             fontsize=14),
        widget.TextBox(text='',
                       background=colors[5],
                       foreground=colors[4],
                       padding=0,
                       fontsize=37),
        widget.TextBox(text="",
                       foreground=colors[2],
                       background=colors[4],
                       padding=4,
                       fontsize=20),
        widget.Clock(foreground=colors[2],
                     background=colors[4],
                     format="%a, %b %d  [%H:%M]",
                     fontsize=14),
        widget.TextBox(text='',
                       background=colors[4],
                       foreground=colors[5],
                       padding=0,
                       fontsize=37),
        widget.Systray(background=colors[5], padding=3),
        widget.Sep(linewidth=0,
                   padding=5,
                   foreground=colors[0],
                   background=colors[5]),
    ]
    return widgets_list
Exemple #24
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [

        # workspaces ##########################################################
        widget.GroupBox(
            margin_y=3,
            margin_x=0,
            padding_y=6,
            padding_x=5,
            borderwidth=0,
            disable_drag=True,
            highlight_method="text",
            fontsize=16,
            this_current_screen_border=colors[4],
            active=colors[5],
            inactive=colors[8],
        ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # layout section ######################################################
        widget.CurrentLayoutIcon(scale=0.7, ),
        widget.CurrentLayout(font="Noto Sans Bold", ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # window name section #################################################
        widget.CurrentScreen(
            font="FontAwesome",
            active_text="",
            inactive_text="",
            active_color=colors[8],
            inactive_color=colors[8],
        ),
        widget.WindowName(),

        # updates #############################################################
        # widget.TextBox(
        #     font = "FontAwesome",
        #     fontsize = 16,
        #     text = "  ",
        #     padding = 0,
        #     foreground = colors[5],
        # ),
        widget.Image(
            filename="~/.config/qtile/icons/updates.png",
            margin=icon_margin,
        ),
        widget.CheckUpdates(
            custom_command="checkupdates",
            display_format="{updates}",
            no_update_string="0",
            update_interval=1800,
        ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # # battery #############################################################
        # widget.TextBox(
        # #     font = "FontAwesome",
        # #     fontsize = 16,
        # #     text = "  ",
        # #     padding = 0,
        # #     foreground = colors[4],
        # # ),
        # widget.Image(
        #     filename = "~/.config/qtile/icons/battery.png",
        #     margin = icon_margin,
        # ),
        # widget.Battery(
        #     #hide_threshold = 0.9, # doesnt hide icon
        #     low_percentage = 0.2,
        #     notify_below = 0.25,
        #     charge_char = "∧",
        #     discharge_char = "∨",
        #     full_string = "full",
        #     update_interval = 10,
        #     background = colors[9],
        # ),
        # widget.Sep(
        #     linewidth = sep_linewidth,
        #     padding = sep_padding,
        # ),

        # cpu #################################################################
        # widget.TextBox(
        #     font = "FontAwesome",
        #     fontsize = 16,
        #     text = "  ",
        #     padding = 0,
        #     foreground = colors[5],
        # ),
        widget.Image(
            filename="~/.config/qtile/icons/cpu.png",
            margin=icon_margin,
        ),
        widget.CPU(
            format="{load_percent}%",
            update_interval=2,
        ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # temperature #########################################################
        # widget.TextBox(
        #     font = "FontAwesome",
        #     fontsize = 16,
        #     text = "  ",
        #     padding = 0,
        #     foreground = colors[5],
        # ),
        widget.Image(
            filename="~/.config/qtile/icons/temperature.png",
            margin=icon_margin,
        ),
        widget.ThermalSensor(
            threshold=70,
            foreground=colors[8],
            foreground_alert=colors[1],
        ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # memory ##############################################################
        # widget.TextBox(
        #     font = "FontAwesome",
        #     fontsize = 16,
        #     text = "  ",
        #     padding = 0,
        #     foreground = colors[4],
        # ),
        widget.Image(
            filename="~/.config/qtile/icons/memory.png",
            margin=icon_margin,
        ),
        widget.Memory(
            format="{MemUsed:.1f}G",
            measure_mem="G",
            update_interval=1,
        ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # clock ###############################################################
        # widget.TextBox(
        #     font = "FontAwesome",
        #     fontsize = 16,
        #     text = "  ",
        #     padding = 0,
        #     foreground = colors[4],
        # ),
        widget.Image(
            filename="~/.config/qtile/icons/clock.png",
            margin=icon_margin,
        ),
        widget.Clock(format="%H:%M", ),
        widget.Sep(
            linewidth=sep_linewidth,
            padding=sep_padding,
        ),

        # systray #############################################################
        widget.Systray(icon_size=20, ),
    ]
    return widgets_list
Exemple #25
0
    "rounded": True,
    "highlight_color": colors["foreground"],
    "block_highlight_text_color": colors["foreground"],
    "highlight_method": "block",
    "this_screen_border": colors["purple"],
    "other_current_screen_border": colors["brightBlack"],
    "other_screen_border": colors["brightBlack"],
    "foreground": colors["purple"],
    "background": colors["background"],
    "urgent_border": colors["brightRed"],
}

workspaces = lambda: [
    widget.Image(background=colors["background"],
                 foreground=colors["background"],
                 filename=icon_path,
                 mouse_callbacks=
                 {"Button1": lambda: qtile.cmd_spawn(launcher_cmd)}),
    separate(),
    widget.TextBox(
        text=" ",
        foreground=colors["blue"],
        background=colors["background"],
        font="Font Awesome 5 Free Solid",
        mouse_callbacks={"Button2": lambda: qtile.cmd_spawn(killwindow_cmd)},
    ),
    CustomWindowName(
        foreground=colors["foreground"],
        background=colors["background"],
        width=bar.CALCULATED,
        empty_group_string="Desktop",
Exemple #26
0
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(top=bar.Bar(
        [
            widget.Sep(linewidth=0, padding=6, background='#292d3e'),
            widget.GroupBox(background='#292d3e',
                            rounded=False,
                            highlight_method='block',
                            hightlight_color='#c792ea',
                            active='#d0d0d0',
                            inactive='#d0d0d0'),
            widget.WindowName(
                background='#292d3e', foreground='#292d3e', show_state=False),
            widget.Image(
                margin=0, margin_x=-1, filename='~/.config/qtile/arrow3.png'),
            widget.Systray(background='#c792ea'),
            widget.CurrentLayout(
                background='#c792ea', foreground='#000000', padding=10),
            widget.Image(
                margin=0, margin_x=-1, filename='~/.config/qtile/arrow1.png'),
            widget.Net(background='#82aaff', foreground='#000000', padding=10),
            widget.Image(
                margin=0, margin_x=-1, filename='~/.config/qtile/arrow2.png'),
            widget.Clock(background='#c792ea',
                         foreground="#000000",
                         format='%m-%d-%Y - %H:%M',
                         padding=10),
            widget.Image(
                margin=0, margin_x=-1, filename='~/.config/qtile/arrow1.png'),
            widget.Battery(background='#82aaff',
Exemple #27
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[15],
                   background=colors[15]),  #
        widget.Image(
            filename="~/.config/qtile/icons/garuda-red.png",
            iconsize=9,
            background=colors[15],
            mouse_callbacks={'Button1':
                             lambda: qtile.cmd_spawn('jgmenu_run')}),
        widget.GroupBox(**base(bg=colors[15]),
                        font='UbuntuMono Nerd Font',
                        fontsize=11,
                        margin_y=3,
                        margin_x=2,
                        padding_y=5,
                        padding_x=4,
                        borderwidth=3,
                        active=colors[5],
                        inactive=colors[6],
                        rounded=True,
                        highlight_method='block',
                        urgent_alert_method='block',
                        urgent_border=colors[16],
                        this_current_screen_border=colors[20],
                        this_screen_border=colors[17],
                        other_current_screen_border=colors[13],
                        other_screen_border=colors[17],
                        disable_drag=True),
        widget.TaskList(
            highlight_method='border',  # or block
            icon_size=17,
            max_title_width=150,
            rounded=True,
            padding_x=0,
            padding_y=0,
            margin_y=0,
            fontsize=14,
            border=colors[7],
            foreground=colors[9],
            margin=2,
            txt_floating='🗗',
            txt_minimized='>_ ',
            borderwidth=1,
            background=colors[20],
            #unfocused_border = 'border'
        ),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[5],
            background=colors[3],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(font="Noto Sans Bold",
                             fontsize=12,
                             foreground=colors[5],
                             background=colors[3]),
        widget.Net(
            font="Noto Sans",
            fontsize=12,
            # Here enter your network name
            interface=["wlp6s0"],
            format='{down} ↓↑ {up}',
            foreground=colors[5],
            background=colors[19],
            padding=0,
        ),
        widget.CPU(
            font="Noto Sans",
            #format = '{MemUsed}M/{MemTotal}M',
            update_interval=1,
            fontsize=12,
            foreground=colors[5],
            background=colors[22],
            mouse_callbacks={
                'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')
            },
        ),
        widget.Memory(
            font="Noto Sans",
            format='{MemUsed: .0f}M/{MemTotal: .0f}M',
            update_interval=1,
            fontsize=12,
            measure_mem='M',
            foreground=colors[5],
            background=colors[16],
            mouse_callbacks={
                'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')
            },
        ),
        widget.Clock(foreground=colors[9],
                     background=colors[23],
                     fontsize=12,
                     format="%Y-%m-%d %H:%M"),
        widget.Systray(background=colors[10], icon_size=20, padding=4),
    ]
    return widgets_list
Exemple #28
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
               widget.Sep(
                        linewidth = 0,
                        padding = 6,
                        foreground = colors[2],
                        background = colors[0]
                        ),
               widget.GroupBox(font="Ubuntu Bold",
                        fontsize = 9,
                        margin_y = 0,
                        margin_x = 0,
                        padding_y = 5,
                        padding_x = 5,
                        borderwidth = 1,
                        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.Prompt(
                        prompt=prompt,
                        font="Ubuntu Mono",
                        padding=10,
                        foreground = colors[3],
                        background = colors[1]
                        ),
               widget.Sep(
                        linewidth = 0,
                        padding = 10,
                        foreground = colors[2],
                        background = colors[0]
                        ),
               widget.WindowName(font="Ubuntu",
                        fontsize = 11,
                        foreground = colors[5],
                        background = colors[0],
                        padding = 5
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar06.png",
                        background = colors[6]
                        ),
               widget.Systray(
                        background=colors[10],
                        padding = 5
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar02-b.png",
                        background = colors[6]
                        ),
               widget.TextBox(
                        text=" ↯",
                        foreground=colors[0],
                        background=colors[6],
                        padding = 0,
                        fontsize=14
                        ),
               widget.Net(
                        interface = "enp3s0",
                        foreground = colors[0],
                        background = colors[6],
                        padding = 5
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar03.png",
                        background = colors[3]
                        ),
               widget.TextBox(
                        font="Ubuntu Bold",
                        text=" ☵",
                        padding = 5,
                        foreground=colors[0],
                        background=colors[3],
                        fontsize=14
                        ),
               widget.CurrentLayout(
                        foreground = colors[0],
                        background = colors[3],
                        padding = 5
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar04.png",
                        background = colors[7]
                        ),
               widget.TextBox(
                        font="Ubuntu Bold",
                        text=" ⟳",
                        padding = 5,
                        foreground=colors[0],
                        background=colors[7],
                        fontsize=14
                        ),
               widget.Pacman(
                        execute = "urxvtc",
                        update_interval = 1800,
                        foreground = colors[0],
                        background = colors[7]
                        ),
               widget.TextBox(
                        text="Updates",
                        padding = 5,
                        foreground=colors[0],
                        background=colors[7]
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar05.png",
                        background = colors[8]
                        ),
               widget.TextBox(
                        font="Ubuntu Bold",
                        text=" ♫",
                        padding = 5,
                        foreground=colors[0],
                        background=colors[8],
                        fontsize=14
                        ),
               widget.Cmus(
                        max_chars = 40,
                        update_interval = 0.5,
                        foreground=colors[0],
                        background = colors[8]
                        ),
               widget.Image(
                        scale = True,
                        filename = "~/.config/qtile/bar07.png",
                        background = colors[9]
                        ),
               widget.TextBox(
                        font="Ubuntu Bold",
                        text=" 🕒",
                        foreground=colors[2],
                        background=colors[9],
                        padding = 5,
                        fontsize=14
                        ),
               widget.Clock(
                        foreground = colors[2],
                        background = colors[9],
                        format="%A, %B %d - %H:%M"
                        ),
               widget.Sep(
                        linewidth = 0,
                        padding = 5,
                        foreground = colors[0],
                        background = colors[9]
                        ),
              ]
    return widgets_list
Exemple #29
0
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        top=bar.Bar(
            [
                widget.GroupBox(
                    highlight_method='line',
                    background=colors['blue'],
                    active=colors['white1'],
                    inactive=colors['black2'],
                    highlight_color=[colors['blue'], colors['blue']],
                    this_current_screen_border=colors['black1']
                ),
                widget.Image(
                    filename='~/.config/qtile/edge1.png'
                ),
                widget.Spacer(),
                widget.Image(
                    filename='~/.config/qtile/edge2.png'
                ),
                widget.Battery(
                    format='{char} {percent:2.0%}',
                    background=colors['magenta'],
                    foreground=colors['white1'],
                    low_foreground=colors['white1']
                ),
                widget.Image(
                    filename='~/.config/qtile/edge3.png'
                ),
                widget.Clock(
Exemple #30
0
    fontsize=14,
    padding=3,
)
extension_defaults = widget_defaults.copy()

# anonymous functions used inside widgets
up_volume = lambda: subprocess.call(['amixer', '-D', 'pulse', 'sset', 'Master', '5%+'])
down_volume = lambda: subprocess.call(['amixer', '-D', 'pulse', 'sset', 'Master', '5%-'])
sgtk_menu = lambda: subprocess.call(['sgtk-menu', '-fn', '5', '-o', '0.9', '-y', '25'])

screens = [
    Screen(
        top=bar.Bar(
            [
                widget.Image(filename='/usr/share/pixmaps/archlinux-logo.svg',
                             background='#444444',
                             mouse_callbacks={"Button1": sgtk_menu}
                             ),
                widget.CurrentLayout(background='#444444'),
                widget.TextBox("", foreground='#444444', fontsize=37, padding=0),
                widget.GroupBox(this_current_screen_border="ffffff",
                                borderwidth=2,
                                inactive="6a6a6a"),
                widget.Prompt(),
                widget.WindowName(),
                widget.Chord(
                    chords_colors={
                        'launch': ("#222222", "#ffffff"),
                    },
                    name_transform=lambda name: name.upper(),
                ),