Пример #1
0
    def init_top_secondary(self, hidpi = False):

        fontsize = 12 if not hidpi else 22

        wl  = []

        wl += [CurrentLayoutIcon(
            fontsize=fontsize,
            custom_icon_paths=[expanduser("~/.config/qtile/icons")],
            foreground=self.color.white,
            padding=10,
            scale=0.7
        )]

        wl += [GroupBox(
            fontsize=24 if not hidpi else 50,
            font=self.font.bold,
            margin_y=3,
            margin_x=0,
            padding_y=5,
            padding_x=10 if not hidpi > 1 else 20,
            borderwidth=3,
            hide_unused=True,
            active=self.color.yellow,
            inactive=self.color.lightgrey,
            urgent_text=self.color.white,
            highlight_method="line",
            urgent_alert_method="line",
            highlight_color=self.color.grey,
            urgent_border=self.color.red,
            this_current_screen_border=self.color.yellow,
            other_screen_border=self.color.magenta,
            this_screen_border=self.color.magenta,
            other_current_screen_border=self.color.yellow,
            rounded=False,
            disable_drag=True,
            use_mouse_wheel=False
        )]

        wl += [self.space.small()]

        wl += [WindowName(
            fontsize=fontsize,
            padding=0,
            show_state=False,
            for_current_screen=False,
            foreground=self.color.yellow
        )]

        wl += [Clock(
            fontsize=fontsize,
            format=" %d.%m.%Y  %H:%M"
        )]
        wl += [self.space.large()]

        return wl
Пример #2
0
    def init_other_widgets(self) -> list:
        """Inits and returns widgets for other monitors."""

        return [
            Spacer(**self._widget_settings["spacer"]),
            GroupBox(**self._widget_settings["group_box"]),
            CurrentLayoutIcon(**self._widget_settings["current_layout_icon"]),
            Spacer(**self._widget_settings["spacer"]),
            WindowName(**self._widget_settings["window_name"]),
            Spacer(**self._widget_settings["spacer_stretch"]),
            Clock(**self._widget_settings["calendar"]),
            Clock(**self._widget_settings["clock"]),
            CurrentScreen(**self._widget_settings["current_screen"]),
        ]
Пример #3
0
    def init_widgets(self) -> list:
        """Inits and returns the widgets for primary monitor."""

        return [
            Spacer(**self._widget_settings["spacer"]),
            TextBox(**self._widget_settings["launcher"]),
            Spacer(**self._widget_settings["spacer"]),
            GroupBox(**self._widget_settings["group_box"]),
            CurrentLayoutIcon(**self._widget_settings["current_layout_icon"]),
            Spacer(**self._widget_settings["spacer"]),
            WindowName(**self._widget_settings["window_name"]),
            Spacer(**self._widget_settings["spacer_stretch"]),
            Systray(**self._widget_settings["systray"]),
            Spacer(**self._widget_settings["spacer"]),
            PulseVolume(**self._widget_settings["pulse_volume"]),
            Clock(**self._widget_settings["calendar"]),
            Clock(**self._widget_settings["clock"]),
            Battery(**self._widget_settings["battery"])
            if self.theme_config.widgets["show_battery"] else Spacer(
                **self._widget_settings["spacer"]),
            QuickExit(**self._widget_settings["quick_exit"]),
            Spacer(**self._widget_settings["spacer"]),
        ]
Пример #4
0
}

