コード例 #1
0
ファイル: config.py プロジェクト: mikelward/conf
def screen(main=True):
    top = bar.Bar(
        widgets=list(
            filter(
                None,
                [
                    widget.GroupBox(),
                    widget.Prompt(),
                    widget.Spacer(),
                    widget.CurrentLayout(),
                    widget.Sep(),
                    widget.WindowName(width=bar.CALCULATED, show_state=False),
                    widget.Spacer(),
                    widget.Clipboard(max_width=30),
                    widget.Clock(format="%b %-d %H:%M"),
                    (widget.PulseVolume() if main else None),
                    (widget.Systray() if main else None),
                ],
            )),
        size=24,
    )

    def update_bar_background():
        if top.screen == top.qtile.current_screen:
            top.background = '#000000'
        else:
            top.background = '#666666'
        top.draw()

    hook.subscribe.current_screen_change(update_bar_background)

    return Screen(top=top)
コード例 #2
0
ファイル: config.py プロジェクト: Douile/dotfiles
def generic_bar(systray=False):
    widgets = [
        widget.CurrentScreen(background=BAR_COLOR_NETWORK,
                             active_color='ffffff',
                             inactive_color='ffffff'),
        widget.GroupBox(disable_drag=True,
                        hide_unused=True,
                        this_current_screen_border=BAR_COLOR_CPU,
                        background=BAR_COLOR_NETWORK),
        widget.CurrentLayout(background=BAR_COLOR_NETWORK),
        custom_widget.Powerline(foreground=BAR_COLOR_NETWORK,
                                background=BAR_COLOR_MUSIC,
                                right=True),
        widget.WindowName(show_state=True,
                          width=bar.CALCULATED,
                          background=BAR_COLOR_MUSIC,
                          max_chars=120),
        custom_widget.Powerline(foreground=BAR_COLOR_MUSIC, right=True),
        widget.Spacer(length=bar.STRETCH),
    ]

    if systray:
        widgets.extend([
            widget.Systray(),
            widget.Spacer(length=5),
        ])

    widgets.extend(static_widgets)
    return bar.Bar(widgets, 24, background='#000000.0', opacity=1)
コード例 #3
0
def get_top_bar():
    return bar.Bar(
        [
            widget.Spacer(length=8),
            get_groupbox(),
            # widget.WindowName(font="Noto Sans", fontsize=13),
            widget.Spacer(),
            # widget.Notify(),
            widget.Cmus(
                noplay_color=colors["black"],
                play_color=colors["green"],
                fontsize=10,
            ),
            get_line_sep(),
            widget.TextBox(fmt=fa.icons["monero"], foreground=colors["white"]),
            widget.GenPollText(
                func=get_xmr_price,
                update_interval=60,
            ),
            widget.GenPollText(
                func=get_xmr_btc,
                update_interval=60,
                fontsize=10,
            ),
            get_line_sep(),
            widget.TextBox(fmt=fa.icons["bitcoin"],
                           foreground=colors["white"]),
            widget.GenPollText(
                func=get_btc_price,
                update_interval=60,
            ),
            get_line_sep(),
            get_diskinfo(),
            get_line_sep(),
            widget.TextBox(fmt=fa.icons["hdd"]),
            get_cpu(),
            get_line_sep(),
            widget.TextBox(fmt=fa.icons["server"]),
            get_netstats(),
            # get_updates(),  # not working properly
            get_line_sep(),
            widget.TextBox(fmt=fa.icons["headphones"]),
            get_volume(),
            get_line_sep(),
            widget.Systray(),
            get_line_sep(),
            get_battery(),
            get_line_sep(),
            get_keyboard(),
            get_line_sep(),
            get_clock(),
            widget.Spacer(length=8),
        ],
        34,
        background=colors["background"],
    )
コード例 #4
0
ファイル: config.py プロジェクト: mbenford/dotfiles
def widgets_center():
    return [
        widget.Spacer(),
        widget.Clock(
            format="%a %d %H:%M",
            foreground=theme.clock["fg"],
            background=theme.clock["bg"],
        ),
        widget.Spacer(),
    ]
