コード例 #1
0
def test_trigger_and_cancel(manager_nospawn, minimal_conf_noscreen):

    # Set a long interval to allow for unanticipated delays in testing environment
    qewidget = widget.QuickExit(timer_interval=100)

    config = minimal_conf_noscreen
    config.screens = [
        libqtile.config.Screen(top=libqtile.bar.Bar([qewidget], 10))
    ]

    manager_nospawn.start(config)
    topbar = manager_nospawn.c.bar["top"]

    # Default text
    w = topbar.info()["widgets"][0]
    assert w["text"] == "[ shutdown ]"

    # Click widget to start countdown
    topbar.fake_button_press(0, "top", 0, 0, button=1)
    w = topbar.info()["widgets"][0]
    assert w["text"] == "[ 4 seconds ]"

    # Click widget again to cancel countdown
    topbar.fake_button_press(0, "top", 0, 0, button=1)
    w = topbar.info()["widgets"][0]
    assert w["text"] == "[ shutdown ]"
コード例 #2
0
def get_bottom_widgets(systray=False):
    def get_app_btn(text, color, cmd):
        return widget.TextBox(
            text=text,
            font=fonts.ICON,
            foreground=color,
            background=colors.black[4],
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(cmd)})

    APP_BTN = [
        get_app_btn(fontawesome.SEARCH, colors.red[0], "rofi -show drun"),
        get_app_btn(fontawesome.CODE, colors.brown[0], "/usr/bin/codium -n"),
        get_app_btn(fontawesome.WEB, colors.blue[0], "/usr/bin/brave"),
        get_app_btn(fontawesome.FOLDER, colors.green[0], "/usr/bin/pcmanfm"),
    ]

    APP_LIST = CustomTaskList(border=colors.brown[2],
                              rounded=False,
                              highlight_method='block',
                              txt_floating=f"{fontawesome.FLOAT} ",
                              txt_maximized=f"{fontawesome.MAXIMIZE} ",
                              txt_minimized=f"{fontawesome.MINIMIZE} ",
                              padding=4,
                              margin=0,
                              icon_size=15,
                              max_title_width=200,
                              urgent_border=colors.red[0])

    MUSIC = widget.Moc(
        foreground=colors.brown[1],
        play_color=colors.brown[1],
        noplay_color=colors.brown[0],
    )

    SYSTRAY = widget.Systray(foreground=colors.black[5],
                             background=colors.black[4])
    POWER = widget.QuickExit(default_text=fontawesome.POWER,
                             foreground=colors.red[0],
                             font=fonts.ICON,
                             background=colors.black[4])

    BOTTOM_WIDGETS_SYSTRAY = [
        SEP_S_DARK, *APP_BTN, SEP_L_DARK, APP_LIST, SEP_S, MUSIC, SEP_S,
        SEP_S_DARK, SYSTRAY, SEP_L_DARK, POWER, SEP_L_DARK
    ]

    BOTTOM_WIDGETS = [
        SEP_S_DARK, *APP_BTN, SEP_L_DARK, APP_LIST, SEP_S, MUSIC, SEP_S,
        SEP_L_DARK, POWER, SEP_L_DARK
    ]

    if systray:
        return BOTTOM_WIDGETS_SYSTRAY
    return BOTTOM_WIDGETS
コード例 #3
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
コード例 #4
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
コード例 #5
0
def test_exit(manager_nospawn, minimal_conf_noscreen):

    # Set a short interval and start so widget exits immediately
    qewidget = widget.QuickExit(timer_interval=0.001, countdown_start=1)

    config = minimal_conf_noscreen
    config.screens = [
        libqtile.config.Screen(top=libqtile.bar.Bar([qewidget], 10))
    ]

    manager_nospawn.start(config)
    topbar = manager_nospawn.c.bar["top"]

    # Click widget to start countdown
    topbar.fake_button_press(0, "top", 0, 0, button=1)

    # Trying to access bar should now give IPCError as qtile has shutdown
    with pytest.raises(IPCError):
        assert topbar.info()