screens = [
    Screen(top=bar.Bar(
        [
            CurrentLayoutIcon(custom_icon_paths=wd_icon),
            Sep(**w_sep),
            GroupBox(**w_gbox, ),
            TextBox(
                text="🐸",
                fontsize="16",
                padding=5,
            ),
            WindowCount(),
            Prompt(**w_prompt),
            WindowName(foreground=colorz[1]),
            TextBox(
                text="📂",
                fontsize="16",
                padding=5,
                mouse_callbacks={'Button1': open_fm},
            ),
            Systray(icon_size=20),
            TextBox(
                text="[",
                foreground=colorz[2],
                fontsize=18,
            ),
            Net(**w_net, ),
            TextBox(
                text="]",
Пример #5
0
    def init_top_main(self, hidpi = False):

        fontsize = 12 if not hidpi else 22

        wl  = []

        wl += [CurrentLayoutIcon(
            fontsize=fontsize,
            # custom_icon_paths=[expanduser("~/.config/qtile/icons")],
            foreground=self.color.white,
            padding=10,
            scale=0.7
        )]

        wl += [GroupBox(
            fontsize=24 if not hidpi else 40,
            font=self.font.bold,
            margin_y=3,
            margin_x=0,
            padding_y=5,
            padding_x=10 if not hidpi else 20,
            borderwidth=3,
            hide_unused=True,
            active=self.color.yellow,
            inactive=self.color.lightgrey,
            urgent_text=self.color.white,
            highlight_method="line",
            urgent_alert_method="line",
            highlight_color=self.color.grey,
            urgent_border=self.color.red,
            this_current_screen_border=self.color.yellow,
            other_screen_border=self.color.magenta,
            this_screen_border=self.color.magenta,
            other_current_screen_border=self.color.yellow,
            rounded=False,
            disable_drag=True,
            use_mouse_wheel=False
        )]

        wl += [self.space.small()]

        wl += [Prompt(
            fontsize=fontsize,
            prompt="λ : ",
            padding=10,
            bell_style="visual",
            foreground=self.color.magenta,
            background=self.color.black
        )]

        wl += [self.space.small()]

        wl += [WindowName(
            fontsize=fontsize,
            padding=0,
            show_state=False,
            for_current_screen=False,
            foreground=self.color.yellow
        )]

        wl += [self.space.extra_large()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.magenta,
            text=" "
        )]
        wl += [DF(
            fontsize=fontsize,
            foreground=self.color.magenta,
            format='{uf}{m}',
            partition='/',
            visible_on_warn=False
        )]

        wl += [self.space.small()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.magenta,
            text=" "
        )]
        wl += [DF(
            fontsize=fontsize,
            foreground=self.color.magenta,
            format='{uf}{m}',
            partition='/home',
            visible_on_warn=False
        )]

        wl += [self.separator.normal()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.blue,
            text=" "
        )]
        wl += [CPU(
            fontsize=fontsize,
            foreground=self.color.blue,
            # TODO Remove hard coded terminal
            mouse_callbacks={'Button1': lambda qtile: qtile.cmd_spawn("alacritty -e ytop")},
            format='{load_percent}%',
            update_interval=2.0
        )]

        wl += [self.space.small()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.blue,
            text=" "
        )]
        wl += [ThermalSensor(
            fontsize=fontsize,
            foreground=self.color.blue,
            threshold=90,
            mouse_callbacks={'Button1': lambda qtile: qtile.cmd_spawn("alacritty -e ytop")},
            update_interval=2.0
        )]

        wl += [self.separator.normal()]
        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.cyan,
            text=" "
        )]
        wl += [Memory(
            fontsize=fontsize,
            foreground=self.color.cyan,
            mouse_callbacks={'Button1': lambda qtile: qtile.cmd_spawn(terminal + ' -e ytop')},
            update_interval=2.0,
        )]

        wl += [self.separator.normal()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.green,
            font=self.font.bold,
            text="直 "
        )]
        wl += [Wlan(
            fontsize=fontsize,
            foreground=self.color.green,
            interface='wlp60s0',
            format='{essid} ({percent:2.0%})'
        )]

        wl += [self.separator.normal()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.orange,
            font=self.font.bold,
            text=" "
        )]
        wl += [Volume(
            fontsize=fontsize,
            foreground=self.color.orange
        )]

        wl += [self.space.small()]

        wl += [TextBox(
            fontsize=fontsize,
            foreground=self.color.orange,
            font=self.font.bold,
            text=" "
        )]
        wl += [Backlight(
            fontsize=fontsize,
            foreground=self.color.orange,
            backlight_name='intel_backlight',
            format='{percent:2.0%}'
        )]

        wl += [self.space.small()]

        wl += [Battery(
            fontsize=fontsize,
            foreground=self.color.orange,
            low_foreground=self.color.red,
            format='{char} {percent:2.0%}',
            low_percentage=0.2,
            charge_char='',
            full_char='',
            empty_char='',
            ramp_cap0_char='',
            ramp_cap1_char='',
            ramp_cap2_char='',
            ramp_cap3_char='',
            ramp_cap4_char='',
            ramp_cap0_foreground=self.color.red[0],
            ramp_cap1_foreground=self.color.red[0],
            ramp_cap2_foreground=self.color.orange[0],
            ramp_cap3_foreground=self.color.orange[0],
            ramp_cap4_foreground=self.color.green[0],
        )]

        # wl += [self.separator.normal()]
        # wl += [TextBox(
        #     font=self.font.bold,
        #     text=" "
        # )]
        # wl += [CheckUpdates(
        #     distro="Arch_checkupdates",
        #     display_format="{updates}",
        #     update_interval=900,
        #     colour_have_updates=self.color.white,
        #     colour_no_updates=self.color.white
        # )]

        # wl += [self.separator.normal()]
        # wl += [Systray(
        #     padding=3,
        #     icon_size=19 if not hidpi else 30
        # )]

        wl += [self.separator.normal()]
        wl += [Clock(
            fontsize=fontsize,
            foreground=self.color.yellow,
            format=" %d.%m.%Y  %H:%M"
        )]
        wl += [self.space.large()]

        return wl
