Esempio n. 1
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.GroupBox(font="FontAwesome",
                        fontsize=16,
                        margin_y=-1,
                        margin_x=0,
                        padding_y=6,
                        padding_x=5,
                        borderwidth=0,
                        disable_drag=True,
                        active=colors[9],
                        inactive=colors[5],
                        rounded=False,
                        highlight_method="text",
                        this_current_screen_border=colors[8],
                        foreground=colors[2],
                        background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.CurrentLayout(font="Noto Sans Bold",
                             foreground=colors[5],
                             background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.WindowName(
            font="Noto Sans",
            fontsize=12,
            foreground=colors[5],
            background=colors[1],
        ),
        widget.Net(
            font="Noto Sans",
            fontsize=12,
            interface="enp0s31f6",
            foreground=colors[2],
            background=colors[1],
            padding=0,
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.NetGraph(
            font="Noto Sans",
            fontsize=12,
            bandwidth="down",
            interface="auto",
            fill_color=colors[8],
            foreground=colors[2],
            background=colors[1],
            graph_color=colors[8],
            border_color=colors[2],
            padding=0,
            border_width=1,
            line_width=1,
        ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # # do not activate in Virtualbox - will break qtile
        # widget.ThermalSensor(
        #          foreground = colors[5],
        #          foreground_alert = colors[6],
        #          background = colors[1],
        #          metric = True,
        #          padding = 3,
        #          threshold = 80
        #          ),
        # # battery option 1  ArcoLinux Horizontal icons do not forget to import arcobattery at the top
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        arcobattery.BatteryIcon(padding=0,
                                scale=0.7,
                                y_poss=2,
                                theme_path=home +
                                "/.config/qtile/icons/battery_icons_horiz",
                                update_interval=5,
                                background=colors[1]),
        # # battery option 2  from Qtile
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        # widget.Battery(
        #          font="Noto Sans",
        #          update_interval = 10,
        #          fontsize = 12,
        #          foreground = colors[5],
        #          background = colors[1],
        #          ),
        #widget.TextBox(
        #        font="FontAwesome",
        #        text="  ",
        #        foreground=colors[6],
        #        background=colors[1],
        #        padding = 0,
        #        fontsize=16
        #        ),
        #widget.CPUGraph(
        #        border_color = colors[2],
        #        fill_color = colors[8],
        #        graph_color = colors[8],
        #        background=colors[1],
        #        border_width = 1,
        #        line_width = 1,
        #        core = "all",
        #        type = "box"
        #        ),
        #widget.Sep(
        #        linewidth = 1,
        #        padding = 10,
        #        foreground = colors[2],
        #        background = colors[1]
        #        ),
        #widget.TextBox(
        #        font="FontAwesome",
        #        text="  ",
        #        foreground=colors[4],
        #        background=colors[1],
        #        padding = 0,
        #        fontsize=16
        #        ),
        #widget.Memory(
        #        font="Noto Sans",
        #        format = '{MemUsed}M/{MemTotal}M',
        #        update_interval = 1,
        #        fontsize = 12,
        #        foreground = colors[5],
        #        background = colors[1],
        #       ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.Systray(background=colors[1], icon_size=20, padding=4),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text="  ",
                       foreground=colors[3],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=12,
                     format="%H:%M"),
    ]
    return widgets_list
Esempio n. 2
0
def make_screen(systray=False):
    """Defined as a function so that I can duplicate this on other monitors"""
    def _separator():
        # return widget.Sep(linewidth=2, foreground=COLS["dark_3"])
        return widget.Sep(linewidth=2, foreground=COLS["deus_1"])

    blocks = [
        # Marker for the start of the groups to give a nice bg: ◢■■■■■■■◤
        widget.TextBox(
            font="Arial",
            foreground=COLS["dark_4"],
            # font="Arial", foreground=COLS["deus_3"],
            text="◢",
            fontsize=50,
            padding=-1),
        widget.GroupBox(
            other_current_screen_border=COLS["orange_0"],
            this_current_screen_border=COLS["blue_0"],
            # this_current_screen_border=COLS["deus_2"],
            other_screen_border=COLS["orange_0"],
            this_screen_border=COLS["blue_0"],
            # this_screen_border=COLS["deus_2"],
            highlight_color=COLS["blue_0"],
            # highlight_color=COLS["deus_2"],
            urgent_border=COLS["red_1"],
            background=COLS["dark_4"],
            # background=COLS["deus_3"],
            highlight_method="line",
            inactive=COLS["dark_2"],
            active=COLS["light_2"],
            disable_drag=True,
            borderwidth=2,
            **FONT_PARAMS,
        ),
        # Marker for the end of the groups to give a nice bg: ◢■■■■■■■◤
        widget.TextBox(
            font="Arial",
            foreground=COLS["dark_4"],
            # font="Arial", foreground=COLS["deus_3"],
            text="◤ ",
            fontsize=50,
            padding=-5),
        # Show the title for the focused window
        widget.WindowName(**FONT_PARAMS),
        # Allow for quick command execution
        widget.Prompt(
            cursor_color=COLS["light_3"],
            # ignore_dups_history=True,
            bell_style="visual",
            prompt="λ : ",
            **FONT_PARAMS),
        _separator(),
        # Resource usage graphs
        widget.CPUGraph(border_color=COLS["yellow_1"],
                        graph_color=COLS["yellow_1"],
                        border_width=1,
                        line_width=1,
                        type="line",
                        width=50,
                        **FONT_PARAMS),
        widget.MemoryGraph(border_color=COLS["blue_2"],
                           graph_color=COLS["blue_2"],
                           border_width=1,
                           line_width=1,
                           type="line",
                           width=50,
                           **FONT_PARAMS),
        widget.NetGraph(border_color=COLS["green_1"],
                        graph_color=COLS["green_1"],
                        border_width=1,
                        line_width=1,
                        type="line",
                        width=50,
                        **FONT_PARAMS),
        # IP information
        ShellScript(fname="ipadr.sh",
                    update_interval=10,
                    markup=True,
                    padding=1,
                    **FONT_PARAMS),
        # Available apt upgrades
        ShellScript(fname="aptupgrades.sh",
                    update_interval=600,
                    markup=True,
                    padding=1,
                    **FONT_PARAMS),
        # Current battery level
        ShellScript(fname="battery.sh",
                    update_interval=60,
                    markup=True,
                    padding=1,
                    **FONT_PARAMS),
        # Wifi strength
        ShellScript(fname="wifi-signal.sh",
                    update_interval=60,
                    markup=True,
                    padding=1,
                    **FONT_PARAMS),
        # Volume % : scroll mouse wheel to change volume
        widget.TextBox("", **FONT_PARAMS),
        widget.Volume(**FONT_PARAMS),
        _separator(),
        # Current time
        widget.Clock(format="%Y-%m-%d %a %I:%M %p", **FONT_PARAMS),
        # Keyboard layout
        widget.KeyboardLayout(configured_keyboards=['us', 'gb'],
                              **FONT_PARAMS),
        # Visual indicator of the current layout for this workspace.
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            **FONT_PARAMS),
    ]

    if systray:
        # Add in the systray and additional separator
        blocks.insert(-1, widget.Systray())
        blocks.insert(-1, _separator())

    # return Screen(top=bar.Bar(blocks, 25, background=COLS["deus_1"]))
    return Screen(top=bar.Bar(blocks, 25, background=COLS["dark_2"]))
Esempio n. 3
0
    fontsize=12,
    padding=3,
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        top=bar.Bar(
            [
                widget.CurrentLayout(),
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                # widget.TextBox("default config", name="default"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
                widget.QuickExit(),
            ],
            24,
        ), ),
]