コード例 #6
0
ファイル: config.py プロジェクト: zgagnon/config
def topbar():
    return bar.Bar([
        widget.CurrentLayoutIcon(),
        widget.CurrentLayout(),
        widget.GroupBox(this_current_screen_border="#00ff00"),
        widget.Prompt(),
        widget.WindowName(),
        widget.Chord(
            chords_colors={
                'launch': ("#ff0000", "#ffffff"),
            },
            name_transform=lambda name: name.upper(),
        ),
        widget.Systray(),
        widget.Volume(foreground="#00ffff"),
        widget.Clock(format='%Y-%m-%d %a %I:%M %p', foreground="#ffff00"),
        widget.QuickExit(),
    ],
                   24,
                   opacity=0.4,
                   margin=[0, 0, 30, 0])
コード例 #7
0
ファイル: qtile_config.py プロジェクト: tbetcke/dotfiles
def create_default_bar():
    return bar.Bar(
        [
            widget.CurrentLayout(),
            widget.GroupBox(),
            widget.Prompt(),
            widget.Spacer(),
            widget.Chord(
                chords_colors={
                    "launch": ("#ff0000", "#ffffff"),
                },
                name_transform=lambda name: name.upper(),
            ),
            widget.Sep(),
            widget.Wlan(
                interface="wlp111s0",
                format="{essid} {percent:2.0%}",
            ),
            widget.Sep(),
            widget.TextBox("Battery: "),
            widget.Battery(update_interval=5),
            widget.Sep(),
            widget.GenPollText(func=volume_poll, update_interval=1),
            widget.Sep(),
            widget.TextBox("Brightness: "),
            widget.Backlight(
                brightness_file=
                "/sys/class/backlight/intel_backlight/brightness",
                max_brightness_file=
                "/sys/class/backlight/intel_backlight/max_brightness",
            ),
            widget.Sep(),
            widget.Clock(format="%Y-%m-%d %a %I:%M %p"),
            widget.QuickExit(),
            widget.Systray(),
        ],
        24,
    )