コード例 #5
0
ファイル: config.py プロジェクト: Netflux/dotfiles
def topbar_widgets():
    widgets = []

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

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

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

    return widgets
コード例 #6
0
ファイル: widgets.py プロジェクト: torcor-dev/.dotfiles
 def window_title(self, center=True):
     if center:
         width = bar.CALCULATED
         widgets = [
             widget.Spacer(),
             widget.WindowName(width=width),
             widget.Spacer(),
         ]
     else:
         widgets = [widget.WindowName()]
     return WidgetGrouping(
         widgets,
         group_coloring=self.group_coloring,
     )
コード例 #7
0
ファイル: widgets.py プロジェクト: tomato4/dotfiles
def init_default_widgets():
    widgets = [
        default_separator(),
        widget.GroupBox(
            # font = "Ubuntu Bold",
            margin_y=3,
            margin_x=0,
            padding_y=5,
            padding_x=6,
            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.Spacer(),
        widget.CPU(format="{load_percent:>3.0f}%"),
        widget.Clock(foreground=colors[2],
                     background=colors[5],
                     format="%A, %d %b %H:%M:%S"),
    ]
    return widgets
コード例 #8
0
ファイル: config.py プロジェクト: krajp54/.dotfiles
def wid_bottom_main_screen():
    return [
        widget.Cmus(play_color=hard_color, noplay_color=soft_color),
        widget.Sep(linewidth=0),
        widget.Spacer(),
        widget.TextBox(text="", fontsize=18),
        widget.CheckUpdates(update_interval=3600,
                            distro='Arch',
                            display_format='Updates: {updates}',
                            custom_command='checkupdates',
                            no_update_string='N/A'),
        widget.TextBox(text='﬙',
                       fontsize=18,
                       mouse_callbacks={'Button1': launch_stacer}),
        widget.CPU(format='CPU: {load_percent}%'),
        widget.TextBox(text='',
                       fontsize=18,
                       mouse_callbacks={'Button1': launch_htop}),
        widget.Memory(format='Mem: {MemUsed}M'),
        widget.TextBox(text='',
                       fontsize=18,
                       mouse_callbacks={'Button1': launch_fe}),
        widget.DF(format='({uf}{m}|{r:.0f}%)', visible_on_warn=False),
        widget.TextBox(text='墳',
                       fontsize=18,
                       mouse_callbacks={'Button1': launch_pavucontrol}),
        widget.PulseVolume(),
        widget.TextBox(text='', fontsize=18),
        widget.Backlight(backlight_name='amdgpu_bl0',
                         brightness_file=br_path,
                         max_brightness_file=br_max_path,
                         change_command='brightnessctl set {0}',
                         step=5),
    ]
コード例 #9
0
ファイル: widgets.py プロジェクト: pouralijan/DotFiles
def init_bottom_bar_widgets_list():
    """
    Init bottom bar widgets.
    """
    colors_list = colors.get_colors()
    widgets = []

    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets.append(
        widget.GroupBox(padding=3,
                        active=colors_list[7][1],
                        inactive=colors_list[6][1]))
    widgets.append(widget.TaskList())
    #widgets.append(widget.WindowTabs())
    widgets.append(
        widget.Prompt(
            prompt=prompt,
            font="Ubuntu Mono",
            padding=10,
        ))
    widgets.append(widget.Spacer())
    widgets.append(widget.CapsNumLockIndicator())
    widgets.append(widget.KeyboardLayout(configured_keyboards=["us", "ir"]))
    widgets.append(widget.CurrentLayoutIcon(scale=.7))
    widgets.append(widget.CurrentLayout(fmt="{:<8}"))
    widgets.append(
        widget.TextBox(font="Ubuntu Bold", text=" ♫", padding=5,
                       fontsize=14))
    widgets.append(widget.Cmus(
        max_chars=40,
        update_interval=0.5,
    ))
    return widgets
コード例 #10
0
def get_bar():
    return bar.Bar(
        [
            widget.GroupBox(
                active="98c379",
                inactive="abb2bf",
                this_current_screen_border="61afef",
                highlight_method="text",
                highlight_color=["282c34", "282c34"],
                center_aligned=True,
                rounded=False,
                borderwidth=0,
                padding=6,
            ),
            widget.Spacer(bar.STRETCH),
            widget.Systray(),
            widget.TextBox(
                text='',
                foreground="c678dd",
            ),
            widget.KeyboardLayout(),
            widget.TextBox(
                text='',
                foreground="56b6c2",
            ),
            widget.Battery(format='{percent:2.0%}'),
            widget.TextBox(
                text='',
                foreground="e5c07b",
            ),
            widget.Volume(),
            widget.TextBox(
                text='',
                foreground="61afef",
            ),
            widget.Backlight(
                backlight_name="intel_backlight",
                #padding=0,
                #margin=0,
                format='{percent: 2.0%}'),
            widget.TextBox(
                text='',
                foreground="98c379",
            ),
            widget.Clock(format='%B %d (%a) %H:%M', ),
            widget.TextBox(
                text='',
                foreground="e06c75",
            ),
            widget.Wlan(
                interface="wlp5s0",
                format="{essid}",
            ),
        ],
        28,
        margin=0,
        opacity=0)
コード例 #11
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0, padding=3),
        widget.CurrentScreen(
            active_text="◉",
            active_color=colors[3],
            inactive_text="◉",
            inactive_color=colors[1],
            padding=2,
        ),
        widget.CurrentLayoutIcon(scale=0.57, padding=2),
        widget.GroupBox(
            margin_x=2,
            padding_y=2,
            padding_x=3,
            borderwidth=1,
            disable_drag=True,
            active=colors[5],
            inactive=colors[2],
            rounded=True,
            hide_unused=True,
            highlight_color=colors[1],
            highlight_method="border",
            this_current_screen_border=colors[2],
            this_screen_border=colors[4],
            other_current_screen_border=colors[1],
            other_screen_border=colors[1],
        ),
        widget.Sep(linewidth=0, padding=20),
        widget.WindowTabs(),
        widget.Sep(linewidth=0, padding=20),
        widget.Notify(audiofile=qtile_dir + "/.sounds/notify-sound.mp3"),
        widget.Sep(linewidth=0, padding=20),
        widget.Spacer(length=bar.STRETCH),
        widget.CheckUpdates(),
        widget.Sep(linewidth=0, padding=20),
        widget.Battery(
            discharge_char="-",
            charge_char="+",
            unknown_char="*",
            update_interval=30,
            format="{char}{percent:2.0%}",
        ),
        widget.Sep(linewidth=0),
        widget.Wlan(
            interface="wlp0s20f3",
            disconnected_message="W: N/A",
            format="{essid}",
        ),
        widget.Sep(linewidth=0),
        widget.Volume(),
        widget.Sep(linewidth=0),
        widget.Clock(format="%a, %H:%M (%d/%m)", update_interval=60),
        widget.Sep(linewidth=0),
    ]
    return widgets_list
