Exemple #1
0
def widget_stack():
    gmail_config = {
        'update_interval': 50,
        'fmt': 'in[%s] unread(%s)',
        **get_gmail_config()
    }
    return [
        widget.CurrentScreen(),
        widget.GroupBox(),
        widget.Prompt(),
        widget.TaskList(),
        widget.GmailChecker(**gmail_config),
        widget.Sep(),
        widget.CheckUpdates(),
        widget.Sep(),
        widget.Wlan(interface=auto_detect_interface()),
        widget.Sep(),
        widget.DF(visible_on_warn=False, format="Disk free {r:.1f}%"),
        widget.Sep(),
        widget.CPUGraph(),
        widget.Memory(),
        widget.Sep(),
        widget.Battery(update_interval=1, format="🔋 {char} {percent:2.0%}"),
        widget.Sep(),
        widget.Systray(),
        widget.Notify(),
        widget.Clock(),
        widget.CurrentLayoutIcon(),
    ]
Exemple #2
0
def get_status_bar_elements(conf, is_primary):
    status_bar_elements = []
    status_bar_elements += [
        widget.TextBox(text='CPU:', fontsize=12),
        # cpu uses family of dark orange colors
        widget.CPUGraph(border_color='8b4500', fill_color='cd6600', graph_color='ee7600'),
        widget.TextBox(text='Mem:', fontsize=12),
        widget.MemoryGraph(),
    ]
    if conf['battery']:
        status_bar_elements += [
            widget.TextBox(text='Bat:', fontsize=12),
            widget.Battery(format='{char} {percent:2.0%}'),
        ]
    status_bar_elements += [
        widget.sep.Sep(),
        widget.TextBox(text='Vol:', fontsize=12),
        widget.Volume(),
        widget.sep.Sep(),
        widget.GroupBox(fontsize=12, this_current_screen_border='#FF0000', urgent_border='#00FF00', disable_drag=True),
        widget.WindowName(fontsize=12),
        widget.sep.Sep(),
    ]
    if is_primary:
        status_bar_elements.append(widget.Systray())
    status_bar_elements += [
        widget.Clock(format='%b %d %I:%M', fontsize=12),
    ]
    return status_bar_elements
Exemple #3
0
def setup_screens(qtile):
    global screens
    screens.append(
        Screen(bottom=bar.Bar(
            [
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.Clipboard(),
                widget.Battery(hide_threshold=99),
                widget.CPUGraph(graph_color='F8FF33', fill_color='FCFFAD.3'),
                widget.MemoryGraph(graph_color='31F500',
                                   fill_color='9DFF85.3'),
                widget.NetGraph(),
                widget.DF(warn_space=10, update_interval=300),
                widget.Volume(),
                widget.Systray(),
                widget.Notify(),
                widget.Clock(format='%Y-%m-%d %a %H:%M'),
            ],
            30,
        ), ), )
    if len(qtile.conn.pseudoscreens) > 1:
        screens.append(
            Screen(bottom=bar.Bar(
                [
                    widget.GroupBox(),
                    widget.WindowName(),
                    widget.Clock(format='%H:%M'),
                ],
                30,
            ), ), )
Exemple #4
0
def getBar():
    return bar.Bar([
        widget.GroupBox(margin_x=0,
                        margin_y=3,
                        borderwidth=0,
                        padding_x=10,
                        rounded=False,
                        disable_drag=True,
                        highlight_method="block",
                        this_current_screen_border="a1b56c",
                        this_screen_border="505a36",
                        other_screen_border="888888",
                        inactive="d0d0d0",
                        active=foreground,
                        background=background),
        widget.Prompt(),
        widget.WindowName(
            foreground=foreground,
            background=background,
        ),
        widget.Notify(
            foreground=foreground,
            background=background,
        ),
        widget.Battery(background="#a1b56c",
                       low_foreground=white,
                       low_percentage=0.15,
                       update_delay=10,
                       charge_char="+",
                       discharge_char="-",
                       format='{char} {percent:2.0%} {hour:d}:{min:02d}'),
        widget.Net(interface="wlo1",
                   foreground=white,
                   background="#a1b56c",
                   format='{down} ↓↑ {up}'),
        widget.Wlan(
            interface="wlo1",
            background="#a1b56c",
            format='{essid} {percent:2.0%}',
        ),
        widget.Memory(background=yellow, ),
        widget.CPU(background=yellow, format='C: {load_percent}%'),
        widget.TextBox(
            text="V:",
            background=yellow,
        ),
        widget.Volume(background=yellow, ),
        widget.Clock(
            format="%a %d %b %H:%M:%S",
            background=blue,
        ),
        widget.YahooWeather(
            woeid='551801',
            format='{current_observation_condition_temperature}°C',
            background=blue,
        ),
        widget.Systray(background=blue, ),
    ], 20)