コード例 #8
0
def get_top_widgets(systray=False):

    group_box_attr = {
        "rounded": False,
        "highlight_method": "line",
        "other_current_screen_border": colors.common['ui'],
        "other_screen_border": colors.common['ui'],
        "inactive": colors.common['ui'],
        "urgent_border": colors.red[2],
        "padding": 5,
    }

    def get_groupbox(text, scheme, groups):
        return [
            # widget.TextBox(
            # text=text,
            # font=fonts.ICON,
            # foreground=scheme[0],
            # ),
            widget.GroupBox(
                **group_box_attr,
                highlight_color=[colors.common['bg'], scheme[0]],
                this_screen_border=scheme[0],
                this_current_screen_border=scheme[1],
                visible_groups=groups[0],
            ),
            widget.GroupBox(**group_box_attr,
                            highlight_color=[colors.common['bg'], scheme[0]],
                            this_screen_border=scheme[0],
                            this_current_screen_border=scheme[1],
                            visible_groups=groups[1:],
                            hide_unused=True)
        ]

    def get_app_btn(text, color, cmd):
        return widget.TextBox(
            text=text,
            font=fonts.ICON,
            foreground=color,
            fontshadow=colors.black[4],
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(cmd)})

    APP_BTN = [
        get_app_btn(fontawesome.CODE, colors.brown[0], "/usr/bin/codium -n"),
        get_app_btn(fontawesome.WEB, colors.blue[0], "/usr/bin/brave"),
        get_app_btn(fontawesome.FOLDER, colors.green[0], "/usr/bin/pcmanfm"),
    ]

    START_MENU = widget.Image(
        filename="~/.config/qtile/assets/mirage-logo.png",
        margin_x=7,
        margin_y=5,
        mouse_callbacks={
            'Button1': lambda: qtile.cmd_spawn("rofi -show drun")
        })

    # Split GroupBox into sections
    CODE_GROUPBOX = get_groupbox(fontawesome.CODE,
                                 [colors.brown[0], colors.brown[2]],
                                 ["1", "2"])
    WEB_GROUPBOX = get_groupbox(fontawesome.WEB,
                                [colors.blue[0], colors.blue[1]],
                                ["3", "4", "5"])
    DOCS_GROUPBOX = get_groupbox(fontawesome.FOLDER,
                                 [colors.green[0], colors.green[1]],
                                 ["6", "7"])
    MEET_GROUPBOX = get_groupbox(fontawesome.CAMERA,
                                 [colors.red[0], colors.red[1]],
                                 ["8", "9", "0"])
    GROUPBOXES = [
        *CODE_GROUPBOX, SEP_S, *WEB_GROUPBOX, SEP_S, *DOCS_GROUPBOX, SEP_S,
        *MEET_GROUPBOX
    ]
    GROUPBOX = widget.GroupBox(**group_box_attr,
                               highlight_color=colors.common["bg"],
                               this_screen_border=colors.brown[3],
                               this_current_screen_border=colors.blue[1],
                               hide_unused=True)

    CURRENT_WINDOW = [
        SEP_S, *[
            WindowControl(action_type=action,
                          font=fonts.ICON,
                          fontshadow=colors.black[4],
                          padding=5)
            for action in ["KILL", "MAX", "MIN", "FLOAT"]
        ], SEP_S,
        CustomTaskList(border=colors.brown[2],
                       rounded=False,
                       highlight_method='block',
                       txt_floating=f"{fontawesome.FLOAT} ",
                       txt_maximized=f"{fontawesome.MAXIMIZE} ",
                       txt_minimized=f"{fontawesome.MINIMIZE} ",
                       padding=7,
                       margin=0,
                       icon_size=15,
                       max_title_width=200,
                       urgent_border=colors.red[0]), SEP_S
    ]

    MEMORY = [
        # widget.TextBox(
        #     text=fontawesome.MEMORY,
        #     font=fonts.ICON,
        #     foreground=colors.blue[0],
        # ),
        widget.Memory(foreground=colors.blue[0],
                      format='{MemPercent}%{MemUsed: .0f}M/{MemTotal: .0f}M',
                      font=fonts.MAIN),
    ]

    BATTERY = [
        # widget.TextBox(
        #     text=fontawesome.BATTERY,
        #     font=fonts.ICON,
        #     foreground=colors.brown[5],
        # ),
        # widget.BatteryIcon(
        #     theme_path="/home/jahnsmichael/.config/qtile/assets/battery",
        #     padding=8,
        # ),
        widget.Battery(foreground=colors.brown[5],
                       format='{char} {percent:2.0%}',
                       discharge_char='',
                       low_percentage=0.1,
                       low_foreground=colors.red[0],
                       notify_below=20,
                       show_sort_text=False,
                       font=fonts.MAIN)
    ]
    CLOCK = [
        # widget.TextBox(
        #     text=fontawesome.CLOCK,
        #     font=fonts.ICON,
        #     foreground=colors.green[0],
        # ),
        widget.Clock(format='%a, %d %b %Y | %H:%M:%S',
                     foreground=colors.green[0],
                     font=fonts.MAIN),
    ]

    SYSTRAY = widget.Systray(foreground=colors.black[5], icon_size=15)

    POWER = widget.QuickExit(
        default_text=fontawesome.POWER,
        foreground=colors.red[0],
        font=fonts.ICON,
    )

    TOP_WIDGETS = [
        START_MENU, *APP_BTN, *CURRENT_WINDOW, GROUPBOX,
        widget.Chord(), SEP_S, *MEMORY, SEP_S, *BATTERY, SEP_S, *CLOCK, SEP_L
    ]

    TOP_WIDGETS_SYSTRAY = [
        START_MENU, *APP_BTN, *CURRENT_WINDOW, GROUPBOX,
        widget.Chord(), SEP_S, *MEMORY, *BATTERY, *CLOCK, SYSTRAY, SEP_S,
        POWER, SEP_S
    ]

    if systray:
        return TOP_WIDGETS_SYSTRAY
    return TOP_WIDGETS
