示例#1
0
def get_netstats():
    return widget.Net(
        format="{down} " + fa.icons["arrow-circle-down"] +
        fa.icons["arrow-circle-up"] + " {up}",
        update_interval=2,
        mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("rofi-wifi-menu")},
    )
示例#2
0
def wid_top_main_screen():
    return [
        widget.TextBox(text='',
                       fontsize=25,
                       padding=10,
                       mouse_callbacks={'Button1': rofi_show_run}),
        widget.Sep(linewidth=0, padding=5),
        wid_groups(),
        widget.WindowName(),
        widget.Wlan(interface="wlp4s0", format='{essid}'),
        widget.Net(interface="wlp4s0", format='{down} ↓↑ {up}', padding=1),
        custom_sep(),
        widget.CurrentLayoutIcon(scale=0.9),
        custom_sep(),
        widget.KeyboardLayout(configured_keyboards=['us', 'latam'],
                              option="grp:win_space_toggle"),
        custom_sep(),
        widget.Systray(),
        custom_sep(),
        custom_clock(),
        widget.TextBox(text=' ',
                       fontsize=15,
                       padding=3,
                       mouse_callbacks={'Button1': logout_action}),
    ]
示例#3
0
文件: config.py 项目: nymann/dotfiles
def default_bar() -> bar.Bar:
    return bar.Bar(
        [
            widget.GroupBox(
                active=Colors.foreground,
                hide_unused=False,
                inactive=Colors.comments,
                highlight_method="line",
                highlight_color=Colors.background,
                this_current_screen_border=Colors.red,
                padding=5,
                margin=5,
            ),
            sep,
            widget.WindowName(),
            sep,
            widget.Net(format="<b>祝{up} {down}</b>", prefix="M"),
            sep,
            widget.Clock(format="<b> %Y-%m-%d %H:%M</b>"),
            sep,
            BatteryWidget(),
            sep,
            widget.KeyboardLayout(),
            sep,
            VolumeWidget(),
            sep,
            PublicIpWidget(),
        ],
        28,
        background=Colors.background_night,
        border_width=0,
        padding=5,
        margin=[0, 0, 5, 0],
        border_color=Colors.foreground,
    )
示例#4
0
文件: qtile.py 项目: leanNiki/config
def getBar():
    return bar.Bar([
        widget.GroupBox(margin_x=0,
                        margin_y=3,
                        borderwidth=0,
                        padding_x=10,
                        rounded=False,
                        disable_drag=True,
                        highlight_method="block",
                        this_current_screen_border="a1b56c",
                        this_screen_border="505a36",
                        other_screen_border="888888",
                        inactive="d0d0d0",
                        active=foreground,
                        background=background),
        widget.Prompt(),
        widget.WindowName(
            foreground=foreground,
            background=background,
        ),
        widget.Notify(
            foreground=foreground,
            background=background,
        ),
        widget.Battery(background="#a1b56c",
                       low_foreground=white,
                       low_percentage=0.15,
                       update_delay=10,
                       charge_char="+",
                       discharge_char="-",
                       format='{char} {percent:2.0%} {hour:d}:{min:02d}'),
        widget.Net(interface="wlo1",
                   foreground=white,
                   background="#a1b56c",
                   format='{down} ↓↑ {up}'),
        widget.Wlan(
            interface="wlo1",
            background="#a1b56c",
            format='{essid} {percent:2.0%}',
        ),
        widget.Memory(background=yellow, ),
        widget.CPU(background=yellow, format='C: {load_percent}%'),
        widget.TextBox(
            text="V:",
            background=yellow,
        ),
        widget.Volume(background=yellow, ),
        widget.Clock(
            format="%a %d %b %H:%M:%S",
            background=blue,
        ),
        widget.YahooWeather(
            woeid='551801',
            format='{current_observation_condition_temperature}°C',
            background=blue,
        ),
        widget.Systray(background=blue, ),
    ], 20)
示例#5
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"),
    ]
示例#6
0
    def net():
        # Workaround to get rid of decimals
        class Formatter:
            @staticmethod
            def format(interface, down, up):
                return ' '.join([
                    '\U0001F4F6',
                    '{:>3}'.format(down.strip()[:down.find('.')]), '↓↑',
                    '{:>3}'.format(up.strip()[:up.find('.')]), 'B'
                ])

        return widget.Net(background=colors['highlight'], format=Formatter)