コード例 #12
0
def screen_widget():

    if num_monitors > 1:
        return widget.CurrentScreen(**widget_theme,
                                    active_color=colors[4],
                                    active_text='||',
                                    inactive_text='||',
                                    inactive_color=colors[3])
    else:
        return widget.Spacer(background=colors[0], length=10)
コード例 #13
0
def init_widgets_bottom():
    widgets_bottom = [
        widget.GroupBox(
            font="FuraMono Nerd",
            fontsize = 16,
            margin_y = 0,
            margin_x = 0,
            padding_y = 5,
            padding_x = 5,
            borderwidth = 1,
            spacing = 4,
            active = colors[2],
            inactive = colors[2],
            rounded = False,
            highlight_method = "block",
            this_current_screen_border = colors[1],
            this_screen_border = colors [4],
            other_current_screen_border = colors[0],
            other_screen_border = colors[0],
            foreground = colors[2],
            background = colors[0]
        ),
        widget.Spacer(
        ),
        widget.TextBox(
            font = "FuraMono Nerd",
            text = "",
            padding = 5,
            background = colors[0],
            fontsize = 14
        ),
        widget.Memory(
            fmt = '{MemUsed}M',
            update_interval = 1,
            background = colors[0]
        ),
        widget.TextBox(
            font = "FuraMono Nerd",
            text = "",
            foreground = colors[2],
            background = colors[0],
            padding = 5,
            fontsize = 14
        ),
        widget.ThermalSensor(
            foreground = colors[2],
            background = colors[0],
        ),
        widget.Sep(
            linewidth = 0,
            padding = 5,
            foreground = colors[0],
            background = colors[0]
        )]
    return widgets_bottom