コード例 #9
0
ファイル: config.py プロジェクト: bearguns/Dotfiles
            highlight_method="block",
            this_current_screen_border=my_nord_theme['nord7'],
        ),
        widget.Spacer(length=bar.STRETCH, ),
        widget.Systray(margin=8),
        widget.Spacer(length=12, padding=4),
        widget.Pacman(foreground=my_nord_theme['nord1'],
                      background=my_nord_theme['nord13'],
                      unavailable=my_foreground),
        widget.Clock(
            format='%Y-%m-%d %a %I:%M %p',
            foreground=my_foreground,
            background=my_nord_theme['nord1'],
        ),
        widget.QuickExit(
            background=my_nord_theme['nord11'],
            foreground=my_nord_theme['nord1'],
        ),
    ],
                          28,
                          background=my_nord_theme['nord1'],
                          font="Ubuntu Condensed"), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
         "Button3",
コード例 #10
0
ファイル: config.py プロジェクト: yssrphile/twm_dotfiles
                ),
                #widget.TextBox("default config", name="default", foreground=themeColors["03"]),
                #widget.TextBox("Press <M-r> to spawn", foreground=themeColors["02"]),
                ###widget.CPU(), ### THIS DOES NOT SEEM TO WORK
                #widget.BatteryIcon(foreground=themeColors["02"]),
                widget.TextBox("Battery: ", foreground=themeColors["03"]),
                widget.Battery(foreground=themeColors["03"],
                               format='{char} {percent:2.0%}',
                               update_interval=30),
                widget.TextBox("|", padding=10, foreground=themeColors["fg"]),
                widget.Systray(),
                #widget.Clock(format='%Y-%m-%d %a %I:%M %p', foreground=themeColors["12"], padding=30),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p',
                             foreground=themeColors["12"]),
                widget.TextBox("|", padding=10, foreground=themeColors["fg"]),
                widget.QuickExit(foreground=themeColors["09"]),
                #widget.TextBox(" ", padding=1),
            ],
            30,
            background=themeColors["bg"],
            margin=2,
            opacity=0.98,
        ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
コード例 #11
0
 def shutdown():
     return widget.QuickExit(background=colors['contrast'],
                             default_text='\u23FC',
                             fontsize=20)
コード例 #12
0
ファイル: config.py プロジェクト: NoglaBoi/dotfiles
                    },
                    name_transform=lambda name: name.upper(),
                ),
                # widget.TextBox("default config", name="default"),
                # widget.TextBox("Press <M-r> to spawn", foreground="#d75f5f"),
                widget.Systray(background=colors[0], padding=5),
                widget.Sep(linewidth=0,
                           padding=10,
                           foreground=colors[2],
                           background=colors[0]),
                widget.CurrentLayout(
                    foreground=colors[2], background=colors[1], padding=5),
                widget.Clock(foreground=colors[2],
                             background=colors[1],
                             format="%A, %B %d - %H%M "),
                widget.QuickExit(background=colors[1]),
            ],
            24,
        ), ),
]

### JUST SOME CRAP ###

import os
os.system("/home/noahmk/.config/qtile/autostart.sh")

######################

# Drag floating layouts.
mouse = [
    Drag([mod],
コード例 #13
0
                widget.CPUGraph(),
                widget.TextBox(text='',
                               background="000000",
                               foreground="8B0000",
                               padding=0,
                               fontsize=60,
                               width=23),
                widget.CurrentLayout(background="8B0000", fontsize=15),
                widget.TextBox(text='',
                               background="8B0000",
                               foreground="000000",
                               padding=0,
                               fontsize=60,
                               width=23),
                widget.QuickExit(default_text="\u23FB",
                                 fontsize=18,
                                 countdown_format="{}",
                                 countdown_start=10),
                widget.Moc(
                    background="0000FF", play_color="ffffff", max_chars=20),
            ],
            24,
        ), ),
]

# Drag floating layouts.
mouse = [
    Drag([mod],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag([mod],
コード例 #14
0
ファイル: config.py プロジェクト: kenmckenzie/Laptopdots
                widget.Mpris2(display_metadata=['xesam:title', 'xesam:artist'],
                              stop_pause_text=" ",
                              scroll_wait_intervals=30,
                              background=colors[2],
                              scroll_chars=50,
                              objname='org.mpris.MediaPlayer2.spotify'),
                #widget.TextBox("default config", name="default"),
                #widget.CheckUpdates(),
                widget.CurrentLayoutIcon(),
                widget.NetGraph(padding=5,
                                border_color=colors[0],
                                fill_color=colors[2],
                                graph_color=colors[2]),
                widget.Clock(padding=5, format='%Y-%m-%d %a %I:%M %p'),
                widget.Systray(padding=5),
                widget.QuickExit(
                    padding=5, default_text="[  ]", background=colors[0]),
            ],
            24,
            opacity=0.7), ),
]