示例#7
0
def bottom_bar():
    return bar.Bar([
        widget.HDDBusyGraph(device='nvme0n1p1'),
        widget.CPU(format='CPU {load_percent}%'),
        # memory_widget.Memory(),
        widget.Net(format='{down} ↓↑ {up}'),
        # widget.CheckUpdates(custom_command="checkupdates"),
        widget.KeyboardLayout(configured_keyboards=['us','hu']),
        widget.Spacer(),
        widget.GroupBox(inactive=colors['very-soft-red']),
        widget.Prompt(),
    ],
                   size=BAR_HEIGHT,
                    background=colors['deep-blue'],
                   )
示例#8
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
示例#9
0
def network(bg=theme.background, fg=theme.foreground):
    return [
        widget.TextBox(
            text="",
            font=theme.font_awesome,
            fontsize=theme.icon_size,
            padding_x=2,
            foreground=fg,
            background=bg,
        ),
        widget.Net(
            font=theme.font_bold,
            interface="eno1",
            format="{down} | {up}",
            foreground=fg,
            background=bg,
            padding=5,
        ),
    ]
示例#10
0
     [
         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("­ЪћІ"),
         #widget.Sep(linewidth=2, padding=2),
         widget.TextBox("­ЪЋњ"),
         widget.Clock(format='%a %d.%m.%Y - %H:%M'),
         #widget.Sep(linewidth=2, padding=2),
         #widget.TextBox("­ЪљІ"),
         #widget.Pacman(execute = "", update_interval = 1800),
     ],
     24,
 ), ), )
示例#11
0
                      forground_alert=colours["red"],
                      tag_sensor="Tdie"),
 widget.Sep(),
 widget.TextBox(text="", fontsize="32", foreground=colours["yellow"]),
 widget.CPU(foreground=colours["fg_normal"],
            format="{load_percent}% {freq_current}GHz",
            update_interval=3.0),
 widget.Sep(),
 widget.TextBox(text="", fontsize="32", foreground=colours["yellow"]),
 widget.Memory(foreground=colours["fg_normal"],
               format="{MemUsed}/{MemTotal}MiB",
               update_interval=3.0),
 widget.Sep(),
 widget.TextBox(text="", fontsize="32", foreground=colours["yellow"]),
 widget.Net(foreground=colours["fg_normal"],
            update_interval=3.0,
            format="{down}↓ {up}↑",
            interface="enp8s0"),
 widget.Sep(),
 widget.TextBox(text="", fontsize="32", foreground=colours["yellow"]),
 widget.Volume(device="pulse"),
 widget.Sep(),
 widget.TextBox(text="", fontsize="32", foreground=colours["yellow"]),
 widget.CheckUpdates(colour_have_updates=colours["fg_highlight"],
                     colour_no_updates=colours["fg_dim"],
                     distro="Arch_checkupdates",
                     display_format="{updates}",
                     no_update_string="0",
                     update_interval=1800),
 widget.Sep(),
 widget.Systray(icon_size=32),
 widget.Sep(),
示例#12
0
文件: config.py 项目: AlexJavor/qtile
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
示例#13
0
        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()

# SCREENS