# 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(),
Esempio n. 4
0
        [
            widget.GroupBox(active="#d3d0d8",
                            inactive="#747369",
                            highlight_method="text",
                            this_current_screen_border="#99cc99",
                            this_screen_border="#d3d0d8"),
            widget.Prompt(foreground="#d3d0d8"),
            widget.Spacer(),
            widget.Battery(foreground="#d3d0d8",
                           charge_char='↑',
                           discharge_char='↓',
                           low_foreground="#f2777a"),
            widget.Sep(foreground="#d3d0d8", size_percent=50),
            widget.Systray(),
            widget.Sep(foreground="#d3d0d8", size_percent=50),
            widget.Clock(format="%Y-%m-%d %a %H:%M", foreground="#d3d0d8")
        ],
        28,
        background="#2d2d2d",
    ), ),
]

# Add keybinds for applications
keys.extend([
    Key([mod, "mod1"], 'e', lazy.spawn("emacs")),
    Key([mod, "mod1"], 'f', lazy.spawn("firefox")),
    Key([mod, "mod1"], 'r', lazy.spawn("ranger")),
])

dgroups_key_binder = None
dgroups_app_rules = []
Esempio n. 5
0
def init_widgets_list():
	prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
	widgets_list = [widget.Sep(linewidth=0, 
								padding=6, 
								foreground=colors[1], 
								background=colors[0]),
					widget.GroupBox(font='ShureTechMono Nerd Font',
								fontsize=12,
								margin_y=0,
								margin_x=0,
								padding_y=5,
								padding_x=10,
								borderwitdh=1,
								active=colors[1],
								inactive=colors[1],
								rounded=False,
								highlight_method='block',
								this_current_screen_border=colors[3],
								this_screen_border=colors[3],
								other_current_screen_border=colors[0],
								other_screen_border=colors[0],
								background=colors[0]),
					widget.Sep(linewidth=0,
								padding=6,
								foreground=colors[1],
								background=colors[0]),
					widget.Prompt(prompt=prompt,
								background=colors[4],
								foreground=colors[15]),
					widget.WindowName(foreground=colors[7]),
					widget.Systray(padding=9,
								icon_size=20),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
				#	widget.CPUGraph(graph_color=colors[5],
				#					border_color=colors[1],
				#					fill_color=colors[5],
				#					border_width=1),
				#	widget.MemoryGraph(graph_color=colors[3],
				#					border_color=colors[1],
				#					fill_color=colors[3],
				#					border_width=1),
				#	widget.Sep(linewidth=0,
				#				padding=20,
				#				foreground=colors[1],
				#				background=colors[0]),
					widget.CurrentLayout(font="ShureTechMono Nerd Font"),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
					widget.Image(filename=HOMEDIR+"/Pictures/icons/whitepng/wifi.png", 
							background=colors[0]),
					widget.Sep(linewidth=0,
								padding=5,
								foreground=colors[1],
								background=colors[0]),
					widget.Wlan(interface='wlp58s0',
							font="ShureTechMono Nerd Font",
							format="{quality}/70"),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
					widget.Volume(theme_path=HOMEDIR+"/Pictures/icons/whitepng/volume",
								volume_app="amixer",
								mute_command="Master toggle",
								volume_down_command="set Master 1%-",
								volume_up_command="set Master 1%+"),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
					widget.BatteryIcon(theme_path=HOMEDIR+'/Pictures/icons/battery/',
									background=colors[0]),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
					widget.KeyboardLayout(configured_keyboards=['us', 'us alt-intl']),
					widget.Sep(linewidth=0,
								padding=20,
								foreground=colors[1],
								background=colors[0]),
					widget.Image(filename=HOMEDIR+"/Pictures/icons/whitepng/clock.png", 
								background=colors[0]),
					widget.Clock(format='%d-%b %a %H:%M'),
					widget.Sep(linewidth=0,
								padding=10,
								foreground=colors[1],
								background=colors[0]),]
	return widgets_list
Esempio n. 6
0
    font='Hack',
    fontsize=10,
    padding=3,
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        top=bar.Bar(
            [
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("snafs", name="default"),
                widget.Systray(),
                widget.Clock(format='%d %b %Y %a %I:%M %p'),
            ],
            24,
        ),
    ),
]

# 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())
]
Esempio n. 7
0
    widget.TextBox(
        **base(bg='color3'),
        **text_box(25),
        text=' '  # Icon: nf-fa-feed
    ),
    widget.Net(**base(bg='color3'), interface='wlp2s0'),
    widget.Image(filename=img['bar2']),
    widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
    widget.CurrentLayout(**base(bg='color2'), padding=5),
    widget.Image(filename=img['bar1']),
    widget.TextBox(
        **base(bg='color1'),
        **text_box(fontsize=27),
        text=''  # Icon: nf-fa-clock_o
    ),
    widget.Clock(**base(bg='color1'), format='%d/%m/%Y - %H:%M '),
]

monitor_widgets = [
    *workspaces(),
    widget.Sep(**separator),
    widget.Image(filename=img['bar4']),
    widget.CurrentLayoutIcon(**base(bg='color4'), scale=0.65),
    widget.CurrentLayout(**base(bg='color4'), padding=5),
]