Exemple #5
0
def get_bar():
    return bar.Bar(
        [
            widget.GroupBox(
                active="98c379",
                inactive="abb2bf",
                this_current_screen_border="61afef",
                highlight_method="text",
                highlight_color=["282c34", "282c34"],
                center_aligned=True,
                rounded=False,
                borderwidth=0,
                padding=6,
            ),
            widget.Spacer(bar.STRETCH),
            widget.Systray(),
            widget.TextBox(
                text='',
                foreground="c678dd",
            ),
            widget.KeyboardLayout(),
            widget.TextBox(
                text='',
                foreground="56b6c2",
            ),
            widget.Battery(format='{percent:2.0%}'),
            widget.TextBox(
                text='',
                foreground="e5c07b",
            ),
            widget.Volume(),
            widget.TextBox(
                text='',
                foreground="61afef",
            ),
            widget.Backlight(
                backlight_name="intel_backlight",
                #padding=0,
                #margin=0,
                format='{percent: 2.0%}'),
            widget.TextBox(
                text='',
                foreground="98c379",
            ),
            widget.Clock(format='%B %d (%a) %H:%M', ),
            widget.TextBox(
                text='',
                foreground="e06c75",
            ),
            widget.Wlan(
                interface="wlp5s0",
                format="{essid}",
            ),
        ],
        28,
        margin=0,
        opacity=0)
Exemple #6
0
def generate_widgets():
    """generate a widget list."""
    widgets = [
        widget.GroupBox(urgent_alert_method='border',
                        urgent_border='FF0000',
                        urgent_text='FF0000',
                        fontsize=defaut_font_size,
                        borderwidth=2,
                        other_screen_border='AAAA40',
                        this_screen_border='AAAA40',
                        this_current_screen_border='FFFF40',
                        other_current_screen_border='FFFF40',
                        inactive="606060",
                        use_mouse_wheel=False,
                        disable_drag=True,),
        widget.Sep(padding=6, height_percent=60),
        widget.Prompt(),
        # widget.Notify(default_timeout=10),
        widget.TaskList(),
        widget.Sep(padding=6, height_percent=60),
        widget.Systray(padding=5),
        widget.Sep(padding=6, height_percent=60),
        # yaourt -S lm_sensors
        widget.ThermalSensor(foreground="aaaaaa",
                             foreground_alert="ee5555",
                             threshold=75,
                             tag_sensor="Package id 0",
                             update_interval=10),
        widget.Sep(padding=6, height_percent=60), ]

    widgets.extend([
        widget.Backlight(backlight_name='intel_backlight',
                         update_interval=1),
        widget.Sep(padding=6, height_percent=60),
        widget.BatteryIcon(),
        widget.Battery(),
        widget.Sep(padding=6, height_percent=60), ])

    widgets.extend([
        widget.Volume(emoji=True,
                      # yaourt -S noto-fonts-emoji
                      font="NotoColorEmoji-Regular",
                      # yaourt -S humanity-icons
                      # theme_path='/usr/share/icons/Humanity/status/22/',
                      # font='Arial',
                      update_interval=1),
        widget.Sep(padding=6, height_percent=60),
        widget.Clock(format='%a %d-%m-%Y %H:%M:%S'),
        widget.Sep(padding=6, height_percent=60), ])

    widgets.extend([
        ConnectionStatus(name="protonvpn", font="NotoColorEmoji-Regular",
                         fmt_ok="\U0001F510", fmt_nok="\U0001F513"), ])

    widgets.extend([
        widget.CurrentLayoutIcon(foreground="00eedd", scale=0.8), ])
    return widgets