screens = [Screen(top=bar.Bar(laptop_widgets, 24, opacity=0.95))]
示例#14
0
     foreground=colors[13],
     fontsize=37,
     padding=-5,
     text='',
 ),
 widget.Spacer(),
 widget.TextBox(
     background=colors[17],
     foreground=colors[13],
     fontsize=37,
     padding=-5,
     text='',
 ),
 widget.Net(
     background=colors[13],
     format='{down}  ↓↑{up}',
     interface='enp3s0',
 ),
 widget.TextBox(
     background=colors[13],
     foreground=colors[17],
     fontsize=37,
     padding=-5,
     text='',
 ),
 widget.CPU(background=colors[17], padding=5),
 widget.TextBox(
     background=colors[17],
     foreground=colors[13],
     fontsize=37,
     padding=-5,
示例#15
0
                #         padding = 5,
                #         foreground = colors[7],
                #         background = colors[0]
                #         ),
                widget.TextBox(
                        text = ' ',
                        foreground = colors[8],
                        background = colors[0],
                        padding = -1,
                        fontsize = 20
                        ),

                widget.Net(
                        interface = "wlp3s0",
                        format = '{down}',
                        foreground = colors[5],
                        background = colors[8],
                        padding = 5
                        ),
                widget.TextBox(
                        text = "祝",
                        fontsize = 16,
                        padding = 5,
                        foreground = colors[8],
                        background = colors[5]
                        ),
                widget.Net(
                        interface = "wlp3s0",
                        format = '{up}',
                        foreground = colors[5],
                        background = colors[8],
示例#16
0
        widget.WindowName(
            padding=5,
            **set_colors(),
            **default_args,
        )
    ]


widget_primary = [
    *workspaces(),
    larger_sep,
    arrow_left(fg="CYAN"),
    icon(bg="CYAN", text='  '),
    widget.Net(
        padding=5,
        interface='wlp0s20f3',
        format='{down} ↓↑ {up}',
        **set_colors(bg='CYAN', fg="BLACK"),
    ),
    arrow_left(fg="YELLOW", bg="CYAN"),
    icon(bg="YELLOW", text=''),
    widget.Memory(padding=5,
                  mouse_callbacks={
                      'Button1': lambda: qtile.cmd_spawn('alacritty -e htop')
                  },
                  format='{MemUsed: .0f} -- {MemTotal: .0f}',
                  **set_colors(bg="YELLOW", fg="BLACK")),
    arrow_left(fg="CYAN", bg="YELLOW"),
    icon(bg="CYAN", text=' '),
    widget.Clock(
        **set_colors(bg='CYAN', fg="BLACK"),
        format='%a %d/%m/%Y - %H:%M ',
示例#17
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
示例#18
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
示例#19
0
screens = [
    Screen(bottom=bar.Bar(
        widgets=[
            widget.AGroupBox(),
            widget.CurrentScreen(),
            widget.GroupBox(invert_mouse_wheel=False,
                            center_aligned=True,
                            spacing=0,
                            highlight_method='block',
                            inactive='999999'),
            widget.currentlayout.CurrentLayout(),
            widget.currentscreen.CurrentScreen(),
            widget.Prompt(),
            widget.WindowName(),
            widget.Net(interface='wlan0'),
            widget.Memory(fmt="{MemAvailable}M/{MemTotal}M",
                          update_interval=10),
            widget.volume.Volume(),
            widget.battery.Battery(low_percentage=0.3),
            widget.backlight.Backlight(backlight_name='intel_backlight'),
            widget.Clock(format='%Y-%m-%e %H:%M:%S'),
            widget.Systray(),
        ],
        size=30,
        background=['000000'],
    ), ),
]

screen_name = 'qwer'
for i in range(0, count_screen()):
示例#20
0
                                 ),
                widget.TextBox("▒", foreground='4455ff', fontsize=30, padding=0)
            ],
            24,
            # background="#010328",
            opacity=1,
            margin=2,
        ),
        bottom=bar.Bar(
            [
                widget.CurrentLayoutIcon(),
                widget.CPU(format="CPU: {freq_current}GHz, {load_percent}%"),
                widget.CPUGraph(),
                widget.Memory(),
                widget.MemoryGraph(),
                widget.Net(format='Down: {down} Up: {up}'),
                widget.NetGraph(),
            ],
            24,
            opacity=0.9,
        ),
    ),
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod], "Button3", lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front())
示例#21
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[2],
                   background=colors[0]),
        widget.GroupBox(font="Ubuntu Bold",
                        fontsize=33,
                        margin_y=3,
                        margin_x=0,
                        padding_y=5,
                        padding_x=5,
                        borderwidth=3,
                        active=colors[2],
                        inactive=colors[2],
                        rounded=False,
                        highlight_color=colors[1],
                        highlight_method="line",
                        this_current_screen_border=colors[3],
                        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="Hack Nerd Font Bold",
                      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.TextBox(text='◢',
                       background=colors[0],
                       foreground=colors[4],
                       padding=0,
                       fontsize=70),
        widget.TextBox(text=" 🖬",
                       foreground=colors[2],
                       background=colors[4],
                       padding=0,
                       fontsize=14),
        widget.Memory(foreground=colors[2], background=colors[4], padding=5),
        widget.TextBox(text='◢',
                       background=colors[4],
                       foreground=colors[5],
                       padding=0,
                       fontsize=70),
        widget.Net(interface="wlp60s0",
                   format='{down} ↓↑ {up}',
                   foreground=colors[2],
                   background=colors[5],
                   padding=5),
        widget.TextBox(text='◢',
                       background=colors[5],
                       foreground=colors[4],
                       padding=0,
                       fontsize=70),
        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=0,
                       fontsize=70),
        widget.Battery(charge_char='',
                       full_char='',
                       empty_char='',
                       discharge_char='',
                       unknown_char='',
                       format='{char} {percent: 1.0%}',
                       foreground=colors[2],
                       background=colors[5]),
        widget.TextBox(text='◢',
                       background=colors[5],
                       foreground=colors[4],
                       padding=0,
                       fontsize=70),
        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=70),
        widget.Clock(foreground=colors[2],
                     background=colors[5],
                     format="%A, %B %d  [ %H:%M ]"),
        widget.Sep(linewidth=0,
                   padding=10,
                   foreground=colors[0],
                   background=colors[5]),
        widget.Systray(background=colors[0], padding=5),
    ]
    return widgets_list