widget_defaults = {
    'font': 'UbuntuMono Nerd Font',
    'fontsize': 14,
    'padding': 1,
}
Esempio n. 8
0
def build_bar(settings: dict, secrets: dict = {}) -> List[bar.Bar]:
    theme = settings["theme"]
    barheight = theme["barheight"]
    font = theme["font"]
    iconfont = theme["iconfont"]
    fontsize = theme["fontsize"]
    theme_colors = theme["color"]
    owm_location_args = {}
    if "latitude" in secrets:
        owm_location_args["latitude"] = secrets["latitude"]
    if "longitude" in secrets:
        owm_location_args["longitude"] = secrets["longitude"]

    def _fg_sep():
        return widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["panel_fg"],
        )

    def _bg_sep():
        return widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["panel_bg"],
        )

    def _line_sep():
        return widget.Sep(
            linewidth=1,
            size_percent=50,
            padding=18,
            foreground="888888",
            background=theme_colors["panel_bg"],
        )

    top_bar_widgets = [
        # region LHS
        _fg_sep(),
        widget.TextBox(
            text=chr(983044),
            font=iconfont,
            fontsize=fontsize + 6,
            foreground=theme_colors["panel_bg"],
            background=theme_colors["panel_fg"],
        ),
        _fg_sep(),
        _bg_sep(),
        widget.GroupBox(
            margin_y=3,
            margin_x=2,
            padding_y=5,
            padding_x=5,
            borderwidth=0,
            foreground=theme_colors["panel_fg"],
            background=theme_colors["panel_bg"],
            active=theme_colors["group_active_fg"],
            inactive=theme_colors["group_inactive_fg"],
            rounded=True,
            highlight_method="block",
            this_current_screen_border=theme_colors["group_current_bg"],
            this_screen_border=theme_colors["group_current_bg"],
            # other_current_screen_border=theme_colors["panel_bg"],
            # other_screen_border=theme_colors["panel_bg"],
            disable_drag=True,
        ),
        _line_sep(),
        widget.CurrentLayout(
            foreground=theme_colors["panel_fg"],
            background=theme_colors["panel_bg"],
        ),
        _line_sep(),
        EscapedWindowName(
            padding=5,
            foreground=theme_colors["panel_fg"],
            background=theme_colors["panel_bg"],
        ),
        # endregion
        # region RHS
        # Systray
        widget.TextBox(
            text=theme["powerline_separator"][0],
            fontsize=barheight + 8,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][4],
            background=theme_colors["panel_bg"],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][4],
        ),
        widget.Systray(
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][4],
        ),
        widget.TextBox(
            text=chr(987798),
            font=iconfont,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][4],
        ),
        # OpenWeatherMap
        widget.TextBox(
            text=theme["powerline_separator"][0],
            font=font,
            fontsize=barheight + 6,
            margin=0,
            padding=0,
            foreground=theme_colors["powerline_bg"][3],
            background=theme_colors["powerline_bg"][4],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][3],
        ),
        OpenWeatherMap(
            format=
            '{temp:.1f}{temp_units} <span face="{icon_font}">{icon}</span>',
            apikey=secrets["owm_apikey"],
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][3],
            **owm_location_args,
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            foreground=theme_colors["panel_fg"],
            background=theme_colors["powerline_bg"][3],
        ),
        # volume control
        widget.TextBox(
            text=theme["powerline_separator"][0],
            font=font,
            fontsize=barheight + 6,
            margin=0,
            padding=0,
            foreground=theme_colors["powerline_bg"][2],
            background=theme_colors["powerline_bg"][3],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][2],
        ),
        FixedWidthVolume(
            # iconfont = "Material Design Icons",
            volume_up_command=settings["volume"]["up"],
            volume_down_command=settings["volume"]["down"],
            mute_command=settings["volume"]["toggle"],
            volume_app=settings["volume"]["app"],
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][2],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][2],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][0],
            fontsize=barheight + 6,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][1],
            background=theme_colors["powerline_bg"][2],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][1],
        ),
        widget.Mpd2(
            status_format="{play_status} {artist} | {title} | {album}",
            idle_format="Play queue empty",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][1],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][1],
        ),
        widget.TextBox(
            text=chr(984922),
            font=iconfont,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][1],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][1],
        ),
        # Clock
        widget.TextBox(
            text=theme["powerline_separator"][0],
            fontsize=barheight + 6,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][0],
            background=theme_colors["powerline_bg"][1],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Clock(
            format="%a %Y-%m-%d",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][0],
        ),
        # calendar symbol
        widget.TextBox(
            text=chr(983277),
            font=iconfont,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Sep(
            linewidth=0,
            padding=12,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Clock(
            format="%H:%M",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        # clock symbol
        widget.TextBox(
            text=chr(983376),
            font=iconfont,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][0],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][0],
        ),
        # endregion
    ]

    if "logo" in theme:
        top_bar_widgets.append(
            widget.TextBox(
                text=f"  {theme['logo']}  ",
                font=theme["logofont"],
                foreground=theme_colors["powerline_fg"],
                background=theme_colors["powerline_bg"][-1],
            ), )

    # def cpu_button(*args, **kwargs):
    #     command = [settings["term"], "-e", "htop"]
    #     Popen(command, shell=True)
    # with open(os.path.expanduser("~/cpu_button"), "w") as fp:
    #     fp.write(f"command={command}")

    bottom_bar_widgets = [
        # Updates
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][3],
        ),
        widget.TextBox(
            text=chr(984752),
            font=iconfont,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][3],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][3],
        ),
        widget.CheckUpdates(
            distro="Arch",
            execute="alacritty",
            update_interval=1800,
            display_format="{updates} Updates",
            colour_no_updates=theme_colors["powerline_fg"],
            colour_have_updates=theme_colors["panel_fg"],
            background=theme_colors["powerline_bg"][3],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][3],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][1],
            fontsize=barheight + 6,
            padding=0,
            margin=2,
            foreground=theme_colors["powerline_bg"][3],
            background=theme_colors["powerline_bg"][4],
        ),
        # region Net
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][4],
        ),
        widget.TextBox(
            text=chr(986631),
            font=iconfont,
            fontsize=barheight - 4,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        NetMin(
            font=font,
            interface="wlp4s0f3u2",
            format="{up} ",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        widget.TextBox(
            text=chr(985999),
            font=iconfont,
            fontsize=barheight - 4,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        NetMin(
            font=font,
            interface="wlp4s0f3u2",
            format="{down}",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][4],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][4],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][1],
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][4],
            background=theme_colors["powerline_bg"][5],
        ),
        # endregion
        # region Memory
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][5],
        ),
        widget.TextBox(
            text=chr(983899),
            font=iconfont,
            fontsize=barheight - 4,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][5],
        ),
        widget.Memory(
            format="{MemUsed:5d}M/{MemTotal}M",
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][5],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][5],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][1],
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][5],
            background=theme_colors["powerline_bg"][6],
        ),
        # endregion
        # region CPU
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][6],
        ),
        widget.TextBox(
            text=chr(986848),
            font=iconfont,
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][6],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][6],
        ),
        widget.CPU(
            format="{load_percent:4.1f}%",
            update_interval=5,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][6],
            # mouse_callbacks={"Button1": cpu_button},
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][6],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][1],
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][6],
            background=theme_colors["powerline_bg"][7],
        ),
        # endregion
        # region Temps
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][7],
        ),
        widget.TextBox(
            text=chr(984335),
            font=iconfont,
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][7],
        ),
        widget.Sep(
            linewidth=0,
            padding=6,
            background=theme_colors["powerline_bg"][7],
        ),
        widget.ThermalSensor(
            foreground=theme_colors["powerline_fg"],
            background=theme_colors["powerline_bg"][7],
        ),
        widget.Sep(
            linewidth=0,
            padding=12,
            background=theme_colors["powerline_bg"][7],
        ),
        widget.TextBox(
            text=theme["powerline_separator"][1],
            font=font,
            fontsize=barheight - 4,
            padding=0,
            margin=0,
            foreground=theme_colors["powerline_bg"][7],
            background=theme_colors["panel_bg"],
        ),
        # endregion
    ]

    # bottom_pl = Powerline(
    #     theme_colors["powerline_fg"], theme_colors["powerline_bg"], barheight,
    # )
    # ud = Segment(
    #     [
    #         widget.TextBox(
    #             text=chr(984752),
    #             font=iconfont,
    #             foreground=self.fg,
    #             background=self.segment_colors[3],
    #         ),
    #         widget.Sep(linewidth=0, padding=6, background=self.segment_colors[3],),
    #         widget.CheckUpdates(
    #             distro="Arch",
    #             execute="alacritty",
    #             update_interval=1800,
    #             display_format="{updates} Updates",
    #             colour_no_updates=self.fg,
    #             colour_have_updates=theme_colors["panel_fg"],
    #             background=self.segment_colors[3],
    #         ),
    #     ]
    # )

    return [
        bar.Bar(top_bar_widgets,
                size=barheight,
                background=theme_colors["panel_bg"]),
        bar.Bar(
            bottom_bar_widgets,
            size=barheight,
            background=theme_colors["panel_bg"],
        ),
    ]