Exemple #7
0
 def battery():
     return widget.Battery(charge_char='\u2b06',
                           discharge_char='\u2b07',
                           show_short_text=False,
                           low_foreground=colors['foreground'],
                           low_percentage=0.3,
                           background=colors['highlight'],
                           format='\U0001F50B {percent:2.0%} {char}',
                           fmt='{:9}')
Exemple #8
0
def get_widgets():
    return [
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            scale=0.8,
        ),
        widget.GroupBox(),
        widget.WindowName(),
        widget.TextBox(" | ", name="separator"),
        widget.Clipboard(max_width=50, timeout=None),
        widget.TextBox(" | ", name="separator"),
        widget.TextBox("CPU", name="cpu_label"),
        widget.CPUGraph(**graph_args),
        widget.TextBox("Mem", name="memory_label"),
        ColoredMemoryGraph(**graph_args),
        widget.TextBox("Net", name="net_label"),
        widget.NetGraph(**graph_args),
        widget.TextBox(" | ", name="separator"),
        widget.DF(
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn('qdirstat')},
            format='{uf}/{s}{m} free on {p}',
            visible_on_warn=False),
        # TODO figure out why this doesn't work
        # widget.HDDBusyGraph(**graph_args),
        widget.TextBox(" | ", name="separator"),
        widget.Image(filename='~/.config/qtile/icons/volume-icon.png',
                     margin_y=4),
        widget.Volume(fmt='{}'),
        widget.TextBox(" | ", name="separator"),
        widget.Image(filename='~/.config/qtile/icons/battery-icon.png'),
        widget.Battery(
            format='{percent:2.0%} {char}{watt:.1f}W',
            charge_char='+',
            discharge_char='-',
            update_interval=15,  # seconds
        ),
        widget.TextBox(" | ", name="separator"),
        widget.Image(filename='~/.config/qtile/icons/brightness-icon.png',
                     margin_x=1,
                     margin_y=4.5),
        widget.Backlight(format='{percent: 2.0%}',
                         backlight_name='intel_backlight'),
        widget.TextBox(" | ", name="separator"),
        # Requires
        # sudo apt install libiw-dev
        # pip install iwlib
        widget.Wlan(interface='wlp2s0',
                    format=' {essid} {quality}%',
                    mouse_callbacks={
                        'Button1':
                        lambda: qtile.cmd_spawn('cinnamon-settings network')
                    }),
        widget.TextBox(" | ", name="separator"),
        widget.Systray(),
        widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
    ]
Exemple #9
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0, padding=3),
        widget.CurrentScreen(
            active_text="◉",
            active_color=colors[3],
            inactive_text="◉",
            inactive_color=colors[1],
            padding=2,
        ),
        widget.CurrentLayoutIcon(scale=0.57, padding=2),
        widget.GroupBox(
            margin_x=2,
            padding_y=2,
            padding_x=3,
            borderwidth=1,
            disable_drag=True,
            active=colors[5],
            inactive=colors[2],
            rounded=True,
            hide_unused=True,
            highlight_color=colors[1],
            highlight_method="border",
            this_current_screen_border=colors[2],
            this_screen_border=colors[4],
            other_current_screen_border=colors[1],
            other_screen_border=colors[1],
        ),
        widget.Sep(linewidth=0, padding=20),
        widget.WindowTabs(),
        widget.Sep(linewidth=0, padding=20),
        widget.Notify(audiofile=qtile_dir + "/.sounds/notify-sound.mp3"),
        widget.Sep(linewidth=0, padding=20),
        widget.Spacer(length=bar.STRETCH),
        widget.CheckUpdates(),
        widget.Sep(linewidth=0, padding=20),
        widget.Battery(
            discharge_char="-",
            charge_char="+",
            unknown_char="*",
            update_interval=30,
            format="{char}{percent:2.0%}",
        ),
        widget.Sep(linewidth=0),
        widget.Wlan(
            interface="wlp0s20f3",
            disconnected_message="W: N/A",
            format="{essid}",
        ),
        widget.Sep(linewidth=0),
        widget.Volume(),
        widget.Sep(linewidth=0),
        widget.Clock(format="%a, %H:%M (%d/%m)", update_interval=60),
        widget.Sep(linewidth=0),
    ]
    return widgets_list