示例#22
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
示例#23
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
示例#24
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
示例#25
0
			),
		widget.Battery(
			charge_char = '^',
			discharge_char = 'v',
			notify_below = 10,
			padding = 5,
			format = '{percent:2.0%}'
			),
		widget.TextBox(
			text = " ☁",
			padding = 0,
			fontsize = 18,
			foreground= color['light_blue']
			),
		widget.Net(
			interface= None,
			format = '{down}↓↑{up}',
			),
		widget.TextBox(
			text = " 🕳",
			fontsize = 18,
			foreground = color['light_blue']
			),
		widget.Clock(
                        format="%A, %B %d [ %H:%M ]"
                        ),
		widget.Systray(),
		widget.TextBox(
			text=' ',
			),
            ],
	    **bar_defaults),
示例#26
0
def init_widgets_list():
    widgets_list = [
              widget.TextBox(
                       text = '',
                       background = colors[0],
                       foreground = colors[3],
                       padding = 10,
                       fontsize = 15
                       ),                   
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),                   
              widget.GroupBox(
                       font = "FiraCode Bold",
                       fontsize = 10,
                       active = colors[7],
                       inactive = colors[1],
                       block_highlight_text_color = colors[8],
                       highlight_color = colors[8],
                       highlight_method = "border",
                       this_current_screen_border = colors[8],
                       this_screen_border = colors [8],
                       other_current_screen_border = colors[0],
                       other_screen_border = colors[0],
                       urgent_border = colors[9],
                       disable_drag = True
                       ),
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),         
              widget.CurrentLayout(
                       foreground = colors[7],
                       background = colors[0],
                       padding = 5
                       ),
              widget.WindowCount(
                       show_zero = True,
                       background = colors[0],
                       foreground = colors[7],
                       padding = 5
                       ),
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),                  
              widget.WindowName(
                       font = "FiraCode Bold",
                       fontsize = 10,
                       foreground = colors[3],
                       background = colors[0],
                       ),                 
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),
              widget.TextBox(
                       text = "直 ",
                       padding = 2,
                       foreground = colors[6],
                       background = colors[0],
                       fontsize = 15
                       ),          
              widget.Net(
                       format = '{down} ↓ ↑ {up}',
                       foreground = colors[6],
                       background = colors[0],
                       padding = 5
                       ),
               widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),         
               widget.TextBox(
                       text = "﬙",
                       padding = 2,
                       foreground = colors[10],
                       background = colors[0],
                       fontsize = 15
                       ),               
               widget.CPU(
                       format = '{freq_current}GHz {load_percent}%',
                       foreground = colors[10],
                       background = colors[0],
                       padding = 5
                       ),         
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),         
              widget.TextBox(
                       text = "",
                       padding = 2,
                       foreground = colors[5],
                       background = colors[0],
                       fontsize = 15
                       ),
              widget.ThermalSensor(
                       foreground = colors[5],
                       background = colors[0],
                       threshold = 90,
                       padding = 5
                       ),
               widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),         
              widget.TextBox(
                       text = "",
                       foreground = colors[4],
                       background = colors[0],
                       fontsize = 15
                       ),
              widget.Memory(
                       foreground = colors[4],
                       background = colors[0],
                       padding = 5
                       ),         
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),
              widget.TextBox(
                       text = " ",
                       padding = 2,
                       foreground = colors[8],
                       background = colors[0],
                       fontsize = 15
                       ),                  
              widget.Clock(
                       foreground = colors[8],
                       background = colors[0],
                       padding = 5,
                       format = "%A, %b %d - %H:%M"
                       ),
              widget.TextBox(
                       text = '|',
                       background = colors[0],
                       foreground = colors[3],
                       fontsize = 10
                       ),         
              widget.Systray(
                       icon_size = 15,
                       foreground = colors[3],
                       background = colors[0],
                       padding = 10
                       ),        
              ]
    return widgets_list
