예제 #1
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"]),
        ]
예제 #2
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
예제 #3
0
def init_widgets():
    prompt = "{0}@{1}: ".format(os.environ["USER"], hostname)
    widgets = [
        Prompt(prompt=prompt,
               font="DejaVu Sans Mono",
               padding=10,
               background=GREY),
        TextBox(text="◤ ",
                fontsize=45,
                padding=-8,
                foreground=GREY,
                background=DARK_GREY),
        CurrentLayoutIcon(scale=0.6, padding=-4),
        TextBox(text=" ", padding=2),
        GroupBox(fontsize=8,
                 padding=4,
                 borderwidth=1,
                 urgent_border=DARK_BLUE,
                 disable_drag=True,
                 highlight_method="block",
                 this_screen_border=DARK_BLUE,
                 other_screen_border=DARK_ORANGE,
                 this_current_screen_border=BLUE,
                 other_current_screen_border=ORANGE),
        TextBox(text="◤",
                fontsize=45,
                padding=-1,
                foreground=DARK_GREY,
                background=GREY),
        TaskList(borderwidth=0,
                 highlight_method="block",
                 background=GREY,
                 border=DARK_GREY,
                 urgent_border=DARK_BLUE),
        Systray(background=GREY),
        TextBox(text="◤",
                fontsize=45,
                padding=-1,
                foreground=GREY,
                background=DARK_GREY),
        TextBox(text=" ⚠", foreground=BLUE, fontsize=18),
        Notify(),
        TextBox(text=" ⌚", foreground=BLUE, fontsize=18),
        Clock(format="%A %d-%m-%Y %H:%M")
    ]
    if hostname in ("spud", "saiga"):
        widgets[-2:-2] = [
            TextBox(text=" ↯", foreground=BLUE, fontsize=14),
            Battery(update_delay=2)
        ]
    if DEBUG:
        widgets += [Sep(), CurrentLayout()]
    return widgets
예제 #4
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"]),
        ]
예제 #5
0
def init_widgets():
    prompt = "{0}@{1}: ".format(os.environ["USER"], hostname)
    widgets = [
        Prompt(prompt=prompt,
               font="DejaVu Sans Mono",
               padding=10,
               background=GREY),
        TextBox(text="◤ ",
                fontsize=45,
                padding=-8,
                foreground=GREY,
                background=DARK_GREY),
        CurrentLayoutIcon(scale=0.6, padding=-4),
        Spacer(width=10),
        GroupBox(fontsize=8,
                 padding=4,
                 borderwidth=1,
                 urgent_border=DARK_BLUE,
                 disable_drag=True,
                 highlight_method="block",
                 this_screen_border=DARK_BLUE,
                 other_screen_border=DARK_ORANGE,
                 this_current_screen_border=BLUE,
                 other_current_screen_border=ORANGE),
        TextBox(text="◤",
                fontsize=45,
                padding=-1,
                foreground=DARK_GREY,
                background=GREY),
        TaskList(borderwidth=0,
                 highlight_method="block",
                 background=GREY,
                 border=DARK_GREY,
                 urgent_border=DARK_BLUE),
        Systray(background=GREY),
        TextBox(text="◤",
                fontsize=45,
                padding=-1,
                foreground=GREY,
                background=DARK_GREY),
        Notify(fmt=" 🔥 {}"),
        Clock(fmt=" ⌚ {}", format="%A %d-%m-%Y %H:%M")
    ]
    if os.path.isdir("/sys/module/battery"):
        widgets.insert(-1, Battery(fmt=" ⚡️ {}", update_delay=2))
    if DEBUG:
        widgets += [Sep(), CurrentLayout()]
    return widgets
예제 #6
0
파일: config.py 프로젝트: Maxix25/dotfiles
def init_widgets_list():
    widgets_list = [
        GroupBox(font="DaddyTimeMono Nerd Font",
                 fontsize=20,
                 margin_y=3,
                 margin_x=3,
                 padding_y=5,
                 padding_x=5,
                 borderwidth=3,
                 active=colors[2],
                 inactive=colors[2],
                 rounded=False,
                 highlight_color=colors[1],
                 highlight_method="line",
                 this_current_screen_border=colors[3],
                 this_screen_border=colors[4],
                 other_current_screen_border=colors[0],
                 other_screen_border=colors[0],
                 foreground=colors[2],
                 background=colors[0]),
        Sep(linewidth=720,
            padding=40,
            foreground=colors[0],
            background=colors[0]),
        CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            foreground=colors[0],
            background=colors[4],
            padding=0,
            scale=0.7),
        CurrentLayout(foreground=colors[2], background=colors[4], padding=5),
        Clock(foreground=colors[2],
              background=colors[5],
              format="%A, %B %d  [ %H:%M ]"),
        Sep(linewidth=0,
            padding=10,
            foreground=colors[0],
            background=colors[5])
    ]
    return widgets_list