# 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()),
コード例 #15
0
                widget.Chord(
                    chords_colors={
                        'launch': ("#ff0000", "#ffffff"),
                    },
                    name_transform=lambda name: name.upper(),
                ),
                #widget.TextBox("default config", name="default"),
                #widget.TextBox("Press <M-r> 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(),
         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())
]
コード例 #16
0
ファイル: config.py プロジェクト: danekikr/dotfiles2
         widget.BatteryIcon(
             battery=0,
             update_interval=5,
         ),
         widget.Battery(battery=1, ),
         widget.BatteryIcon(
             battery=1,
             update_interval=5,
         ),
         widget.TextBox(
             '⏰',
             font='JoyPixels',
             foreground='#C795AE',
         ),
         widget.Clock(foreground='#95AEC7', format='%H:%M'),
         widget.QuickExit(foreground='#C795AE', ),
     ],
     24,
 ),
 bottom=bar.Bar(
     [
         widget.TextBox(
             '🎵',
             foreground='#C7CCD1',
         ),
         widget.Mpd2(foreground='#95AEC7', ),
         widget.TextBox(
             '🔊',
             foreground='#C7CCD1',
             font='JoyPixels',
         ),
コード例 #17
0
         mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(terminal + ' -t=float -e=nmtui')},
     ),
     widget.PulseVolume( # VOLUME
         fmt = '<span face="' + my_fonts[6] + '" foreground="' + colors[5] + '">\uf028</span> {}',
     ),
     widget.Clock( # DATE
         fmt = '<span face="' + my_fonts[6] + '" foreground="' + colors[10] + '">\uf073</span> {}',
         format = '%a.%d.%m',
     ),
     widget.Clock( # CLOCK
         fmt = '<span face="' + my_fonts[6] + '" foreground="' + colors[2] + '">\uf017</span> {}',
         format = '%H:%M',
     ),
     widget.QuickExit( # EXIT
         font = my_fonts[2],
         foreground = colors[1],
         countdown_format = '{}s',
         default_text = '\uf011',
     ),
     widget.CheckUpdates(
         colour_have_updates = colors[9],
         colour_no_updates = colors[9],
         background = colors[10],
         foreground = colors[9],
         mouse_callbacks = {'Button1': lambda qtile: qtile.cmd_spawn(terminal + ' -t=float -e sudo pacman -Syyu')},
         distro = 'Arch',
         fmt = '\uf2f1 {}',
         display_format = '{updates}',
         no_update_string = '0',
     ),
 ],
 28,
コード例 #18
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.GroupBox(font="FontAwesome",
                        fontsize=18,
                        margin_y=2,
                        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="Ubuntu Bold",
                             foreground=colors[5],
                             background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.WindowName(
            font="Ubuntu",
            fontsize=12,
            foreground=colors[5],
            background=colors[1],
        ),
        # widget.Wallpaper(
        #          fontsize = 12,
        #          directory = "/home/gast/Imágenes/wallpapers",
        #          foreground = colors[5],
        #          background = colors[1],
        #          ),
        # widget.CapsNumLockIndicator(
        #          foreground = colors[5],
        #          background = colors[1],
        #          ),
        # widget.Sep(
        #          linewidth = 1,
        #          padding = 10,
        #          foreground = colors[2],
        #          background = colors[1]
        #          ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text=" ",
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Battery(
            font="Ubuntu",
            update_interval=10,
            fontsize=12,
            discharge_char="",
            charge_char=" ",
            format='{char} {percent:2.0%}',
            foreground=colors[5],
            background=colors[1],
        ),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text=" ",
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=12,
                     format=" %H:%M "),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text=" ",
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=12,
                     format="%d/%m/%Y"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.Systray(background=colors[1], icon_size=20, padding=4),
        widget.QuickExit(font="FontAwesome",
                         backgrounf=colors[1],
                         default_text="  ",
                         countdown_format="[{}s]",
                         padding=4),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
    ]
    return widgets_list