Exemple #10
0
def init_widgets_list():
    bar = [
        widget.GroupBox(
            font="Ubuntu Nerd Font Mono Regula", fontsize=18,
            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),

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

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

        widget.Systray(background=GREY, foreground=DARK_GREY),
        widget.TextBox(text="◤", fontsize=45, padding=-7,
                       foreground=GREY, background=DARK_GREY),
        widget.PulseVolume(fmt=" {}", emoji=True, volume_app="pavucontrol"),
        widget.PulseVolume(volume_app="pavucontrol"),
        widget.Clock(
            format=" ⏱ %H:%M  <span color='#666'>%A %d-%m-%Y</span>  ")
    ]
    if os.path.isdir("/sys/module/battery"):
        bar.insert(-1,
                   widget.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=""))
        bar.insert(-1,
                   widget.Battery(fmt="<span color='#666'>{}</span> ",
                                  format="{hour:d}:{min:02d}",
                                  update_interval=2, show_short_text=True,
                                  default_text=""))
    return bar
Exemple #11
0
def create_bar(main=False):
    widgets = [
        w.CurrentLayoutIcon(scale=0.8, foreground=colors["foreground"]),
        w.GroupBox(
            active=colors["foreground"],
            inactive=colors["color8"],
            other_current_screen_border=colors["color8"],
            other_screen_border=colors["color8"],
            this_current_screen_border=colors["color4"],
            this_screen_border=colors["color12"],
            urgent_border=colors["color1"],
            urgent_text=colors["color1"],
            disable_drag=True,
        ),
        w.TextBox("", fontsize=22),
        w.Spacer(),
        w.TextBox("", fontsize=22),
        *[
            w.DF(
                foreground=colors["color1"],
                format=" <span weight='bold'>{p} ({uf}{m}|{r:.0f}%)</span>",
                partition=path,
                warn_space=5,
            )
            for path in ["/", "/home/"]
        ],
        w.PulseVolume(emoji=False, fmt="墳 <span weight='bold'>{}</span>"),
        w.Battery(
            battery="BAT0",
            unknown_char="",
            charge_char="",
            discharge_char="",
            empty_char="",
            format="{char} <span weight='bold'>{percent:2.0%}</span>",
        ),
        w.Clock(fmt=" <span weight='bold'>{}</span>"),
    ]
    if main:
        widgets.append(w.Systray())
    else:
        widgets.append(
            w.CPUGraph(
                border_width=2,
                border_color=colors["color7"],
                graph_color=colors["color7"],
                fill_color=colors["color7"],
            )
        )
    return Bar(
        widgets,
        bar_height,
        background=colors["background"],
        opacity=0.8,
    )
Exemple #12
0
def get_battery():
    return widget.Battery(
        charge_char=fa.icons["bolt"],
        discharge_char=fa.icons["laptop"],
        empty_char=fa.icons["battery-empty"],
        full_char=fa.icons["battery-full"],
        show_short_text=False,
        low_percentage=0.30,
        notify_below=0.15,
        format="{char} {percent:2.0%} {hour:d}:{min:02d}",
        update_interval=30,
    )
Exemple #13
0
def battery(color):
    return widget.Battery(
        background=colors[color],
        foreground=colors["light"],
        charge_char="\U0001F50C",
        discharge_char="\u26a1 ",
        empty_char="\u2620",
        full_char="\U0001f50b",
        show_short_text=False,
        format="{char} {percent:2.2%} {watt:.2f} W",
        update_interval=1.5,
    )
Exemple #14
0
def make_battery_widget(widget_foreground, firstcolour, powerline: bool):
    foreground = "#56b6c2"
    background = BACKGROUND

    return widget.Battery(
        foreground=foreground,
        background=background,
        charge_char="",
        discharge_char="",
        full_char="",
        format="{char}  {percent:2.0%}",
        notify_below=30,
    )
Exemple #15
0
def topbar_widgets():
    widgets = []

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

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

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

    return widgets