Esempio n. 9
0
    widget.Sep(linewidth=0,
               padding=6,
               foreground=colors[2],
               background=colors[0]),
    widget.Battery(format='{char} {percent:2.0%}',
                   charge_char="🞁",
                   discharge_char="🞃",
                   empty_char="∅",
                   foreground=colors[2],
                   background=colors[0]),
    widget.Sep(linewidth=0,
               padding=6,
               foreground=colors[2],
               background=colors[0]),
    widget.Clock(format='%a %d %b - %I:%M %p',
                 foreground=colors[2],
                 background=colors[0]),
    widget.Sep(linewidth=0,
               padding=6,
               foreground=colors[2],
               background=colors[0])
]

#### SCREENS ####

screens = [
    Screen(top=bar.Bar(widgets=widget_list, opacity=0.8, size=20)),
    Screen(top=bar.Bar(widgets=widget_list, opacity=0.8, size=20))
]

#### FLOATING ####
Esempio n. 10
0
def init_widgets_list():
    widgets_list = [
        widget.GroupBox(font="Ubuntu Bold",
                        fontsize=9,
                        margin_y=1,
                        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[1],
                        ),
        widget.Prompt(
            prompt=prompt,
            font="Ubuntu Mono",
            padding=10,
            foreground=colors[2],
            background=colors[1]
        ),
        widget.WindowName(
            foreground=colors[3],
            background=colors[1],
            markup=True,
            # padding=1
        ),
        widget.TextBox(
            text=" 🌡",
            padding=2,
            foreground=colors[2],
            background=colors[1],
            fontsize=11
        ),
        widget.ThermalSensor(
            foreground=colors[2],
            background=colors[1],
            padding=5
        ),
        widget.TextBox(
            text="",
            padding=2,
            foreground=colors[2],
            background=colors[1],
            fontsize=14
        ),
        widget.Pacman(
            execute="alacritty -e paru -Syyu",
            update_interval=1800,
            foreground=colors[2],
            background=colors[1]
        ),
        widget.TextBox(
            text="Updates",
            padding=5,
            foreground=colors[2],
            background=colors[1]
        ),
        widget.TextBox(
            text=" 🖬",
            foreground=colors[2],
            background=colors[1],
            padding=0,
            fontsize=14
        ),
        widget.Memory(
            foreground=colors[2],
            background=colors[1],
            padding=5
        ),
        widget.TextBox(
            text="",
            foreground=colors[2],
            background=colors[1],
            padding=0,
            fontsize=14
        ),
        widget.Wlan(
            foreground=colors[2],
            background=colors[1],
            padding=5
        ),
        widget.TextBox(
            text="🔉",
            foreground=colors[2],
            background=colors[1],
            padding=0
        ),
        widget.Volume(
            foreground=colors[2],
            background=colors[1],
            padding=5,
            emoji=False,
        ),
        widget.CurrentLayout(
            foreground=colors[2],
            background=colors[1],
            padding=5
        ),
        widget.TextBox(
            text=" ",
            foreground=colors[2],
            background=colors[1],
            padding=0
        ),
        widget.Clock(
            foreground=colors[2],
            background=colors[1],
            format="%Y-%M-%d %H:%M"
        ),
        widget.Systray(
            background=colors[1],
            icon_size=18,
            padding=1
        ),
    ]
    return widgets_list