コード例 #14
0
def setup_screens(num_screens: int = 1) -> None:
    """
    Setup screens list according to a given number
    """
    screens.clear()
    for _ in range(num_screens):
        bar_instance = bar.Bar(
            [
                # Left
                widget.GroupBox(
                    disable_drag=True,
                    hide_unused=True,
                ),
                widget.Prompt(),

                # Center
                widget.Spacer(),
                widget.WindowName(),
                widget.Spacer(),

                # Right
                *additional_widgets_right,
                *resources_widgets,
                *clock_widgets,
                widget.Systray(),
                widget.KeyboardLayout(
                    #TODO: Add mouse callbacks to switch keyboard layout
                    display_map={
                        'us': '\U0001F1FA\U0001F1F8',
                        'pt': '\U0001F1F5\U0001F1F9',
                    }, ),
            ],
            18,
        )

        screen_instance = Screen(
            top=bar_instance,
            wallpaper='~/wallpapers/mac_computer.jpg',
            wallpaper_mode='fill',
        )

        screens.append(screen_instance)
コード例 #15
0
ファイル: apperance.py プロジェクト: GergelyH/linux-config
def top_bar():
    return bar.Bar([
        widget.Spacer(),
        widget.Systray(),
        widget.Clock(
            format='%b-%d %a %H:%M'
        ),
    ],
                   size=BAR_HEIGHT,
                    background=colors['deep-blue'],
                   )
コード例 #16
0
ファイル: config.py プロジェクト: mbenford/dotfiles
def with_glyph(glyph, w):
    w.padding = 0
    return [
        widget.Spacer(
            length=5,
        ),
        widget.TextBox(
            font='Material Icons',
            foreground=theme.widgets["label_fg"],
            text=glyph,
            padding=0,
        ),
        widget.Spacer(
            length=5,
        ),
        w,
        widget.Spacer(
            length=5,
        )
    ]
コード例 #17
0
ファイル: config.py プロジェクト: toberge/dotfiles
def create_bar(main=False):
    widgets = [
        w.CurrentLayoutIcon(scale=0.8, foreground=colors["foreground"]),
        w.GroupBox(
            active=colors["foreground"],
            inactive=colors["color8"],
            other_current_screen_border=colors["color8"],
            other_screen_border=colors["color8"],
            this_current_screen_border=colors["color4"],
            this_screen_border=colors["color12"],
            urgent_border=colors["color1"],
            urgent_text=colors["color1"],
            disable_drag=True,
        ),
        w.TextBox("", fontsize=22),
        w.Spacer(),
        w.TextBox("", fontsize=22),
        *[
            w.DF(
                foreground=colors["color1"],
                format=" <span weight='bold'>{p} ({uf}{m}|{r:.0f}%)</span>",
                partition=path,
                warn_space=5,
            )
            for path in ["/", "/home/"]
        ],
        w.PulseVolume(emoji=False, fmt="墳 <span weight='bold'>{}</span>"),
        w.Battery(
            battery="BAT0",
            unknown_char="",
            charge_char="",
            discharge_char="",
            empty_char="",
            format="{char} <span weight='bold'>{percent:2.0%}</span>",
        ),
        w.Clock(fmt=" <span weight='bold'>{}</span>"),
    ]
    if main:
        widgets.append(w.Systray())
    else:
        widgets.append(
            w.CPUGraph(
                border_width=2,
                border_color=colors["color7"],
                graph_color=colors["color7"],
                fill_color=colors["color7"],
            )
        )
    return Bar(
        widgets,
        bar_height,
        background=colors["background"],
        opacity=0.8,
    )