Exemple #16
0
def set_widgets():
    sep = widget.Sep(
        linewidth=0,
        padding=50,
    )
    widgets = [
        widget.CurrentLayoutIcon(
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.CurrentLayout(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.Chord(
            fmt="{}",
            foreground=fairyfloss[0],
            padding=5,
        ),
        widget.GroupBox(
            active=fairyfloss[10],  # Active window font color
            highlight_method="block",
            inactive=fairyfloss[0],  # Inactive window font color
            other_current_screen_border=fairyfloss[9],
            other_screen_border=fairyfloss[9],
            this_current_screen_border=fairyfloss[15],  # Active and focused
            this_screen_border=fairyfloss[9],
        ),
        sep,
        widget.Spacer(length=bar.STRETCH),
        widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
        widget.Systray(),
        widget.Battery(
            format="{percent:2.0%}",
            low_percentage=0.1,
            notify_below=0.1,
        ),
        widget.QuickExit(
            countdown_start=10,
            default_text="[ Logout ]",
        ),
        widget.Wallpaper(
            directory=home + '/Media/Pictures/Wallpapers/kawaii',
            random_selection=True,
            fmt="",
        )
    ]
    return widgets
Exemple #17
0
def init_widgets_list():
    widgets_list = [
        widget.CurrentLayout(),
        widget.GroupBox(),
        widget.Prompt(),
        widget.WindowName(),
        widget.Chord(
            chords_colors={
                'launch': ("#ff0000", "#ffffff"),
            },
            name_transform=lambda name: name.upper(),
        ),
        widget.Systray(),
        widget.Battery(format='{percent:2.0%}'),
        widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
        widget.QuickExit(),
    ]
    return widgets_list
Exemple #18
0
def init_screens():
    widgetSets=[]
    screens=[]

    for i in range(0, numScreen ):
        widgetSets.append( [ 
                    widget.CurrentScreen(),
                    widget.GroupBox(highlight_method="block",urgent_alert_method='text'),
                    widget.CurrentLayout(),
                    widget.Notify(audiofile= "/usr/share/skype/sounds/ChatOutgoing.wav",
                                foreground_urgent="EE0000", 
                                foreground_low="dddddd",
                                default_timeout=60,
                                foreground="FF0000", 
                                fontsize=18, 
                                font="Ubuntu"),
                    widget.Clock(format='%Y-%m-%d %a %H:%M %p', foreground='00FF7F'),
                    widget.TextBox(text="Dim:"),
                    widget.Backlight(brightness_file='/sys/class/backlight/intel_backlight/brightness',  max_brightness_file='/sys/class/backlight/intel_backlight/max_brightness',  ),
                    widget.TextBox(text="Bat:"),
                    widget.Battery(),
                    widget.BatteryIcon(),
                    widget.TextBox(text="Vol:"),
                    widget.Volume(),
                    widget.TextBox(text="C"),
                    widget.CPUGraph(samples=100, width=200),
                    widget.TextBox(text="D"),
                    widget.NetGraph(samples=100, width=200, interface=network),
                    widget.TextBox(text="U"),
                    widget.NetGraph(samples=100, width=200, interface=network, bandwidth_type="up"),
                    widget.TextBox(text="M"),
                    widget.MemoryGraph(samples=100, width=200),
                ])

    # truncate the last widget, and add on the systray, if we 
    #widgetSets[ numScreen - 1 ] = widgetSets[ numScreen - 1 ][0:3]
    widgetSets[ numScreen - 1 ].insert( 0, widget.Systray() )

    for i in range(0, numScreen ):
        screens.append( Screen(top = bar.Bar( widgetSets[ i ] , 30)) )
    

    return(screens)
Exemple #19
0
def init_widgets():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets = [
        widget.Prompt(prompt=prompt,
                      font="DejaVu Sans Mono",
                      padding=10,
                      background=colors[1]),
        widget.TextBox(text="◤ ",
                       fontsize=45,
                       padding=-8,
                       foreground=colors[1],
                       background=colors[2]),
        widget.GroupBox(fontsize=8,
                        padding=4,
                        borderwidth=1,
                        this_current_screen_border=colors[0]),
        widget.TextBox(text="◤",
                       fontsize=45,
                       padding=-1,
                       foreground=colors[2],
                       background=colors[1]),
        widget.TaskList(borderwidth=1,
                        background=colors[1],
                        border=colors[0],
                        urgent_border=colors[0]),
        widget.Systray(background=colors[1]),
        widget.TextBox(text="◤",
                       fontsize=45,
                       padding=-1,
                       foreground=colors[1],
                       background=colors[2]),
        widget.TextBox(text=" ↯", foreground=colors[0], fontsize=14),
        widget.Battery(update_delay=5),
        widget.TextBox(text=" ⌚", foreground=colors[0], fontsize=18),
        widget.Clock(fmt="%a %d-%m-%Y %H:%M")
    ]
    if DEBUG:
        widgets += [widget.Sep(), widget.CurrentLayout()]
    return widgets
Exemple #20
0
def makeBar(screen):
	widgets = [
		# Groups
		FlexibleGroupBox(formatGroup, font_size=12),
		widget.Spacer(length=8),

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

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

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

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

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

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

	return bar.Bar(widgets, 16, background=bg_color)
Exemple #21
0
def create_default_bar():
    return bar.Bar(
        [
            widget.CurrentLayout(),
            widget.GroupBox(),
            widget.Prompt(),
            widget.Spacer(),
            widget.Chord(
                chords_colors={
                    "launch": ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.Sep(),
            widget.Wlan(
                interface="wlp111s0",
                format="{essid} {percent:2.0%}",
            ),
            widget.Sep(),
            widget.TextBox("Battery: "),
            widget.Battery(update_interval=5),
            widget.Sep(),
            widget.GenPollText(func=volume_poll, update_interval=1),
            widget.Sep(),
            widget.TextBox("Brightness: "),
            widget.Backlight(
                brightness_file=
                "/sys/class/backlight/intel_backlight/brightness",
                max_brightness_file=
                "/sys/class/backlight/intel_backlight/max_brightness",
            ),
            widget.Sep(),
            widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
            widget.QuickExit(),
            widget.Systray(),
        ],
        24,
    )
Exemple #22
0
def init_widgets_list():
    widgets_list = [
        widget.GroupBox(
            active=colors[1],
            inactive=colors[0],
            foreground=colors[1],
            background=colors[0],
        ),
        widget.Prompt(
            padding=10,
            foreground=colors[1],
            background=colors[0],
        ),
        widget.WindowName(
            foreground=colors[1],
            background=colors[0],
        ),
        widget.Volume(
            foreground=colors[1],
            background=colors[0],
        ),
        widget.Wlan(foreground=colors[1],
                    background=colors[0],
                    interface='wlp2s0'),
        widget.Battery(
            format='{percent:2.0%}',
            foreground=colors[1],
            background=colors[0],
        ),  # simple battery percentage
        widget.Clock(
            format='%a %I:%M %p %Y-%m-%d ',
            foreground=colors[1],
            background=colors[0],
        ),
    ]
    return widgets_list
Exemple #23
0
    Key([mod], "w", lazy.window.kill()),

    # Switch between windows in current stack pane
    Key([alt], 'Tab', lazy.layout.down()),
    Key([mod, "control"], "r", lazy.restart()),
    Key([mod, "control"], "q", lazy.shutdown()),
    Key([mod], "r", lazy.spawncmd()),
    Key([], 'Caps_Lock', lazy.function(change_keyboard_layout())),
    Key([], "XF86AudioRaiseVolume",
        lazy.spawn("amixer -c 1 -q set Master 2dB+")),
    Key([], "XF86AudioLowerVolume",
        lazy.spawn("amixer -c 1 -q set Master 2dB-")),
]

screens = [
    Screen(top=bar.Bar([
        widget.GroupBox(),
        widget.WindowName(),
        widget.TextBox('🔋'),
        widget.Battery(battery_name='BAT1'),
        widget.TextBox('🔈'),
        widget.Volume(cardid=1, device=None, update_interval=0.2),
        widget.Systray(icon_size=14),
        widget.KeyboardLayout(name='KeyboardLayout',
                              configured_keyboards=['us', 'ru', 'ua']),
        widget.Clock(format='%Y-%m-%d %H:%M', ),
    ], 30), ),
    Screen(top=bar.Bar(
        [widget.GroupBox(), widget.WindowName()], 30), )
]
Exemple #24
0
     background=colors['blue'],
     active=colors['white1'],
     inactive=colors['black2'],
     highlight_color=[colors['blue'], colors['blue']],
     this_current_screen_border=colors['black1']
 ),
 widget.Image(
     filename='~/.config/qtile/edge1.png'
 ),
 widget.Spacer(),
 widget.Image(
     filename='~/.config/qtile/edge2.png'
 ),
 widget.Battery(
     format='{char} {percent:2.0%}',
     background=colors['magenta'],
     foreground=colors['white1'],
     low_foreground=colors['white1']
 ),
 widget.Image(
     filename='~/.config/qtile/edge3.png'
 ),
 widget.Clock(
     format='%m-%d-%y',
     background=colors['cyan'],
     foreground=colors['white2']
 ),
 widget.Image(
     filename='~/.config/qtile/edge4.png'
 ),
 widget.Clock(
     format='%a',
Exemple #25
0
        widget.GroupBox(hide_unused=True),
        widget.CurrentLayoutIcon(scale=0.65),
        widget.WindowName(),
        widget.Clipboard(foreground=RED),
        widget.Moc(play_color=GREEN, noplay_color=YELLOW),
        widget.Systray(),

        widget.Volume(
            volume_app=commands.alsamixer,
            foreground=GREEN),

        keyboard_widget,

        widget.Battery(
            discharge_char='↓',
            charge_char='↑',
            format='{char} {hour:d}:{min:02d}',
            foreground=YELLOW,
            low_foreground=RED),

        widget.CheckUpdates(
            distro='Arch_yay',
            display_format='{updates}',
            colour_no_update=GREEN,
            colour_have_updates=RED,
            execute=commands.update),

        widget.Clock(format='%Y-%m-%d %H:%M'),
    ],
    24,
)
Exemple #26
0
                widget.Prompt(),
                widget.WindowName(),
                widget.Chord(
                    chords_colors={
                        'launch': ("#ff0000", "#ffffff"),
                    },
                    name_transform=lambda name: name.upper(),
                ),
                # widget.TextBox("default config", name="default"),
                # widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.Systray(),
                widget.Net(),
                widget.Sep(),
                widget.Memory(),
                widget.Sep(),
                widget.Battery(
                    format='{char} {percent:2.0%} {hour:d}:{min:02d}'),
                widget.Sep(),
                widget.Clock(format='%d/%m/%y %a %I:%M'),
                widget.Sep(),
                widget.Volume()
            ],
            20,
        ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
Exemple #27
0
			fontsize = 16,
                        padding = 0
                        ),
                widget.Volume(
                        padding = 5
                        ),
		widget.TextBox(
			text = " ⌛",
			padding = 0,
			fontsize=16,
			foreground = color['light_blue']
			),
		widget.Battery(
			charge_char = '^',
			discharge_char = 'v',
			notify_below = 10,
			padding = 5,
			format = '{percent:2.0%}'
			),
		widget.TextBox(
			text = " ☁",
			padding = 0,
			fontsize = 18,
			foreground= color['light_blue']
			),
		widget.Net(
			interface= None,
			format = '{down}↓↑{up}',
			),
		widget.TextBox(
			text = " 🕳",
Exemple #28
0
        bottom=bar.Bar(
            [
                widget.CurrentLayout(),
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.Chord(
                    chords_colors={
                        'launch': ("#ff0000", "#ffffff"),
                    },
                    name_transform=lambda name: name.upper(),
                ),
                #widget.TextBox("default config", name="default"),
                #widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.TextBox("Battery: "),
                widget.Battery(format='{percent:2.0%}'),
                widget.TextBox("Volume: "),
                widget.PulseVolume(),
                widget.Systray(),
                #widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
                widget.Clock(format='%Y. %m. %d. %a %H:%M'),
                widget.QuickExit(default_text='Logout', foreground="#d75f5f"),
            ],
            24,
        ),
    ),
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(),
Exemple #29
0
def init_widgets_list():
    widgets_list = [
        widget.Image(filename="~/.config/qtile/icons/trioptimum-logo.png",
                     margin=2,
                     margin_x=5),
        widget.Sep(linewidth=0,
                   padding=5,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.GroupBox(
            font="Ubuntu Bold",
            #fontsize = 12,
            margin_x=0,
            margin_y=2,
            padding_x=8,
            padding_y=8,
            borderwidth=1,
            active=colors["white"],
            inactive=colors["white"],
            highlight_method="block",
            rounded=False,
            this_current_screen_border=colors["purple"],
            this_screen_border=colors["dark_grey"],
            other_current_screen_border=colors["black_grey"],
            other_screen_border=colors["black_grey"],
            foreground=colors["white"],
            background=colors["black_grey"]),
        widget.Prompt(prompt="{0}@{1}: ".format(os.environ["USER"],
                                                socket.gethostname()),
                      font="Ubuntu Mono",
                      padding=10,
                      foreground=colors["light_red"],
                      background=colors["dark_grey"]),
        widget.WindowName(foreground=colors["purple"]),
        widget.TextBox(background=colors["white"],
                       foreground=colors["black_grey"],
                       text="SkrivRoot-MAIN",
                       name="default"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.Image(filename="~/.config/qtile/icons/rj45.png",
                     margin=2,
                     margin_x=5),
        widget.Net(
            interface="wlp5s0",
            format='{down} ▼▲ {up}'  # format = '{interface}: {down} ▼▲ {up}'
        ),
        widget.TextBox(text="\U000027A4 VPN ", foreground="#33cc00"),
        # VPN Status + Public IP Country
        widget.GenPollText(func=get_vpn_status,
                           update_interval=5,
                           foreground="#33cc00"),
        widget.GenPollText(func=get_current_country,
                           update_interval=5,
                           foreground="#33cc00"),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/processor.png",
                     margin=2,
                     margin_x=5),
        widget.CPU(format='{load_percent}%'),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/ram.png",
                     margin=2,
                     margin_x=5),
        widget.Memory(foreground=colors["white"],
                      background=colors["black_grey"],
                      padding=5,
                      format='{MemUsed}Mb ({MemPercent}%)'),
        widget.Sep(linewidth=0, padding=3),
        widget.Image(filename="~/.config/qtile/icons/hard_drive.png",
                     margin=2,
                     margin_x=5),
        widget.DF(foreground=colors["white"],
                  background=colors["black_grey"],
                  padding=5,
                  partition='/',
                  format='{uf}Gb ({r:.0f}%)',
                  visible_on_warn=False,
                  warn_space=10),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),

        # Bitcoin ticker
        widget.BitcoinTicker(foreground="#f7931a"),

        # Monero ticker
        widget.GenPollText(func=xmr_ticker,
                           update_interval=30,
                           foreground="#fc6a03"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            background=colors["black_grey"],
            padding=0,
            scale=0.5),
        #widget.CurrentLayout(**widget_defaults),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.TextBox(text="\U0001F50B"),
        widget.Battery(format='{percent:2.0%}'),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),

        # Volume
        widget.TextBox(text="\U0001F50A"),
        widget.GenPollText(
            func=get_current_volume1,
            update_interval=0.2,
        ),
        widget.TextBox(text="\U0001F50A"),
        widget.GenPollText(
            func=get_current_volume2,
            update_interval=0.2,
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.TextBox(text="\u2328"),
        widget.GenPollText(
            func=get_kb_layout,
            update_interval=0.5,
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors["white"],
                   background=colors["black_grey"]),
        widget.Clock(
            format='📅  %a, %d %b. %Y - %H:%M:%S'),  # %S for adding seconds
    ]
    return widgets_list
Exemple #30
0
import os

# defaults for widgets and extensions
widget_defaults = dict(font='sans', fontsize=16, padding=6)

extension_defaults = widget_defaults.copy()
bottom_bar_widgets = [
    widget.CurrentLayoutIcon(),
    widget.GroupBox(),
    CryptoTicker(currency='usd',
                 from_currency='bitcoin',
                 format='{to_price}:{percent_change_1h}|{percent_change_24h}%',
                 update_interval=60),
    widget.Prompt(),
    widget.TaskList(rounded=False, margin_y=8, margin_x=1, padding_x=1),
    widget.Battery(),
    widget.Volume(),
    widget.Systray(),
    widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
]

screens = [
    Screen(bottom=bar.Bar(size=40, widgets=bottom_bar_widgets)),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),