Esempio n. 11
0
     title_width_method="uniform",
     txt_floating=" ",
     txt_minimized=" ",
     txt_maximized=" ",
     rounded=False,
     margin=0,
     margin_x=3,
     padding=8,
 ),
 widget.Image(
     filename="~/.config/qtile/icons/icon-clock.png",
     margin_y=6,
     margin_x=3
 ),
 widget.Clock(
     format='%H:%M %a, %d.%m',
     mouse_callbacks={'Button1': lambda: qtile.cmd_spawn("gsimplecal")},
 ),
 widget.Image(
     filename="~/.config/qtile/icons/icon-wifi.png",
     margin_y=6,
     margin_x=3,
     mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(os.path.expanduser("~/.config/scripts/nmgui.sh"))},
 ),
 widget.Wlan(
     interface="wlp9s0",
     format="{percent:1.0%}",
     disconnected_message=" ",
     mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(os.path.expanduser("~/.config/scripts/nmgui.sh"))},
     foreground="#9EC1CF",
 ),
 widget.Image(
Esempio n. 12
0
 widget.TextBox(
     text="",
     foreground=colors[14],
     background=colors[0],
     fontsize=28,
     padding=0,
 ),
 widget.TextBox(
     text=" ",
     font="Font Awesome 5 Free Solid",
     foreground=colors[5],  # fontsize=38
     background=colors[14],
 ),
 widget.Clock(
     format="%a, %b %d",
     background=colors[14],
     foreground=colors[5],
 ),
 widget.TextBox(
     text="",
     foreground=colors[14],
     background=colors[0],
     fontsize=28,
     padding=0,
 ),
 widget.Sep(
     linewidth=0,
     foreground=colors[2],
     padding=10,
     size_percent=50,
 ),
Esempio n. 13
0
        bottom=bar.Bar(
            [
                widget.GroupBox(),
		widget.Prompt(),
		widget.Spacer(),
		widget.Net(format="{down} ↓↑ {up}"),
		widget.Sep(),
		widget.CPU(),
		widget.Memory(format="RAM {MemUsed}M/{MemTotal}M"),
		widget.Sep(),
		widget.Battery(battery="BAT1",format="{char}{percent:2.0%}",charge_char="↑ ",discharge_char="↓ ",empty_char="–",full_char="| "),
		widget.Sep(),
#               widget.Backlight(backlight_name="intel_backlight",step=1),
		widget.Systray(),
		widget.Sep(),
		widget.Clock(format='%Y.%m.%d %H:%M'),
            ],
            24,
        ),
        wallpaper="/home/riedler/Pictures/wallpaper.png",
        wallpaper_mode="stretch",
    ),
]

# 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()),
]
Esempio n. 14
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.GroupBox(font="Roboto",
                        fontsize=12,
                        margin_y=2,
                        margin_x=0,
                        padding_y=2,
                        padding_x=5,
                        borderwidth=2,
                        active=colors[4],
                        inactive=colors[2],
                        rounded=False,
                        hide_unused=True,
                        highlight_color=colors[0],
                        highlight_method="line",
                        this_current_screen_border=colors[8],
                        this_screen_border=colors[0],
                        foreground=colors[2],
                        background=colors[0]),
        widget.Sep(linewidth=0, padding=40, background=colors[0]),
        widget.WindowName(foreground=colors[3],
                          background=colors[0],
                          padding=0,
                          fontsize=11),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.CPU(format="CPU {load_percent}%",
                   foreground=colors[5],
                   background=colors[0]),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.TextBox(text="🌡",
                       padding=2,
                       foreground=colors[8],
                       background=colors[0],
                       fontsize=11),
        widget.ThermalSensor(foreground=colors[8],
                             background=colors[0],
                             padding=5),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.TextBox(text="⟳",
                       padding=0,
                       foreground=colors[6],
                       background=colors[0],
                       fontsize=11),
        widget.Pacman(execute="kitty sudo pacman -Syu",
                      update_interval=180,
                      foreground=colors[6],
                      background=colors[0]),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.TextBox(text="🖬",
                       foreground=colors[9],
                       background=colors[0],
                       padding=0,
                       fontsize=12),
        widget.Memory(foreground=colors[9], background=colors[0], padding=5),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.TextBox(text="📢",
                       foreground=colors[1],
                       background=colors[0],
                       padding=0),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.Volume(foreground=colors[1], background=colors[0], padding=5),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.TextBox(text="🔋",
                       foreground=colors[4],
                       background=colors[0],
                       padding=0),
        widget.Battery(foreground=colors[4],
                       background=colors[0],
                       low_percentage=0.2,
                       padding=5,
                       format="{char} {percent:2.0%}"),
        widget.Sep(linewidth=0, padding=6, background=colors[0]),
        widget.Clock(foreground=colors[7],
                     background=colors[0],
                     format="%B %d  %H:%M "),
        widget.Sep(linewidth=0, padding=10, background=colors[0]),
        widget.Systray(background=colors[0], padding=5),
        widget.Sep(linewidth=0, padding=10, background=colors[0]),
    ]
    return widgets_list
Esempio n. 15
0
            widget.Memory(background=colors[2],
                          padding=6,
                          fontsize=15,
                          update_interval=5),
            widget.TextBox(
                padding=6, text="", fontsize=18, background=colors[3]),
            widget.Volume(fontsize=15, padding=6, background=colors[3]),
            widget.TextBox(background=colors[3], text="", fontsize=18),
            widget.ThermalSensor(background=colors[3], fontsize=15),
            widget.TextBox(
                text="", background=colors[4], fontsize=18, padding=6),
            widget.Battery(fontsize=15, background=colors[4]),
            widget.TextBox(
                background=colors[5], text="", fontsize=18, padding=6),
            widget.Clock(format="%A, %B %d - %H:%M",
                         background=colors[5],
                         fontsize=15,
                         padding=6)
        ],
        24,
    ), ),
]

# 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(),
Esempio n. 16
0
                    background=colors["background"],
                    limit_max_volume="True",
                    volume_app="pavucontrol"),
 powerline_right(),
 separate(),
 powerline_left(),
 widget.TextBox(
     text=" ",
     font="Font Awesome 5 Free Solid",
     foreground=colors["green"],
     background=colors["background"],
     mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(calendar_cmd)},
 ),
 widget.Clock(
     format="%b %d (%a)",
     foreground=colors["green"],
     background=colors["background"],
     mouse_callbacks={"Button1": lambda: qtile.cmd_spawn(calendar_cmd)},
 ),
 powerline_right(),
 separate(),
 powerline_left(),
 widget.TextBox(
     text=" ",
     font="Font Awesome 5 Free Solid",
     foreground=colors["brightYellow"],
     background=colors["background"],
 ),
 widget.Clock(
     format="%I:%M %p",
     foreground=colors["brightYellow"],
     background=colors["background"],
Esempio n. 17
0
                    ),
                widget.TextBox("|", foreground="81A1C1"),
                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.TextBox("|", foreground="#81A1C1"),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p',
                    foreground='D8DEE9',
                    ),
                widget.TextBox("|", foreground="#81A1C1"),
                # widget.Spacer(length=4),
                widget.QuickExit(foreground='D8DEE9', background="BF616A"),
            ],
            24,
            opacity=0.8,
        ),
    ),
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
Esempio n. 18
0
            ),
            widget.Battery(
                format='{percent:2.0%}',
                foreground='#bf7ceb',
            ),
            separator,
            widget.TextBox(
                "vol :",
                foreground='#8af331',
            ),
            widget.Volume(foreground='#8af331', ),
            separator,
            widget.CurrentLayout(foreground='#e184a8', ),
            separator,
            widget.Clock(
                format='%a %d, %H:%M',
                foreground='#74c8ef',
            ),
        ],
        24,
        background='#0b0c17',
    ), ),
]