コード例 #18
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"),
    ]
コード例 #19
0
ファイル: config.py プロジェクト: blpearson44/dotfiles
def init_widgets_list_secondary():
    widgets_list = [
        widget.Spacer(length=2, background=colors[0]),
        # Left Side of the bar
        widget.GroupBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            foreground=colors[2],
            background=colors[0],
            borderwidth=15,
            highlight_method="text",
            this_current_screen_border=colors[5],
            active=colors[3],
            inactive=colors[4],
        ),
        widget.Sep(linewidth=3, margin=5, background=colors[0]),
        tasklist2,
        widget.TextBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            text=" ",
            foreground=colors[5],
            background=colors[0],
        ),
        widget.CurrentLayout(foreground=colors[2], background=colors[0]),
        widget.Spacer(length=bar.STRETCH, background=colors[0]),
        widget.TextBox(
            font="Iosevka Nerd Font",
            fontsize=25,
            text="⏻ ",
            foreground=colors[5],
            background=colors[0],
            mouse_callbacks={
                "Button1": lambda: qtile.cmd_spawn("shutdown -h now")
            },
        ),
        widget.Spacer(length=10, background=colors[0])
        # Right side of Bar
    ]
    return widgets_list
コード例 #20
0
ファイル: config.py プロジェクト: hgaiser/qtile-config
def makeBar(screen):
	widgets = [
		# Groups
		FlexibleGroupBox(formatGroup, font_size=12),
		widget.Spacer(length=8),

		# Current layout
		MultiTextBox(formatLayout, hooks=update_hooks, font_size=12),
		widget.Spacer(length=8),

		# Current window
		MultiTextBox(formatTitle, hooks=update_hooks, font_size=12),
		widget.Spacer(length=bar.STRETCH),
	]

	if screen == 0:
		if battery_name:
			widgets.extend([
				# Battery widget
				widget.BatteryIcon(**battery_icon_settings),
				widget.Battery(**battery_settings),
			])

		widgets.extend([
			# System tray
			widget.Systray(),
			widget.Spacer(length=8),
		])

	widgets.extend([
		# Clock
		widget.Clock(format='%a %d %b %Y %H:%M:%S', font='xft:monospace', fontsize=12, foreground='#ffaa00'),
		widget.Spacer(length=8),
	])

	bg_color =  toQtileColor(background(screenColor(screen)))

	return bar.Bar(widgets, 16, background=bg_color)
コード例 #21
0
ファイル: mywidgets.py プロジェクト: dlb04/dotfiles
def work_spaces():
    return [
        widget.GroupBox(
            active=commons.colors['fg'],
            inactive=commons.colors['inactive'],
            highlight_method='text',
            this_current_screen_border=commons.colors['active'],
            rounded=False,
            font=commons.font,
            disable_drag=True,
        ),
        widget.Spacer(length=bar.STRETCH),
        widget.WindowName(padding=5, max_chars=24),
    ]