Пример #6
0
     markup=True,
     center_aligned=True,
     disable_drag=True,
 ),
 Image(
     filename=expanduser("~/.config/qtile/icons/p7.png"),
     margin=0,
     background=bar_colors[0],
 ),
 Sep(
     linewidth=10,
     foreground=bar_colors[0],
     background=bar_colors[0],
     size_percent=100,
 ),
 WindowName(foreground=bar_colors[5], background=bar_colors[0]),
 Image(
     filename=expanduser("~/.config/qtile/icons/p1.png"),
     margin=0,
     background=bar_colors[0],
 ),
 Mpd2(foreground=bar_colors[0],
      background=bar_colors[8],
      play_states={
          'play': '⏸',
          'pause': '▶',
          'stop': '■'
      },
      status_format=
      '{play_status} {artist}/{title} 🔁: {repeat} 🔀: {random}'),
 Image(
    def init_top_single(self, tray=True):

        wl = []

        wl += [self.space.large_black()]
        wl += [
            GroupBox(
                font=self.font.bold,
                fontsize=9,
                margin_y=0,
                margin_x=0,
                # padding_y = 6,
                padding_x=3,
                borderwidth=2,
                # hide_unused = True,
                active=self.color.white,
                inactive=self.color.lightgrey,
                urgent_text=self.color.white,
                highlight_method="line",
                highlight_color=["2B303B", "14161B"],
                urgent_alert_method="line",
                rounded=False,
                urgent_border=self.color.red,
                this_current_screen_border=self.color.blue,
                other_screen_border=self.color.magenta,
                this_screen_border=self.color.orange,
                other_current_screen_border=self.color.magenta,
                disable_drag=True,
                use_mouse_wheel=False)
        ]

        wl += [
            Prompt(prompt="λ : ",
                   padding=5,
                   bell_style="visual",
                   foreground=self.color.magenta,
                   background=self.color.black)
        ]

        wl += [self.space.large_black()]

        wl += [
            WindowName(fontsize=11,
                       padding=0,
                       show_state=False,
                       foreground=self.color.darkgreen)
        ]

        wl += [self.space.large_black()]

        wl += [TextBox(fontsize=16, text="")]
        wl += [Net(interface="eth0")]

        wl += [self.separator.bold_white()]
        wl += [TextBox(text="")]
        wl += [
            ThermalSensor(tag_sensor="CPU",
                          threshold=85,
                          update_interval=1,
                          foreground_alert=self.color.red,
                          foreground=self.color.white)
        ]

        wl += [self.separator.bold_white()]
        wl += [TextBox(text="")]
        wl += [
            Battery(format="{char} {percent:0.1%}",
                    update_interval=5,
                    low_percentage=0.10,
                    unknown_char="",
                    full_char="",
                    charge_char="+",
                    discharge_char="-",
                    empty_char="",
                    low_foreground=self.color.red)
        ]

        wl += [self.separator.bold_white()]
        wl += [TextBox(font=self.font.bold, text="")]
        wl += [
            Memory(
                # fmt = "{MemUsed}M/{MemTotal}M - {SwapUsed}M",
                fmt="{MemUsed}M - {SwapUsed}M",
                update_interval=1)
        ]

        wl += [self.separator.bold_white()]
        wl += [TextBox(font=self.font.bold, text="")]
        wl += [CurrentLayout()]

        wl += [self.separator.bold_white()]
        wl += [TextBox(font=self.font.bold, text="")]
        wl += [
            CheckUpdates(distro="Arch_checkupdates",
                         display_format="{updates}",
                         update_interval=900,
                         colour_have_updates=self.color.white,
                         colour_no_updates=self.color.white)
        ]

        if tray:
            wl += [self.separator.bold_white()]
            wl += [Systray(padding=3, icon_size=19)]
        # if not tray:
        # 	wl += [self.separator.bold_white()]
        # wl += [CurrentLayoutIcon(
        # 	padding = 0,
        # 	custom_icon_paths = [expanduser("~/.config/qtile/icons")],
        # 	scale = 0.6
        # )]

        wl += [self.separator.bold_white()]
        wl += [TextBox(font=self.font.bold, text="")]
        wl += [Clock(format="%a, %b %d - %H:%M")]
        wl += [self.space.large_black()]

        return wl
    def init_top_double(self, tray=True):

        wl = []

        wl += [self.space.large_black()]
        wl += [
            GroupBox(
                font=self.font.bold,
                fontsize=9,
                margin_y=0,
                margin_x=0,
                # padding_y = 6,
                padding_x=3,
                borderwidth=2,
                # hide_unused = True,
                active=self.color.white,
                inactive=self.color.lightgrey,
                urgent_text=self.color.white,
                highlight_method="line",
                highlight_color=["2B303B", "14161B"],
                urgent_alert_method="line",
                rounded=False,
                urgent_border=self.color.red,
                this_current_screen_border=self.color.blue,
                other_screen_border=self.color.magenta,
                this_screen_border=self.color.orange,
                other_current_screen_border=self.color.magenta,
                disable_drag=True,
                use_mouse_wheel=False)
        ]

        wl += [
            Prompt(prompt="λ : ",
                   padding=5,
                   bell_style="visual",
                   foreground=self.color.magenta,
                   background=self.color.black)
        ]

        wl += [self.space.large_black()]

        wl += [
            WindowName(fontsize=11,
                       padding=0,
                       show_state=False,
                       foreground=self.color.darkgreen)
        ]

        wl += [self.space.large_black()]

        wl += [TextBox(fontsize=16, text="")]
        wl += [Net(interface="eth0")]

        if tray:
            wl += [self.separator.bold_white()]
            wl += [Systray(padding=3, icon_size=19)]
        # if not tray:
        # 	wl += [self.separator.bold_white()]
        # wl += [CurrentLayoutIcon(
        # 	padding = 0,
        # 	custom_icon_paths = [expanduser("~/.config/qtile/icons")],
        # 	scale = 0.6
        # )]
        wl += [self.space.large_black()]

        return wl
Пример #9
0
 def __init__(self, width=bar.STRETCH, **config):
     WindowName.__init__(self, width=width, **config)
     self.add_defaults(WindowName.defaults)