### STARTUP HOOK ###
@hook.subscribe.startup_once
def start_once():
    home = os.path.expanduser("/home/labibmahmud/.config/qtile/autostart.sh")
    subprocess.call([home])
Esempio n. 19
0
            widget.TextBox(text='💻'),
            widget.TextBox(text='CPU |', foreground='c5c8c6'),
            widget.ThermalSensor(tag_sensor='Package id 0',
                                 foreground='c5c8c6',
                                 foreground_alert='cc6666'),
            widget.CPUGraph(core='all',
                            graph_color='81a2be',
                            border_color='81a2be',
                            fill_color='81a2be.3'),
            widget.TextBox(text='| GPU |', foreground='c5c8c6'),
            widget.ThermalSensor(tag_sensor='edge',
                                 foreground='c5c8c6',
                                 foreground_alert='cc6666',
                                 threshold=80),
            widget.TextBox(text='📅'),
            widget.Clock(foreground='c5c8c6', format='%Y-%m-%d %a %I:%M %p'),
            widget.Systray(),
        ],
        24,
        background='#1d1f21',
        opacity=0.95,
    ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
Esempio n. 20
0
                     frequency=5,
                     line_width=1,
                     samples=50,
                 ),
                 widget.MemoryGraph(
                     width=30,
                     border_width=1,
                     border_color="#000000",
                     line_width=1,
                     frequency=5,
                     fill_color="EEE8AA"
                 ),
                widget.Volume(fontsize=10, update_interval=2),
                widget.Systray(),
                widget.Clock(
                    format='%a %b %d, %H:%M',
                ),
                widget.CurrentLayoutIcon(scale=0.65),
            ],
            30,
        ),
    )
]

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()),
]
Esempio n. 21
0
                widget.WindowName(),
                widget.Chord(
                    chords_colors={
                        'launch': ("#2ABB9C", "#ffffff"),
                    },
                    name_transform=lambda name: name.upper(),
                ),
                #widget.TextBox("My Config", name="default"),
                #widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.Systray(),
                widget.NetGraph(fill_color=colors[3],
                                border_color=colors[3],
                                graph_color=colors[3]),
                widget.CapsNumLockIndicator(),
                widget.Sep(),
                widget.Clock(format='%d-%m-%Y'),
                widget.Sep(),
                widget.Clock(format="%a"),
                widget.Sep(),
                widget.Clock(format="%I:%M %p"),
                widget.Volume(emoji=True),
                widget.QuickExit(),
            ],
            24,
        ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
Esempio n. 22
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=22,
                        margin_y=3,
                        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.TextBox(font="Ubuntu Bold",
                       text="  ",
                       padding=5,
                       foreground=colors[2],
                       background=colors[0],
                       fontsize=16),
        widget.CurrentLayout(foreground=colors[3],
                             background=colors[0],
                             padding=5),
        widget.TextBox(font="Ubuntu Bold",
                       text="  |",
                       padding=5,
                       foreground=colors[9],
                       background=colors[0],
                       fontsize=12),
        widget.TextBox(font="Ubuntu Bold",
                       text="  ",
                       foreground=colors[2],
                       background=colors[0],
                       padding=0,
                       fontsize=16),
        widget.GenPollText(foreground=colors[6],
                           background=colors[0],
                           fmt=' {} ',
                           update_interval=60,
                           func=lambda: subprocess.check_output(
                               "/home/geir/.config/qtile/ip.sh").decode(
                                   "utf-8").replace('\n', '')),
        widget.TextBox(font="Ubuntu Bold",
                       text="  |",
                       padding=5,
                       foreground=colors[9],
                       background=colors[0],
                       fontsize=12),
        widget.TextBox(font="Ubuntu Bold",
                       text=" ",
                       padding=5,
                       foreground=colors[2],
                       background=colors[0],
                       fontsize=16),
        widget.GenPollText(foreground=colors[7],
                           background=colors[0],
                           fmt=' {} ',
                           update_interval=3600,
                           func=lambda: subprocess.check_output(
                               "/home/geir/.config/qtile/pac-aur.sh").decode(
                                   "utf-8").replace('\n', '')),
        widget.TextBox(font="Ubuntu Bold",
                       text="   |",
                       padding=5,
                       foreground=colors[9],
                       background=colors[0],
                       fontsize=12),
        widget.TextBox(font="Ubuntu Bold",
                       text="  ",
                       padding=5,
                       foreground=colors[2],
                       background=colors[0],
                       fontsize=16),
        widget.GenPollText(update_interval=60,
                           fmt=' {} ',
                           func=lambda: subprocess.check_output(
                               "/home/geir/.config/qtile/disk.sh").decode(
                                   "utf-8").replace('\n', ''),
                           foreground=colors[5],
                           background=colors[0]),
        widget.TextBox(font="Ubuntu Bold",
                       text="  |",
                       padding=5,
                       foreground=colors[9],
                       background=colors[0],
                       fontsize=12),
        widget.TextBox(font="Ubuntu Bold",
                       text="  ",
                       padding=5,
                       foreground=colors[2],
                       background=colors[0],
                       fontsize=16),
        widget.GenPollText(update_interval=10,
                           fmt=' {} ',
                           func=lambda: subprocess.check_output(
                               "/home/geir/.config/qtile/mem.sh").decode(
                                   "utf-8").replace('\n', ''),
                           foreground=colors[8],
                           background=colors[0]),
        widget.TextBox(font="Ubuntu Bold",
                       text="   |",
                       padding=5,
                       foreground=colors[9],
                       background=colors[0],
                       fontsize=12),
        widget.TextBox(font="Ubuntu Bold",
                       text="   ",
                       foreground=colors[2],
                       background=colors[0],
                       padding=5,
                       fontsize=16),
        widget.Clock(foreground=colors[2],
                     background=colors[0],
                     format="%A, %d %B - %H:%M"),
        widget.Sep(linewidth=0,
                   padding=5,
                   foreground=colors[2],
                   background=colors[0]),
    ]
    return widgets_list
Esempio n. 23
0
    # layout.TreeTab(),
    # layout.VerticalTile(),
    # layout.Zoomy(),
]