コード例 #19
0
        #),
        widget.TextBox(text='|'),
        widget.CapsNumLockIndicator(),
        widget.TextBox(text='|'),
        widget.Chord(
            chords_colors={
                'launch': ("#fabd2f", "#282828"),
            },
            name_transform=lambda name: name.upper(),
        ),
        widget.Systray(),
        widget.Spacer(length=8),
        widget.Clock(format='%A, %d %b %Y %I:%M%p'),
        widget.Spacer(length=8),
        widget.QuickExit(padding=1,
                         foreground='fb4934',
                         default_text='[  ]',
                         countdown_format='[ {} ]'),
    ],
    30,
    margin=[4, 0, 0, 0],
    background='202020')

screens = [
    Screen(
        top=top_bar,
        bottom=bottom_bar,
        left=bar.Gap(size=8),
        right=bar.Gap(size=8),
    ),
]
コード例 #20
0
ファイル: config.py プロジェクト: howlcipher/qtile
                               padding=5),
                widget.MemoryGraph(),
                # widget.TextBox("Press &lt;mod+shift+enter&gt; for menu", foreground=colors[3]),
                widget.Systray(padding=5),
                widget.Clock(foreground=colors[6],
                             format='%A, %B %d  [ %H:%M ]'),
                widget.TextBox(text=" Vol:",
                               foreground=colors[8],
                               background=colors[5],
                               padding=5),
                widget.Volume(
                    foreground=colors[8], background=colors[5], padding=5),
                widget.Battery(
                    foreground=colors[6],
                    format='{char} {percent:2.0%} {hour:d}:{min:02d}'),
                widget.QuickExit(foreground="#7ed6df"),
            ],
            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()),
コード例 #21
0
ファイル: config.py プロジェクト: buckypimpin/dotfiles
                    foreground="#ffffff",
                    background="#e56551",
                ),
                widget.GroupBox(
                    background=COLORS_PALLET1[2],
                    foreground="#2f52e0",
                    block_highlight_text_color="#2f52e0",
                ),
                widget.WindowName(background=COLORS_PALLET1[1], ),
                widget.Clock(
                    format='%a, %d %B %I:%M %p',
                    background=COLORS_PALLET1[3],
                    foreground="#123456",
                ),
                widget.QuickExit(background=COLORS_PALLET1[4],
                                 default_text="[ Logout ]",
                                 countdown_format="[---{}s---]",
                                 padding=10),
            ],
            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(),
コード例 #22
0
def init_widgets_list():
    widgets_list = [
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=dracula[12]),
        widget.GroupBox(font="Ubuntu Bold",
                        fontsize=10,
                        margin_y=4,
                        margin_x=0,
                        padding_y=6,
                        padding_x=6,
                        borderwidth=4,
                        active=dracula[15],
                        inactive=dracula[0],
                        rounded=True,
                        highlight_color=dracula[3],
                        highlight_method="line",
                        this_current_screen_border=dracula[3],
                        this_screen_border=dracula[3],
                        other_current_screen_border=dracula[3],
                        other_screen_border=dracula[0],
                        foreground=dracula[15],
                        background=dracula[12]),
        widget.Prompt(prompt=prompt,
                      font="Ubuntu Mono",
                      padding=10,
                      foreground=colors[3],
                      background=colors[1]),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=dracula[0]),
        widget.WindowName(foreground=dracula[15],
                          background=dracula[0],
                          padding=0),
        widget.Sep(linewidth=0,
                   padding=6,
                   foreground=colors[0],
                   background=dracula[0]),
        widget.Systray(background=colors[0], padding=5),
        widget.CheckUpdates(
            update_interval=1800,
            distro="Arch_checkupdates",
            display_format=" ⟳ {updates} Aggiornamenti",
            foreground=colors[2],
            background=dracula[12],
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(myTerm + ' -e sudo pacman -Syu')
            }),
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            background=dracula[3],
            foreground=dracula[15],
            padding=0,
            scale=0.7),
        widget.CurrentLayout(background=dracula[3],
                             foreground=dracula[15],
                             padding=5),
        widget.TextBox(text=" 🌡",
                       padding=2,
                       background=dracula[12],
                       foreground=dracula[15],
                       fontsize=11),
        widget.ThermalSensor(background=dracula[12],
                             foreground=dracula[15],
                             padding=5),
        widget.TextBox(text=" 🖬",
                       background=dracula[3],
                       foreground=dracula[15],
                       padding=0,
                       fontsize=14),
        widget.Memory(background=dracula[3], foreground=dracula[15],
                      padding=5),
        widget.Volume(background=dracula[12],
                      foreground=dracula[15],
                      padding=5),
        widget.Clock(background=dracula[3],
                     foreground=dracula[15],
                     format="%A, %B %d  [ %H:%M ]",
                     padding=6),
        widget.Sep(linewidth=0,
                   background=dracula[12],
                   foreground=colors[0],
                   padding=8),
        widget.TextBox(
            text='⏻',
            background=dracula[12],
            foreground=dracula[15],
            padding=0,
            fontsize=18,
        ),
        widget.Sep(linewidth=0,
                   background=dracula[12],
                   foreground=colors[0],
                   padding=8),
        widget.QuickExit(
            background=dracula[12],
            foreground=dracula[15],
        ),
    ]
    return widgets_list