예제 #7
0
파일: config.py 프로젝트: l3liss/qtile
def init_widgets():
    widgets = [
	widget.Sep(linewidth = 2, padding = 6),
	widget.Image(filename="~/.config/qtile/icons/python.png"),
        CurrentLayoutIcon(scale=0.6, padding=8),
        GroupBox(fontsize=8, padding=4, borderwidth=1, urgent_border="6272a4",
                 disable_drag=True, highlight_method="block",
                 this_screen_border="6272a4", other_screen_border="ff5555",
                 this_current_screen_border="8be9fd",
                 other_current_screen_border="ffb86c"),
        widget.Prompt(),    
        widget.WindowName(),
        widget.Systray(),
        Notify(fmt=" 🔥 {} "),
        widget.Sep(linewidth = 2, padding = 6),
        widget.BitcoinTicker(format="BTC: {avg}", **widget_defaults),
        #PulseVolume(fmt=" {}", emoji=True, volume_app="pavucontrol"),
        #PulseVolume(volume_app="pavucontrol"),
        Clock(format=" ⏱ %H:%M  <span color='#666'>%A %d-%m-%Y</span>"),
        widget.Sep(linewidth = 2, padding = 6),
        ]
    return widgets
예제 #8
0
def init_widgets():
    widgets = [
        CurrentLayoutIcon(scale=0.6, padding=8),
        GroupBox(fontsize=8, padding=4, borderwidth=1, urgent_border=DARK_BLUE,
                 disable_drag=True, highlight_method="block",
                 this_screen_border=DARK_BLUE, other_screen_border=DARK_ORANGE,
                 this_current_screen_border=BLUE,
                 other_current_screen_border=ORANGE),

        TextBox(text="◤", fontsize=45, padding=-1, foreground=DARK_GREY,
                background=GREY),

        TaskList(borderwidth=0, highlight_method="block", background=GREY,
                 border=DARK_GREY, urgent_border=DARK_BLUE,
                 markup_floating="<i>{}</i>", markup_minimized="<s>{}</s>"),

        Systray(background=GREY),
        TextBox(text="◤", fontsize=45, padding=-1,
                foreground=GREY, background=DARK_GREY),
        Notify(fmt=" 🔥 {} "),
        PulseVolume(fmt=" {}", emoji=True, volume_app="pavucontrol"),
        PulseVolume(volume_app="pavucontrol"),
        Clock(format=" ⏱ %H:%M  <span color='#666'>%A %d-%m-%Y</span>  ")
    ]
    if os.path.isdir("/sys/module/battery"):
        widgets.insert(-1, Battery(format=" {char} {percent:2.0%} ",
                                   charge_char="⚡", discharge_char="🔋",
                                   full_char="⚡", unknown_char="⚡",
                                   empty_char="⁉️ ", update_interval=2,
                                   show_short_text=False,
                                   default_text=""))
        widgets.insert(-1, Battery(fmt="<span color='#666'>{}</span> ",
                                   format="{hour:d}:{min:02d}",
                                   update_interval=2, show_short_text=True,
                                   default_text=""))
    if DEBUG:
        widgets += [Sep(), CurrentLayout()]
    return widgets
예제 #9
0
파일: config.py 프로젝트: Hewame/Dotfiles
     text="[",
     foreground=colorz[4],
     fontsize=18,
 ),
 Volume(**w_vol),
 TextBox(
     text="]",
     foreground=colorz[4],
     fontsize=18,
 ),
 TextBox(
     text="[",
     foreground=colorz[3],
     fontsize=18,
 ),
 Clock(**w_clock),
 TextBox(
     text="]",
     foreground=colorz[3],
     fontsize=18,
 ),
 TextBox(
     text="[",
     foreground=colorz[1],
     fontsize=18,
 ),
 KeyboardLayout(**w_key_l),
 TextBox(
     text="]",
     foreground=colorz[1],
     fontsize=18,
예제 #10
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
    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_bottom_double(self):

        wl = []

        wl += [self.space.large_black()]
        wl += [
            TaskList(
                fontsize=11,
                margin_x=0,
                margin_y=1,
                padding_x=3,
                padding_y=2.3,
                borderwidth=1,
                # icon_size = 14,
                icon_size=0,
                spacing=1,
                # max_title_width = 190,
                title_width_method='uniform',
                urgent_alert_method="text",
                highlight_method="block",
                txt_minimized="V ",
                txt_maximized="",
                txt_floating="",
                # unfocused_border = "None",
                rounded=True,
                border=self.color.grey)
        ]
        wl += [self.space.large_black()]

        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)
        ]

        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