widget_defaults = dict(font='sans', fontsize=12, padding=3)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        top=bar.Bar(
            widgets=[
                widget.GroupBox(padding=8, borderwidth=0),
                widget.Spacer(),
                widget.Clock(font="sans Bold",
                             format='%a %d %H:%M',
                             foreground="#a9b1d6"),
                widget.Spacer(),
                # widget.Battery(format='Battery: {percent: 2.0%}'),
                # widget.Chord(
                #     chords_colors={
                #         'launch': ("#ff0000", "#d79921"),
                #     },
                #     name_transform=lambda name: name.upper(),
                # ),
                widget.Systray(padding=4, icon_size=14),
                widget.Spacer(length=8),
                widget.Image(filename="~/.config/qtile/icons/power.svg",
                             margin=6,
                             mouse_callbacks={
                                 'Button1':
Esempio n. 24
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(my_term)},
        ),
        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.TextBox(
            text="|",
            font="Ubuntu Mono",
            background=colors[0],
            foreground="474747",
            padding=2,
            fontsize=14,
        ),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[2],
            background=colors[0],
            padding=0,
            scale=0.7,
        ),
        widget.CurrentLayout(foreground=colors[2],
                             background=colors[0],
                             padding=5),
        widget.TextBox(
            text="|",
            font="Ubuntu Mono",
            background=colors[0],
            foreground="474747",
            padding=2,
            fontsize=14,
        ),
        widget.WindowName(foreground=colors[6],
                          background=colors[0],
                          padding=0),
        widget.Systray(background=colors[0], padding=5),  # 9th element
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=colors[0]),
        # widget.TextBox(
        #     text="",
        #     font="Ubuntu Mono",
        #     background=colors[0],
        #     foreground=colors[3],
        #     padding=0,
        #     fontsize=37,
        # ),
        # widget.Net(
        #     interface="eth0",
        #     format="Net: {down} ↓↑ {up}",
        #     foreground=colors[1],
        #     background=colors[3],
        #     padding=5,
        # ),
        widget.TextBox(
            text="",
            font="Ubuntu Mono",
            background=colors[0],
            foreground=colors[4],
            padding=0,
            fontsize=37,
        ),
        widget.ThermalSensor(
            foreground=colors[1],
            background=colors[4],
            threshold=90,
            fmt="Temp: {}",
            padding=5,
        ),
        widget.TextBox(
            text="",
            font="Ubuntu Mono",
            background=colors[4],
            foreground=colors[5],
            padding=0,
            fontsize=37,
        ),
        widget.Memory(
            foreground=colors[1],
            background=colors[5],
            mouse_callbacks={
                "5utton1": lambda: qtile.cmd_spawn(my_term + " -e htop")
            },
            fmt="Mem: {}",
            padding=5,
        ),
        widget.TextBox(
            text="",
            font="Ubuntu Mono",
            background=colors[5],
            foreground=colors[6],
            padding=0,
            fontsize=37,
        ),
        widget.Volume(foreground=colors[1],
                      background=colors[6],
                      fmt="Vol: {}",
                      padding=5),
        widget.TextBox(
            text="",
            font="Ubuntu Mono",
            background=colors[6],
            foreground=colors[7],
            padding=0,
            fontsize=37,
        ),
        # widget.KeyboardLayout(
        #     foreground=colors[1], background=colors[8], fmt="Keyboard: {}", padding=5
        # ),
        # widget.TextBox(
        #     text="",
        #     font="Ubuntu Mono",
        #     background=colors[8],
        #     foreground=colors[9],
        #     padding=0,
        #     fontsize=37,
        # ),
        widget.Clock(foreground=colors[1],
                     background=colors[7],
                     format="%A, %B %d - %H:%M "),
    ]
    return widgets_list
Esempio n. 25
0
             widget.GroupBox(),
             widget.Prompt(),
             widget.WindowName(),
             widget.Chord(
                 chords_colors={
                     'launch': ("#ff0000", "#ffffff"),
                 },
                 name_transform=lambda name: name.upper(),
             ),
             widget.Clipboard(),
             widget.BatteryIcon(),
             widget.Battery(),
             # widget.Wlan(), # requires iwlib
             widget.Systray(),
             widget.ThermalSensor(),  # required psutil
             widget.Clock(format='%Y-%m-%d %a %H:%M'),
             widget.QuickExit(),
         ],
         24,
     ),
     # right=bar.Bar([
     #         widget.CPU(),
     #         widget.CPUGraph(),
     #         # widget.Bluetooth(),
     #         widget.TextBox("MEM"),
     #         widget.Memory(),
     #         widget.MemoryGraph(),
     #     ],
     #     200,
     # ),
 ),
Esempio n. 26
0
        widgets=[
            widget.GroupBox(),
            widget.Prompt(),
            WindowName(),
            Player(),
            widget.Systray(icon_size=30, padding=10),
            widget.Notify(),
            Backlight(),
            VolumeIcon(theme_path=os.path.expanduser(
                '~/.config/qtile/hacks/resources/volume-icons/')),
            widget.Volume(),
            BatteryIcon(battery_name='BAT1',
                        theme_path=os.path.expanduser(
                            '~/.config/qtile/hacks/resources/battery-icons/')),
            Battery(battery_name='BAT1'),
            widget.Clock(format='%H:%M %b %d, %a'),
        ],
        size=50,
    ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod, "shift"],
         "Button1",
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
Esempio n. 27
0
     padding=0,
     margin=0,
     volume_app="pavucontrol",
     fmt=" {0} ",
     background=colors["volume_bg"],
 ),
 widget.TextBox(
     **separator_defaults,
     text=sep,
     foreground=colors["sep"],
     background=colors["volume_bg"],
 ),
 widget.Clock(
     background=colors["clock_bg"],
     foreground=colors["clock_fg"],
     format='%d %B | %H:%M',
     fmt="<span font_family='Fira Code Nerd Font' size='larger'> </span> {}",
     padding=4,
     mouse_callbacks={'Button1': lambda qtile: qtile.cmd_spawn(calendar)},
 ),
 widget.TextBox(
     **separator_defaults,
     text=left_sep,
     background=colors["clock_bg"],
     foreground=colors["layout_icon_bg"],
 ),
 widget.CurrentLayoutIcon(
     custom_icon_paths=[ICON_DIR],
     padding=0,
     scale=0.6,
     background=colors["layout_icon_bg"],
 ),