コード例 #23
0
    [
        widget.GroupBox(),
        widget.Prompt(),
        widget.TaskList(),
        widget.Chord(
            chords_colors={
                'launch': ("#ff0000", "#ffffff"),
            },
            name_transform=lambda name: name.upper(),
        ),
        widget.Volume(),
        widget.CPUGraph(width=60, samples=60),
        widget.BatteryIcon(),
        widget.Systray(),
        widget.Clock(format='%a %d/%m | %H:%M'),
        widget.QuickExit(default_text='[ Exit ]', countdown_format='Exit: {}'),
        widget.CurrentLayoutIcon(),
        widget.Notify()
    ],
    size=24,
)

screens = [Screen(top=_top_bar)]

# Drag floating layouts.
mouse = [
    Drag(['mod4'],
         "Button1",
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag(['mod4'],
コード例 #24
0
         widget.Prompt(),
         widget.Clock(format='%a, %-d %b %I:%M %p'),
         widget.Spacer(length=500),
         widget.KeyboardLayout(configured_keyboards=keyboards),
         widget.Image(
             filename="~/.config/qtile/icons/volume_icon2.png"),
         widget.Volume(),
         widget.Spacer(length=25),
         widget.Systray(),
         widget.Spacer(length=20),
         widget.BatteryIcon(update_interval=5, padding=5),
         widget.Battery(
             format='{percent:2.0%} {hour:d}:{min:02d} {watt:.2f} W',
             notify_below=0.2),
         widget.Spacer(length=5),
         widget.QuickExit(default_text="  "),
         widget.Image(
             filename="~/.config/qtile/icons/power_icon2.png",
             margin=5),
         widget.Spacer(length=20),
     ],
     27,
     opacity=0.80,
     background=colors["gris"],
 ),
 bottom=bar.Bar(
     [
         widget.CurrentLayout(),
         widget.GroupBox(),
     ],
     24,
コード例 #25
0
ファイル: config.py プロジェクト: TechnicalDC/dotfiles
                 **widget_defaults),
            widget.Clock(
                 background = colors["*.background"],
                 format='%H:%M',
                 **widget_defaults),
            widget.Systray(
                 background = colors["*.background"]),
            widget.Sep(
                 background = colors["*.background"],
                 linewidth=0,
                 padding=10,
                 ),
            widget.QuickExit(
                 font='Sauce Code Pro Nerd Font',
                 background = colors["*.background"],
                 default_text="  ",
                 countdown_format = ' {}s ',
                 fontsize=11,
                 padding=3,
                 ),
            widget.Sep(
                 background = colors["*.background"],
                 linewidth=0,
                 padding=10,
                 ),
         ],
         25,
         margin = [0, 400, 5, 400],
         opacity=0.9,
         background=colors["*.background"],
     ),
 ),