コード例 #22
0
ファイル: config.py プロジェクト: erichamers/dotfiles
def launch_widgets():

    widgets = [
        widget.GroupBox(
            urgent_alert_method='block',
            highlight_method='block',
            rounded=False,
            disable_drag=True,
            this_screen_border=colors['background'],
            this_current_screen_border=colors['purple'],
            other_screen_border=colors['dark_gray'],
            other_current_screen_border=colors['dark_gray'],
            urgent_border=colors['red'],
            inactive=colors['current-line'],
            fontsize=font_size,
            padding_y=5,
            padding_x=8,
        ),
        widget.WindowName(foreground=colors['lighter_gray'], ),
        widget.Spacer(),
        widget.CurrentLayout(foreground=colors['lighter_gray'], ),
        widget.TextBox('\uf438',
                       foreground=colors['current-line'],
                       padding=-12,
                       fontsize=62),
        spawn_icon('\uf2c9', fontsize=14),
        widget.ThermalSensor(
            tag_sensor='Tctl',
            background=colors['current-line'],
            update_interval=1,
        ),
        spawn_icon('\ue266'),
        widget.Memory(format='{MemUsed} MB',
                      background=colors['current-line']),
        spawn_icon('\uf85a'),
        widget.CPU(format='{load_percent}%',
                   background=colors['current-line']),
        spawn_icon('\ufa7d'),
        widget.Volume(cardid=1, step=2, background=colors['current-line']),
        widget.TextBox('\uf438',
                       foreground=colors['background'],
                       background=colors['current-line'],
                       padding=-12,
                       fontsize=62),
        widget.Clock(background=colors['background'],
                     format='%A,%e %b. %H:%M:%S',
                     foreground=colors['foreground'])
    ]

    return widgets