示例#27
0
        top=bar.Bar(
            [
                # 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.
示例#28
0
     padding=0
     ),
 widget.Memory(
     foreground=colors[3],
     background=colors[0],
     padding=5,
     ),
 widget.TextBox(
     text=" Net:",
     foreground=colors[2],
     background=colors[0],
     padding=0
     ),
 widget.Net(
     interface="wlp0s20f3",
     frequency=5,
     format='{down}/{up}',
     ),
 widget.TextBox(
     text=" Vol:",
     foreground=colors[2],
     background=colors[0],
     padding=0
     ),
 widget.Volume(
     foreground=colors[3],
     background=colors[0],
     padding=5
     ),
 widget.Clock(
     format='%a-%Y-%m-%d  %H:%M',
示例#29
0
    powerline('color4', 'dark'),
    widget.TextBox(**base(bg='color4'), text=' rchLinux'),

    # icon(bg="color4", text=' '), # Icon: nf-fa-download
    # widget.CheckUpdates(
    #     background=colors['color4'],
    #     colour_have_updates=colors['text'],
    #     colour_no_updates=colors['text'],
    #     no_update_string='0',
    #     display_format='{updates}',
    #     update_interval=1800,
    #     custom_command='checkupdates',
    # ),
    powerline('color3', 'color4'),
    icon(bg="color3", text=' '),  # Icon: nf-fa-feed
    widget.Net(**base(bg='color3'), interface='wlp2s0'),
    powerline('color2', 'color3'),
    widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
    widget.CurrentLayout(**base(bg='color2'), padding=5),
    powerline('color1', 'color2'),
    icon(bg="color1", fontsize=17, text=' '),  # Icon: nf-mdi-calendar_clock
    widget.Clock(**base(bg='color1'), format='%d/%m/%Y - %H:%M '),
    powerline('dark', 'color1'),
    widget.Systray(background=colors['dark'], padding=5),
]

secondary_widgets = [
    *workspaces(),
    separator(),
    powerline('color1', 'dark'),
    widget.CurrentLayoutIcon(**base(bg='color1'), scale=0.65),
示例#30
0
if num_screens[hostname] == 4:
    # 4 Screens (Desktop)
    chat_bar = bar.Bar([
        widget.CurrentLayoutIcon(
            scale=0.9,
            foreground="EFEFEF",
        ),
        Keywidget(),
        widget.GroupBox(),
        widget.Sep(linewidth=2, size_percent=100, padding=12),
        widget.Prompt(),
        widget.TaskList(),
        widget.DF(),
        widget.Pomodoro(length_pomodori=20),
        widget.Systray(),
        widget.Net(interface="eno1"),
        widget.Sep(**soft_sep),
        widget.Volume(update_interval=1),
        widget.Sep(**soft_sep),
        widget.ThermalSensor(update_interval=5),
        widget.Sep(**soft_sep),
        widget.Memory(),
        widget.Sep(**soft_sep),
        widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
    ], 30)
    main_bar = bar.Bar([
        widget.CurrentLayoutIcon(
            scale=0.9,
            foreground="EFEFEF",
        ),
        widget.GroupBox(),