コード例 #26
0
                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()),
    Drag([mod], "Button3", lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front())
]
コード例 #27
0
ファイル: config.py プロジェクト: Enzoerb/qtile-configs
                               fontsize=16,
                               mouse_callbacks={"Button1": up_volume,
                                                "Button3": down_volume}
                               ),
                widget.Volume(background="#8776ff", foreground='#000000'),
                widget.TextBox("", foreground='#8776ff', fontsize=37, padding=0),

                widget.TextBox("", foreground='#6666ff', fontsize=37, padding=-4),
                widget.Clock(format='%A | %d-%m-%Y %H:%M',
                             foreground='#000000',
                             background='#6666ff'),
                widget.TextBox("", foreground='#6666ff', fontsize=37, padding=0),

                widget.TextBox("", foreground='#4455ff', fontsize=37, padding=-4),
                widget.QuickExit(default_text='[ shutdown ]  ',
                                 countdown_format='[ {} seconds ]  ',
                                 background='#4455ff', foreground='000000', padding=0,
                                 ),
                widget.TextBox("▒", foreground='4455ff', fontsize=30, padding=0)
            ],
            24,
            # background="#010328",
            opacity=1,
            margin=2,
        ),
        bottom=bar.Bar(
            [
                widget.CurrentLayoutIcon(),
                widget.CPU(format="CPU: {freq_current}GHz, {load_percent}%"),
                widget.CPUGraph(),
                widget.Memory(),
                widget.MemoryGraph(),
コード例 #28
0
ファイル: config.py プロジェクト: librenauta/linux-config
                widget.WindowName(foreground="#999999"),
                widget.CheckUpdates(
                    custom_command="checkupdates",
                    background="555555",
                    update_interval=1800,
                    colour_have_updates="00ff00",
                    colour_no_updates="ff5500",
                    display_format='Actualitzacions: {updates}',
                    padding=10,
                    execute="lxterminal -e sudo pacman -Syyu",
                ),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p', padding=10),
                widget.Systray(),
                widget.QuickExit(
                    default_text="Salir",
                    foreground=color_light,
                    countdown_format="[ {} ]"
                ),
            ],
            34,
            background="#222222",
            opacity=1
        ),
    ),
]

# 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(),
コード例 #29
0
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.CurrentLayout(),
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("Screen 1", name="default"),
                widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
                widget.QuickExit(),
            ],
            24,
        ),
    ),
    Screen(
        bottom=bar.Bar(
            [
                widget.CurrentLayout(),
                widget.GroupBox(),
                widget.Prompt(),
                widget.WindowName(),
                widget.TextBox("Screen 2", name="default"),
                widget.TextBox("Press &lt;M-r&gt; to spawn", foreground="#d75f5f"),
                widget.Systray(),
                widget.Clock(format='%Y-%m-%d %a %I:%M %p'),
コード例 #30
0
ファイル: config.py プロジェクト: Rym4rll0n/dotfiles
     ),
     widget.Prompt(prompt='Executar: '),
     widget.WindowName(fmt='🐧{}🐧', for_current_screen=True),
     widget.Chord(
         chords_colors={
             'launch': ("#ff0000", "#ffffff"),
         },
         name_transform=lambda name: name.upper(),
     ),
     widget.Volume(emoji=True),
     widget.Sep(
         foreground='23064f', padding=1, size_percent=100, linewidth=3),
     widget.Clock(format='%a %d/%m/%Y %H:%M'),
     widget.Sep(
         foreground='23064f', padding=1, size_percent=100, linewidth=3),
     widget.QuickExit(default_text='', countdown_format='{} segundos'),
 ],
                    25,
                    margin=[3, 5, 2, 5],
                    background='1f004d'),
        wallpaper='~/.wallpaper/wpp-img-exemplo.png',
        wallpaper_mode='fill'),
 Screen(
     bottom=bar.Bar(
         [
             widget.CPU(),
             widget.CurrentLayoutIcon(scale=0.70),
             widget.Spacer(length=bar.STRETCH),
             widget.Systray(),
             widget.CheckUpdates(display_format='Atualizações:{updates}',
                                 update_interval=180),