コード例 #23
0
def set_widgets():
    sep = widget.Sep(
        linewidth=0,
        padding=50,
    )
    widgets = [
        widget.CurrentLayoutIcon(
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.CurrentLayout(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.Chord(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.GroupBox(
            active=fairyfloss[10],  # Active window font color
            highlight_method="block",
            inactive=fairyfloss[0],  # Inactive window font color
            other_current_screen_border=fairyfloss[9],
            other_screen_border=fairyfloss[9],
            this_current_screen_border=fairyfloss[15],  # Active and focused
            this_screen_border=fairyfloss[9],
        ),
        sep,
        widget.Spacer(length=bar.STRETCH),
        widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
        widget.Systray(),
        widget.Battery(
            format="{percent:2.0%}",
            low_percentage=0.1,
            notify_below=0.1,
        ),
        widget.QuickExit(
            countdown_start=10,
            default_text="[ Logout ]",
        ),
        widget.Wallpaper(
            directory=home + '/Media/Pictures/Wallpapers/kawaii',
            random_selection=True,
            fmt="",
        )
    ]
    return widgets
コード例 #24
0
ファイル: apperance.py プロジェクト: GergelyH/linux-config
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'],
                   )
コード例 #25
0
ファイル: widgets.py プロジェクト: pouralijan/DotFiles
def init_bottom_bar_widgets_list_sc():
    """
    Init bottom bar widgets.
    """
    colors_list = colors.get_colors()
    widgets = []
    widgets.append(
        widget.GroupBox(padding=3,
                        active=colors_list[7][1],
                        inactive=colors_list[6][1]))
    widgets.append(widget.Chord())
    widgets.append(widget.Spacer())
    widgets.append(widget.CurrentLayoutIcon(scale=.7))
    widgets.append(widget.CurrentLayout())
    return widgets
コード例 #26
0
ファイル: config.py プロジェクト: tbissell/dotfiles
def init_widgets():
    return [
        widget.GroupBox(
            font='Hack Bold',
            highlight_method='block',
            active=colors[2],
            inactive=colors[11],
            padding=0,
        ),
        widget.Prompt(),
        #widget.WindowName(),
        widget.Spacer(),
        widget.Systray(icon_size=20, padding=2),
        widget.Sep(),
        widget.CurrentScreen(),
        widget.Sep(),
        widget.Volume(foreground=colors[2]),
        widget.Sep(background=colors[0], padding=2),
        widget.CPUGraph(width=30,
                        border_width=1,
                        border_color="#000000",
                        frequency=5,
                        line_width=1,
                        samples=50),
        widget.MemoryGraph(
            width=30,
            border_width=1,
            border_color="#000000",
            frequency=5,
            line_width=1,
        ),
        widget.NetGraph(
            width=30,
            border_width=1,
            border_color="#000000",
            frequency=5,
            line_width=1,
        ),
        widget.Sep(background=colors[0], padding=2),
        widget.Memory(foreground=colors[2]),
        widget.Sep(background=colors[0], padding=2),
        widget.Clock(foreground=colors[2], format='%a %d %b %I:%M %p'),
        widget.CurrentLayoutIcon(foreground=colors[2]),
    ]
コード例 #27
0
ファイル: config.py プロジェクト: gBibbs/dotfiles
def init_widgets_list():
    widgets_list = [
        widget.GroupBox(fontsize=13,
                        borderwidth=2,
                        disable_drag=True,
                        active=colors[4],
                        inactive=colors[2],
                        rounded=True,
                        highlight_method="border",
                        highlight_color=colors[2],
                        this_current_screen_border=colors[4]),
        widget.CurrentLayoutIcon(scale=0.65),
        widget.Spacer(),
        #widget.WindowName(),
        widget.CPU(),
        widget.Memory(),
        widget.Systray(),
        widget.Clock(format='%a %b %d, %Y %I:%M %p'),
    ]
    return widgets_list
コード例 #28
0
ファイル: qtile_config.py プロジェクト: tbetcke/dotfiles
def create_default_bar():
    return bar.Bar(
        [
            widget.CurrentLayout(),
            widget.GroupBox(),
            widget.Prompt(),
            widget.Spacer(),
            widget.Chord(
                chords_colors={
                    "launch": ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.Sep(),
            widget.Wlan(
                interface="wlp111s0",
                format="{essid} {percent:2.0%}",
            ),
            widget.Sep(),
            widget.TextBox("Battery: "),
            widget.Battery(update_interval=5),
            widget.Sep(),
            widget.GenPollText(func=volume_poll, update_interval=1),
            widget.Sep(),
            widget.TextBox("Brightness: "),
            widget.Backlight(
                brightness_file=
                "/sys/class/backlight/intel_backlight/brightness",
                max_brightness_file=
                "/sys/class/backlight/intel_backlight/max_brightness",
            ),
            widget.Sep(),
            widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
            widget.QuickExit(),
            widget.Systray(),
        ],
        24,
    )
コード例 #29
0
def WidgetList():
    return [
        widget.GroupBox(font='Perfect DOS VGA 437 Win',
                        fontsize=16,
                        foreground=colors['white'],
                        active=colors['white'],
                        inactive=colors['black'],
                        highlight_method='block',
                        urgent_alert_method='block',
                        block_highlight_text_color=colors['black'],
                        this_screen_border=colors['white'],
                        this_current_screen_border=colors['white'],
                        rounded=False,
                        padding=5,
                        margin_x=0,
                        margin_y=3,
                        disable_drag=True,
                        use_mouse_wheel=False),
        widget.CurrentScreen(font='Perfect DOS VGA 437 Win',
                             fontsize=16,
                             padding=7),
        widget.CurrentLayout(font='Perfect DOS VGA 437 Win',
                             fontsize=16,
                             foreground=colors['white'],
                             padding=7),
        widget.Spacer(),
        widget.Notify(font='Perfect DOS VGA 437 Win', fontsize=16, padding=7),
        widget.Volume(font='Perfect DOS VGA 437 Win',
                      fontsize=16,
                      foreground=colors['white'],
                      padding=7,
                      fmt='Volume{}'),
        widget.Clock(font='Perfect DOS VGA 437 Win',
                     fontsize=16,
                     foreground=colors['white'],
                     padding=7,
                     format='%Y-%m-%d %a %I:%M %p')
    ]
コード例 #30
0
def create_widgets_list():
    widgets = [
        widget.GroupBox(),
        widget.Prompt(),
        widget.Spacer(SPACER),
        widget.WindowName(),
        widget.Spacer(SPACER),
        widget.Systray(),
        widget.Spacer(SPACER),
        widget.CPU(),
        widget.Spacer(SPACER),
        widget.Memory(),
        widget.Spacer(SPACER),
        widget.Volume(),
        widget.Spacer(SPACER),
        widget.Clock(format='%Y-%m-%d %a %I:%M %p')
    ]
    return widgets