Esempio n. 28
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.Sep(
            linewidth=0,
            padding=6,
            foreground=colors[2],
            background=colors[0],
        ),
        widget.Image(
            filename="~/.config/qtile/icons/qtilelogo.png",
            #                     mouse_callbacks = {'Button1': lambda qtile:
            # qtile.cmd_spawn('dmenu_run')},
        ),
        widget.TextBox(
            text="◢",
            foreground=colors[14],
            background=colors[0],
            fontsize=75,
            padding=-7,
        ),
        widget.GroupBox(
            font="Font Awesome 5 Free Solid",
            visible_groups=["", "", "", "", "", ""],
            **group_box_settings,
        ),
        widget.TextBox(
            text="█",
            foreground=colors[14],
            background=colors[0],
            fontsize=30,
            padding=0,
        ),
        # Current Layout
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[2],
            background=colors[14],
            padding=0,
            scale=0.9,
        ),
        widget.TextBox(
            text="▉",
            foreground=colors[14],
            background=colors[0],
            fontsize=30,
            padding=-7,
        ),
        widget.TextBox(
            text="◣ ",
            foreground=colors[14],
            background=colors[0],
            fontsize=90,
            padding=-9,
        ),
        # Window Name
        widget.TextBox(
            text="◢",
            foreground=colors[14],
            background=colors[0],
            fontsize=75,
            padding=-7,
        ),
        widget.TaskList(
            borderwidth=0,
            highlight_method="block",
            background=colors[14],
            border=colors[2],
            urgent_border=colors[0],
            rounded=True,
            #max_title_width = 100,
            markup_floating="<i>{}</i>",
            markup_minimized="<s>{}</s>",
            mouse_callbacks={"Button2": lambda: qtile.current_window.kill()}),
        widget.TextBox(
            text="◣ ",
            foreground=colors[14],
            background=colors[0],
            fontsize=90,
            padding=-9,
        ),
        widget.Spacer(),
        widget.TextBox(
            text="◢",
            foreground=colors[14],
            background=colors[0],
            fontsize=75,
            padding=-7,
        ),
        # Systemtray
        widget.Systray(icon_size=22, background=colors[14], padding=10),
        widget.TextBox(
            text="◢",
            foreground=colors[0],
            background=colors[14],
            fontsize=75,
            padding=-7,
        ),
        # Battery and Temperature
        # do not activate in Virtualbox - will break qtile
        # battery option 1  ArcoLinux Horizontal icons do not forget to import arcobattery at the top
        arcobattery.BatteryIcon(padding=0,
                                scale=0.7,
                                y_poss=2,
                                theme_path=home +
                                "/.config/qtile/icons/battery_icons_horiz",
                                update_interval=5,
                                background=colors[0]),
        widget.TextBox(
            font="Font Awesome 5 Free Solid",
            text="   ",
            foreground=colors[1],
            background=colors[0],
            padding=2,
            fontsize=20,
        ),
        widget.ThermalSensor(foreground=colors[1],
                             foreground_alert=colors[3],
                             background=colors[0],
                             metric=True,
                             padding=3,
                             threshold=80),
        # Memory
        widget.TextBox(font="Font Awesome 5 Free Solid",
                       text="  ",
                       foreground=colors[1],
                       background=colors[0],
                       padding=0,
                       fontsize=16),
        widget.Memory(
            font="Noto Sans",
            format='{MemUsed}/{MemTotal}M',
            update_interval=1,
            fontsize=16,
            foreground=colors[1],
            background=colors[0],
        ),
        # Volume-Widget
        widget.TextBox(
            text="◢",
            foreground=colors[14],
            background=colors[0],
            fontsize=75,
            padding=-7,
        ),
        widget.TextBox(
            text=" ",
            foreground=colors[8],
            background=colors[14],
            font="Font Awesome 5 Free Solid",
            mouse_callbacks={
                "Button3": lambda: qtile.cmd_spawn("pavucontrol")
            },
        ),
        widget.PulseVolume(
            foreground=colors[8],
            background=colors[14],
            limit_max_volume="True",
            mouse_callbacks={
                "Button3": lambda: qtile.cmd_spawn("pavucontrol")
            },
        ),
        # Time
        widget.TextBox(
            text="◢",
            foreground=colors[0],
            background=colors[14],
            fontsize=75,
            padding=-7,
        ),
        widget.TextBox(
            text=" ",
            font="Font Awesome 5 Free Solid",
            foreground=colors[4],  # fontsize=38
            background=colors[0],
        ),
        widget.Clock(
            format="%H:%M",
            foreground=colors[4],
            background=colors[0],
            # mouse_callbacks={"Button1": todays_date},
        ),
        # Day and Month
        widget.TextBox(
            text="◢",
            foreground=colors[14],
            background=colors[0],
            fontsize=75,
            padding=-7,
        ),
        widget.TextBox(
            text=" ",
            font="Font Awesome 5 Free Solid",
            foreground=colors[5],
            background=colors[14],
        ),
        widget.Clock(
            format="%a, %d %b",
            background=colors[14],
            foreground=colors[5],
        ),
        # Shutdown
        widget.TextBox(
            text="◢",
            foreground=colors[0],
            background=colors[14],
            fontsize=75,
            padding=-7,
        ),
        widget.TextBox(
            text="⏻",
            foreground=colors[13],
            background=colors[0],
            font="Font Awesome 5 Free Solid",
            fontsize=20,
            padding=20,
            mouse_callbacks={
                "Button1": lambda: qtile.cmd_spawn('arcolinux-logout')
            },
        ),
    ]

    return widgets_list
Esempio n. 29
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=colors[7],
                       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=colors[7],
                       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=14,
                        margin_y=3,
                        margin_x=1,
                        padding_y=5,
                        padding_x=3,
                        borderwidth=3,
                        active=colors[6],
                        inactive=colors[2],
                        rounded=False,
                        highlight_color=colors[1],
                        highlight_method="block",
                        urgent_border=colors[8],
                        this_current_screen_border=colors[1],
                        this_screen_border=colors[4],
                        other_current_screen_border=colors[1],
                        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 bpytop')
                      },
                      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
Esempio n. 30
0
    #widget.TextBox(**w_base_color(bg = 'primary'), **w_text_box, text='')
    #widget.Sep(**w_separator),
    #widget.Image(filename = img['primary']),
    #widget.Sep(**w_separator),
    #widget.CPU(**w_cpu),
    #widget.Image(filename = img['secondary']),
    #widget.DF(),
    #widget.Image(filename = img['bg-to-primary']),

    #widget.Net(**w_base_color(bg = 'secondary'), **w_net),
    #widget.Sep(**w_separator),
    #widget.Image(filename = img['secondary']),
    #*wk_powerline_base()
    widget.CurrentLayoutIcon(**w_base_color(bg='secondary'),
                             **w_current_layout_icon),
    widget.Clock(**w_base_color(bg='dark'), **w_clock),
}

screen_secondary = {
    *wk_workspaces_base(),
    #widget.Image(filename = img['bg-to-secondary']),
    *wk_powerline_base()
}

widget_defaults = dict(
    font='DroidSansMono Nerd Font',
    fontsize=12,
    padding=1,
)

extension_defaults = widget_defaults.copy()