Пример #1
0
def init_widgets_list():
    prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())
    widgets_list = [
        widget.CurrentLayoutIcon(foreground=colors[5], background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.GroupBox(font="FontAwesome",
                        fontsize=16,
                        margin_y=-1,
                        margin_x=0,
                        padding_y=6,
                        padding_x=5,
                        borderwidth=0,
                        disable_drag=True,
                        active=colors[9],
                        inactive=colors[5],
                        rounded=False,
                        hide_unused=True,
                        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.TextBox(font="FontAwesome",
                       text="  ",
                       foreground=colors[7],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Mpris2(name='spotify',
                      objname="org.mpris.MediaPlayer2.spotify",
                      display_metadata=['xesam:title', 'xesam:artist'],
                      scroll_chars=None,
                      stop_pause_text='',
                      **widget_defaults),
        #               widget.Sep(
        #                        linewidth = 1,
        #                        padding = 10,
        #                        foreground = colors[2],
        #                        background = colors[1]
        #                        ),
        #               widget.WindowName(font="Noto Sans",
        #                        fontsize = 12,
        #                        foreground = colors[5],
        #                        background = colors[1],
        widget.Spacer(),
        widget.TextBox(font="FontAwesome",
                       text="  ",
                       foreground=colors[7],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.ThermalSensor(foreground=colors[5],
                             foreground_alert=colors[6],
                             background=colors[1],
                             metric=True,
                             tag_sensor="CPU",
                             padding=3,
                             threshold=90),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text="  ",
                       foreground=colors[4],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        arcomemory.Memory(fmt='{MemUsed} MB  {Memsza}%',
                          execute='xfce4-terminal -e htop',
                          padding=5,
                          margin=10,
                          font="Noto Sans",
                          fontsize=12,
                          update_interval=1,
                          foreground=colors[5],
                          background=colors[1]),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        arcobattery.BatteryIcon(padding=0,
                                scale=0.7,
                                y_poss=2,
                                theme_path=home +
                                "/.config/qtile/icons/battery_icons_horiz",
                                update_interval=1,
                                background=colors[1]),
        widget.Battery(energy_now_file='charge_now',
                       energy_full_file='charge_full',
                       power_now_file='current_now',
                       charge_char="  ",
                       discharge_char="  ",
                       low_perentage=0.15,
                       low_foreground='FF0000',
                       update_interval=1),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.TextBox(font="FontAwesome",
                       text="   ",
                       foreground=colors[3],
                       background=colors[1],
                       padding=0,
                       fontsize=16),
        widget.Clock(foreground=colors[5],
                     background=colors[1],
                     fontsize=16,
                     timezone="Europe/Budapest",
                     format="%H:%M"),
        widget.Sep(linewidth=1,
                   padding=10,
                   foreground=colors[2],
                   background=colors[1]),
        widget.Systray(background=colors[1], icon_size=20, padding=4),
    ]
    return widgets_list
Пример #2
0
                 **widget_defaults),
 widget.Prompt(**widget_defaults),
 widget.Spacer(),
 widget.CheckUpdates(
     **widget_defaults,
     update_interval=1800,
     distro='Arch_yay',
     custom_command='checkupdates+aur',
     display_format=' {updates}',
     colour_have_updates=GREEN,
     execute='kitty -e yay -Syu',
 ),
 widget.Mpris2(
     name='spotify',
     objname="org.mpris.MediaPlayer2.spotify",
     display_metadata=['xesam:title', 'xesam:artist'],
     scroll_chars=None,
     stop_pause_text='',
     **widget_defaults
 ),
 widget.BatteryIcon(
 ),
 widget.Battery(
     charge_char='+',
     discharge_char='',
     unknown_char='',
     format='{char}{percent:2.0%}',
     **widget_defaults,
 ),
 widget.Volume(emoji=True),
 widget.Volume(**widget_defaults),
 widget.Systray(),
Пример #3
0
         highlight_method="block",
         this_current_screen_border=colors[2],
         #this_screen_border = colors [4],
         other_current_screen_border=colors[0],
         other_screen_border=colors[0],
         foreground=colors[2],
         background=colors[0],
         disable_drag=True,
         #hide_unused = True
     ),
     widget.Prompt(),
     widget.WindowName(padding=3, background=colors[2]),
     #                 widget.Mpris(objname='org.mpris.MediaPlayer.spotify'),
     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,
Пример #4
0
                padding=-20),
 widget.Prompt(prompt="run: ",
               ignore_dups_history=True,
               fontsize=FONT_SIZE),
 widget.WindowName(fontsize=FONT_SIZE),
 widget.Spacer(length=50),
 widget.TextBox(font="font-awesome",
                text=(""),
                fontsize=FONT_SIZE,
                padding=0),
 widget.Spacer(length=10),
 widget.Mpris2(
     background=BG_COLOR,
     foreground=FG_COLOR,
     name='spotify',
     stop_pause_text='',
     fontsize=FONT_SIZE,
     scroll_chars=None,
     display_metadata=['xesam:title', 'xesam:artist'],
     objname="org.mpris.MediaPlayer2.spotify",
 ),
 widget.Spacer(length=75),
 widget.TextBox(font="font-awesome",
                text=(""),
                fontsize=FONT_SIZE,
                padding=0),
 widget.NetGraph(
     bandwidth_type="up", type="linefill", line_width=1),
 widget.Spacer(length=10),
 widget.TextBox(font="font-awesome",
                text=(""),
                fontsize=FONT_SIZE,
Пример #5
0
    fontsize=14,
    padding=10,
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        bottom=bar.Bar(
            [
                widget.GroupBox(padding=3,
                                this_current_screen_border=bold_color,
                                foreground=fg_color),
                widget.Prompt(foreground=fg_color),
                widget.Spacer(),
                widget.Mpris2(objname="org.mpris.MediaPlayer2.spotify",
                              name="spotify",
                              foreground=fg_color),
                # widget.Notify(default_timeout=10, foreground=fg_color),
                widget.Sep(),
                widget.CheckUpdates(display_format="{updates} Pkg Updates",
                                    colour_no_updates=fg_color,
                                    colour_have_updates=bold_color,
                                    distro='Arch',
                                    execute=lazy.spawn("tkpacman"),
                                    foreground=fg_color),
                widget.Sep(),
                widget.ThermalSensor(tag_sensor="Core 0", foreground=fg_color),
                widget.Sep(),
                widget.GenPollUrl(url="http://ip-api.com/json/",
                                  parse=get_ip_location,
                                  foreground=fg_color),
Пример #6
0
                 padding=0),
 widget.CurrentLayoutIcon(
     custom_icon_paths=['/home/graphity/.config/qtile/icons/']),
 widget.CurrentLayout(foreground=colors['red']),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=60),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=80),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=100),
 widget.Mpris2(name='spotify',
               display_metadata=['xesam:title', 'xesam:artist'],
               objname='org.mpris.MediaPlayer2.spotify',
               stop_pause_text='. . .',
               scroll_chars=None,
               foreground=colors['red_dark']),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=100),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=80),
 widget.Sep(height_percent=None,
            foreground=colors['purple_light'],
            size_percent=60),
 widget.Prompt(foreground=colors['red'], cursor_color=colors['purple']),
 widget.Spacer(length=bar.STRETCH, width=None),
 widget.Systray(icon_size=20),
 widget.Spacer(length=5, width=None),
Пример #7
0
    def init_screens(self):
        """"""
        screens = [

            Screen(

                # left=bar.Bar(

                # widgets=[
                # widget.TextBox(text="WTF", background=self.theme["panel-2nd"]),
                # ],

                # size=self.theme["top-height"],
                # background=self.theme["panel-top"],

                # ),


                top=bar.Bar(
                    widgets=[

                        # Logo
                        widget.TextBox(text=" ", background=self.theme["panel-2nd"]),
                        widget.Image(filename=ARCHLOGO, scale=True),

                        # Commands
                        widget.Prompt(fontsize=self.theme["size-md"], cursor_color=self.theme["panel-top"], foreground=self.theme["panel-top"], prompt="$ ", background=self.theme["active"]),
                        #widget.TextBox(text=" ", background=self.theme["active"]),
                        # widget.Sep(foreground=self.theme["separator"]),
                        widget.TextBox(text=" ", background=self.theme["panel-2nd"]),

                        widget.Sep(foreground=self.theme["panel-bottom"], padding=self.theme["separator-padding"] // 2),

                        # widget.AGroupBox(),
                        # widget.Backlight(),

                        # Groups
                        widget.GroupBox(fontsize=self.theme["size-md"], padding=5, borderwidth=self.theme['border-width-active'],
                                        rounded=self.theme["rounded"], this_current_screen_border=self.theme["primary"],
                                        highlight_method=self.theme["group-highlight"], active=self.theme["active"],
                                        inactive=self.theme["inactive"],
                                        highlight_color=self.theme['primary-2nd'],
                                        urgent_text=self.theme['alert'],
                                        urgent_border=self.theme['alert'],
                                        urgent_alert_method=self.theme['group-highlight'],

                                        ),

                        # Spacer
                        widget.Spacer(bar.STRETCH),


                        # Mpris2
                        widget.Mpris2(display_metadata=['xesam:title', 'xesam:album', 'xesam:artist'], fontsize=self.theme["size-md"] * 0.8, objname='org.mpris.MediaPlayer2.spotify', name='Spotify', scroll_chars=128, scroll_interv=0.5, scroll_wait_intervals=8, foreground=self.theme["foreground"]),
                        widget.TextBox(text="   "),


                        # Current Layout
                        # widget.TextBox(text=" ", background=self.theme["panel-2nd"]),
                        # widget.CurrentLayout(background=self.theme["panel-2nd"], foreground=self.theme["foreground-2nd"], fontsize=self.theme["size-md"]*0.8),
                        widget.CurrentLayoutIcon(scale=0.7, background=self.theme["panel-2nd"], foreground=self.theme["foreground-2nd"]),

                    ],

                    size=self.theme["top-height"],
                    background=self.theme["panel-top"],

                ),


                bottom=bar.Bar(
                    widgets=[

                        # Tasklist
                        #widget.TaskList(highlight_method="block", border=self.theme["primary"], fontsize=self.theme["size-lg"], foreground=self.theme["active"], rounded=self.theme["rounded"]),

                        # Window name
                        # widget.WindowName(foreground=self.theme["foreground"]),
                        # widget.CurrentScreen(),


                        # Cmus
                        # widget.Cmus(),

                        # Graphs
                        widget.TextBox(text="net:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        widget.NetGraph(width=40, border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=1, type="linefill"),

                        widget.TextBox(text=" mem:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        widget.MemoryGraph(width=40, border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=5, type="linefill"),

                        widget.TextBox(text=" hdd:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        widget.HDDBusyGraph(width=40, border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=1, type="linefill"),

                        # widget.TextBox(text=" sdd:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        # widget.HDDGraph(border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=1, type="linefill", space_type='free'),

                        widget.TextBox(text=" cpu:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        widget.CPUGraph(width=40, border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=1, type="linefill"),

                        # widget.TextBox(text=" swap:", fontsize=self.theme["size-xsm"], padding=0, foreground=self.theme["foreground"]),
                        # widget.SwapGraph(border_color=self.theme["border-graph"], graph_color=self.theme["graph-color"], fill_color=self.theme["graph-color"], border_width=1, line_width=1, margin_x=0, margin_y=0, samples=50, frequency=1, type="linefill"),

                        # #widget.Sep(foreground=self.theme["separator"], border_width=1),


                        # Mem
                        widget.Sep(foreground=self.theme["separator"]),
                        #widget.Sep(foreground=self.theme["panel-bottom"], padding=self.theme["separator-padding"]//2),
                        widget.Memory(foreground=self.theme["foreground"], update_interval=10),

                        # Wifi status
                        # widget.Wlan(interface="wlp2s0"),
                        #widget.Net(interface="wlp2s0", update_interval=10),
                        # widget.Sep(foreground=self.theme["separator"]),

                        # # Thermal
                        # widget.TextBox(text=" ", foreground=self.theme["foreground"]),
                        # #widget.Sep(foreground=self.theme["separator"], padding=self.theme["separator-padding"]),
                        # widget.ThermalSensor(fontsize=self.theme["size-sm"], foreground=self.theme["foreground"], update_interval=1, fmt='{MemUsed}M/{MemTotal}M'),

                        # Debug window
                        # widget.Moc(),
                        # widget.DF(partition='/home'),
                        # widget.DebugInfo(),
                        # widget.Notify(),
                        # widget.Systray(),
                        widget.Sep(foreground=self.theme["separator"], padding=self.theme["separator-padding"]),

                        # # Battery
                        # # widget.BatteryIcon(),
                        # widget.Battery(energy_now_file='charge_now', foreground=self.theme["foreground"]),
                        # widget.Sep(foreground=self.theme["separator"], padding=self.theme["separator-padding"]),

                        # # Volume
                        # widget.TextBox(text="volume:", foreground=self.theme["foreground"]),
                        # widget.Volume(foreground=self.theme["foreground"]),
                        # widget.Sep(foreground=self.theme["separator"], padding=self.theme["separator-padding"]),

                        # Bitcoin
                        #widget.BitcoinTicker(format="BTC: {sell}"),
                        # widget.Sep(foreground=self.theme["separator"]),

                        # # Pacman updates
                        # widget.TextBox(text="pacman:", foreground=self.theme["foreground"]),
                        # widget.Pacman(foreground=self.theme["alert"], unavailable=self.theme["foreground"]),
                        # widget.Sep(foreground=self.theme["panel-bottom"], padding=self.theme["separator-padding"]//2),

                        widget.Spacer(bar.STRETCH),

                        # Clock
                        widget.TextBox(text=" ", background=self.theme["panel-2nd"]),
                        widget.Clock(format="%I:%M:%S %p", foreground=self.theme["foreground-2nd"], background=self.theme["panel-2nd"]),
                        widget.TextBox(text=" ", background=self.theme["panel-2nd"]),

                    ],

                    size=self.theme["bottom-height"],
                    background=self.theme["panel-bottom"],

                ),
            ),
        ]
        return screens
Пример #8
0
screens = [
    Screen(top=bar.Bar(
        [
            widget.GroupBox(
                active="{{base05}}",
                inactive="{{base03}}",
                this_current_screen_border="{{base05}}",
                highlight_method="line",
                highlight_color=["{{base01}}", "{{base01}}"],
                center_aligned=True,
            ),
            widget.WindowName(),
            widget.Mpris2(
                name="spotify",
                objname="org.mpris.MediaPlayer2.spotify",
                display_metadata=["xesam:title", "xesam:artist"],
                scroll_chars=None,
                stop_pause_text="",
                **widget_defaults,
            ),
            SEPARATOR,
            widget.TextBox(text="墳"),
            widget.Volume(),
            SEPARATOR,
            widget.Battery(
                format=" {percent:2.0%}",
                low_foreground="{{base08}}",
            ),
            SEPARATOR,
            widget.Wlan(
                foreground="{{base06}}",
                interface="wlan0",
Пример #9
0
        visible_on_warn=False,
        partition='/home',
        foreground=colorsc[4]
        ),
    widget.Systray( # [17] --> System tray
        background=colorsc[3],
        icon_size=10,
        ),
    widget.Sep( # [18] --> Seperator
        size_percent=50,
        foreground=colorsc[4]
        ),
    widget.Mpris2( # [19] --> Spotify player (I hope)
        background=colorsc[2],
        objname='org.mpris.MediaPlayer2.spotify',
        display_metadata=['xesam:title', 'xesam:artist'],
        foreground=colorsc[0],
        scroll_wait_intervals=10,
        ),
    widget.TextBox( # [20] --> Monitor setup
        text=' ',
        mouse_callbacks={
            'Button1': monitor_manager
            },
        background=colorsc[3],
        foreground=colorsc[0],
        ),
]

def text_before_wid(txt, bg=0, fg=4, fs=10, p=3):
    return widget.TextBox(
Пример #10
0
        widget.Sep(linewidth=2, size_percent=100, padding=12),
        widget.Prompt(),
        widget.TaskList(),
        widget.Pacman(),
        widget.Systray(),
        widget.Sep(**soft_sep),
        widget.Clock(format='%Y-%m-%d %a %H:%M:%S'),
        # widget.Battery(format='{char} {percent:2.0%}'),
    ],
    30)

primary_bottom = bar.Bar(
    [
        widget.Net(interface="enp5s0"),
        widget.Spacer(),
        widget.Mpris2(name='audacious',
                      objname='org.mpris.MediaPlayer2.audacious'),
        widget.Memory(fmt='{MemUsed}/{MemTotal}MB'),
        widget.DF(visible_on_warn=False),
        widget.Sep(**soft_sep),
        widget.Volume(),
        widget.Sep(**soft_sep),
        # This widget may crash qtile if a thermal sensor not found
        # widget.ThermalSensor(),
        widget.Sep(**soft_sep),
        widget.Memory(),
    ],
    30)

secondary_top = bar.Bar([
    widget.CurrentLayoutIcon(
        scale=0.5,
Пример #11
0
     foreground=color['clockForeground'],
     background=color['clockBackground'],
     padding=20,
     format="%a, %b %d [ %I:%M %P ]",
     mouse_callbacks={'Button1': lambda qtile: qtile.cmd_spawn(
         MY_BROWSER + ' https://calendar.google.com/calendar')}
 ),
 widget.Spacer(
     length=bar.STRETCH,
 ),
 ### Music ###
 widget.Mpris2(
     foreground=color['musicForeground'],
     fontsize=10,
     name='spotify',
     display_metadata=['xesam:title', 'xesam:artist'],
     objname="org.mpris.MediaPlayer2.spotify",
     scroll_chars=None,
     stop_pause_text='',
 ),
 widget.Mpris2(
     foreground=color['musicForeground'],
     fontsize=10,
     name='audacious',
     objname='org.mpris.MediaPlayer2.audacious',
     display_metadata=['xesam:title', 'xesam:artist'],
     scroll_chars=None,
     stop_pause_text='',
 ),
 ### CPU ###
 widget.TextBox(font=ICON_FONT,fontsize=40,text="",padding=0,foreground=color['cpuBackground']),
Пример #12
0
         foreground = colors[8],
         padding=-5,
         fontsize=37,
         ),
 widget.TextBox(
         text="♫",
         padding = 2,
         foreground=colors[0],
         background=colors[8],
         fontsize=14
         ),
 widget.Mpris2(
     name='spotify',
     objname="org.mpris.MediaPlayer2.spotify",
     display_metadata=['xesam:title', 'xesam:artist'],
     scroll_chars=None,
     stop_pause_text='',
     font='System Font',
     background = colors[8],
     foreground = colors[7],
         ),
 widget.Sep(
         linewidth = 0,
         padding = 2,
         foreground = colors[8],
         background = colors[8]
         ),
 widget.TextBox(
         text='',
         background = colors[8],
         foreground = colors[7],
         padding=-5,
Пример #13
0
def init_wid_list_top():
    wid_list_top = [
        #### Shortcuts ####
        widget.TextBox(
            font='Font Awesome 5 Free',
            fontsize=15,
            foreground=colors[7],
            text="",
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(
                    'rofi -theme "~/.config/rofi/launcher.rasi" -show drun')
            },
            fontshadow=colors[3]),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       foreground=colors[7],
                       text="",
                       mouse_callbacks={'Button1': wsearx},
                       fontshadow=colors[3]),
        widget.TextBox(
            font='Font Awesome 5 Free',
            fontsize=15,
            foreground=colors[7],
            text="",
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn(term)},
            fontshadow=colors[3]),
        widget.TextBox(
            font='Font Awesome 5 Free',
            fontsize=15,
            foreground=colors[7],
            text="",
            mouse_callbacks={'Button1': lambda: qtile.cmd_spawn('nautilus')},
            fontshadow=colors[3]),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       foreground=colors[7],
                       text="",
                       mouse_callbacks={
                           'Button1':
                           lambda: qtile.cmd_spawn('/opt/bin/genwal')
                       },
                       fontshadow=colors[3]),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       foreground=colors[7],
                       text="",
                       mouse_callbacks={
                           'Button1':
                           lambda: qtile.cmd_spawn('/opt/bin/shortc')
                       },
                       fontshadow=colors[3]),
        widget.TextBox(foreground=colors[1], text="◢", fontsize=45,
                       padding=-2),
        #### Groups ####
        widget.GroupBox(font='Font Awesome 5 Free',
                        fontsize=15,
                        disable_drag=True,
                        hide_unused=False,
                        fontshadow=colors[0],
                        margin_y=1,
                        padding_x=5,
                        borderwidth=0,
                        active=colors[7],
                        inactive=colors[1],
                        rounded=False,
                        highlight_method="text",
                        this_current_screen_border=colors[0],
                        this_screen_border=colors[3],
                        other_current_screen_border=colors[0],
                        other_screen_border=colors[0],
                        foreground=colors[2],
                        background=colors[1]),
        #### Notification ####
        widget.Prompt(prompt=prompt,
                      foreground=colors[0],
                      background=colors[1]),
        widget.TextBox(background=colors[0],
                       foreground=colors[1],
                       text="◤",
                       fontsize=45,
                       padding=-2),
        #### Window Name ####
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       foreground=colors[7],
                       fontshadow=colors[4],
                       text=""),
        widget.WindowName(foreground=colors[7],
                          background=colors[0],
                          padding=5,
                          format='{name}',
                          empty_group_string='QARSlp',
                          max_chars=45),
        widget.Notify(default_timeout=15,
                      foreground_urgent=colors[7],
                      foreground=colors[7],
                      background=colors[0]),
        #### Spacer ####
        widget.Spacer(length=bar.STRETCH,
                      background=colors[0],
                      foreground=colors[0]),
        #### Spotify ####
        widget.TextBox(text="◢",
                       background=colors[0],
                       foreground=colors[6],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       text="",
                       padding=5,
                       foreground=colors[0],
                       background=colors[6],
                       fontshadow=colors[7],
                       mouse_callbacks={'Button1': ncsp}),
        widget.Mpris2(name='ncspot',
                      objname='org.mpris.MediaPlayer2.ncspot',
                      scroll_chars=25,
                      background=colors[6],
                      foreground=colors[0],
                      stop_pause_text='',
                      display_metadata=['xesam:artist', 'xesam:title'],
                      scroll_interval=0.5,
                      scroll_wait_intervals=1000),
        #### Layouts ####
        widget.TextBox(text="◢",
                       background=colors[6],
                       foreground=colors[2],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       background=colors[2],
                       foreground=colors[0],
                       fontshadow=colors[7],
                       text=""),
        widget.CurrentLayout(background=colors[2], foreground=colors[0]),
        #### Pomodoro ####
        widget.TextBox(text='◢',
                       background=colors[2],
                       foreground=colors[5],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       background=colors[5],
                       foreground=colors[0],
                       text="",
                       fontshadow=colors[7]),
        widget.Pomodoro(background=colors[5],
                        foreground=colors[0],
                        color_active=colors[0],
                        color_break=colors[2],
                        color_inactive=colors[0],
                        length_pomodori=50,
                        length_short_break=5,
                        length_long_break=15,
                        num_pomodori=3,
                        prefix_break='Break',
                        prefix_inactive='start',
                        prefix_long_break='Long Break',
                        prefix_paused=''),
        #### Updates ####
        widget.TextBox(text='◢',
                       background=colors[5],
                       foreground=colors[3],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(
            font='Font Awesome 5 Free',
            fontsize=15,
            background=colors[3],
            foreground=colors[0],
            fontshadow=colors[7],
            text=" ",
        ),
        widget.CheckUpdates(
            update_interval=1800,
            distro='Arch_checkupdates',
            foreground=colors[0],
            mouse_callbacks={
                'Button1':
                lambda: qtile.cmd_spawn(term + ' -e sudo pacman -Syu')
            },
            display_format="{updates} updates",
            background=colors[3],
            colour_have_updates=colors[0],
            colour_no_updates=colors[0]),
        #### Khal Calendar ####
        #widget.KhalCalendar(lookahead=15, remindertime=60, foreground=colors[0], background=colors[7]),
        #### Sound Control ####
        widget.TextBox(text='◢',
                       background=colors[3],
                       foreground=colors[7],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(font='Font Awesome 5 Free',
                       text=" ",
                       foreground=colors[0],
                       background=colors[7],
                       padding=0,
                       fontsize=15,
                       mouse_callbacks={
                           'Button1': lambda: qtile.cmd_spawn('pavucontrol')
                       },
                       fontshadow=colors[3]),
        widget.Volume(channel='Master',
                      background=colors[7],
                      foreground=colors[0],
                      fontshadow=colors[7]),
        #### Date Clock Session Control ####
        widget.TextBox(text='◢',
                       background=colors[7],
                       foreground=colors[0],
                       padding=-2,
                       fontsize=45),
        widget.TextBox(font='Font Awesome 5 Free',
                       padding=1,
                       text="",
                       fontsize=15,
                       foreground=colors[7],
                       background=colors[0],
                       fontshadow=colors[3]),
        widget.Clock(foreground=colors[7],
                     background=colors[0],
                     format="%b %a %d -> %H:%M",
                     update_interval=1),
        #### Lock, Logout, Poweroff ####
        widget.TextBox(font='Font Awesome 5 Free',
                       fontsize=15,
                       foreground=colors[7],
                       text="",
                       mouse_callbacks={'Button1': wsess},
                       fontshadow=colors[3]),
    ]
    return wid_list_top
Пример #14
0
                    padding=0,
                    **FONT_PARAMS,
                ),

                #RIGHT SIDE
                #widget.Prompt(), #qtile spawn
                widget.Sep(
                    linewidth=0,
                    padding=400,
                    #foreground = colors[2],
                    #background = colors[0]
                ),
                widget.Mpris2(
                    name='spotify',
                    objname='org.mpris.MediaPlayer2.spotify',
                    display_metadata=['xesam:title', 'xesam:artist'],
                    scroll_chars=None,
                    stop_pause_text='',
                    **FONT_PARAMS,
                ),
                widget.Spacer(length=10),
                widget.CPUGraph(
                    border_color=COLS["yellow_1"],
                    graph_color=COLS["yellow_1"],
                    border_width=1,
                    line_width=1,
                    type="line",
                    width=50,
                    **FONT_PARAMS,
                ),
                widget.Spacer(length=5),
                widget.MemoryGraph(
Пример #15
0
def make_screen(systray=False):
    """Defined as a function so that I can duplicate this on other monitors"""
    def _separator():
        # return widget.Sep(linewidth=2, foreground=COLS["dark_3"])
        return widget.Sep(linewidth=2,
                          foreground=WAL_COLS['special']['foreground'])

    blocks = [
        # Marker for the start of the groups to give a nice bg: ◢■■■■■■■◤
        widget.TextBox(font="Arial",
                       foreground=WAL_COLS['special']['foreground'],
                       text="◢",
                       fontsize=66,
                       padding=-20),
        widget.GroupBox(
            other_current_screen_border=WAL_COLS['colors']['color5'],
            this_current_screen_border=WAL_COLS['colors']
            ['color4'],  #COLS["blue_0"],
            # this_current_screen_border=COLS["deus_2"],
            other_screen_border=WAL_COLS['colors']
            ['color5'],  #COLS["orange_0"],
            this_screen_border=WAL_COLS['colors']['color4'],  #COLS["blue_0"],
            # this_screen_border=COLS["deus_2"],
            highlight_color=WAL_COLS['colors']['color4'],  #COLS["blue_0"],
            # highlight_color=COLS["deus_2"],
            urgent_border=WAL_COLS['colors']['color3'],  #COLS["red_1"],
            background=WAL_COLS['special']['foreground'],  #COLS["dark_4"],
            # background=COLS["deus_3"],
            highlight_method="line",
            inactive=WAL_COLS['colors']['color2'],  #,COLS["dark_2"],
            active=WAL_COLS['colors']['color1'],  #COLS["light_2"],
            disable_drag=True,
            borderwidth=2,
            font=FONT_PARAMS['font'],
            fontsize=FONT_PARAMS['fontsize'] + 10,
            foreground=FONT_PARAMS['foreground']),
        # Marker for the end of the groups to give a nice bg: ◢■■■■■■■◤
        widget.TextBox(
            font="Arial",
            foreground=WAL_COLS['special']['foreground'],
            # font="Arial", foreground=COLS["deus_3"],
            text="◤ ",
            fontsize=66,
            padding=-20),
        # Show the title for the focused window
        widget.WindowName(**FONT_PARAMS),
        # Allow for quick command execution
        widget.Prompt(
            cursor_color=WAL_COLS['special']['cursor'],
            # ignore_dups_history=True,
            bell_style="visual",
            prompt="λ : ",
            **FONT_PARAMS),
        widget.Mpris2(name='spotify',
                      objname="org.mpris.MediaPlayer2.spotify",
                      display_metadata=['xesam:title', 'xesam:artist'],
                      scroll_chars=None,
                      stop_pause_text='',
                      **FONT_PARAMS),
        _separator(),
        # Resource usage graphs
        widget.Wallpaper(
            directory=os.path.expanduser('~/.config/qtile/wallpaper/'),
            label=' ',
            wallpaper_command=['wal', '-i'],
            **FONT_PARAMS),
        widget.CPUGraph(border_color=WAL_COLS['colors']['color1'],
                        graph_color=WAL_COLS['colors']['color1'],
                        border_width=1,
                        line_width=1,
                        type="line",
                        width=50,
                        **FONT_PARAMS),
        widget.MemoryGraph(border_color=WAL_COLS['colors']['color2'],
                           graph_color=WAL_COLS['colors']['color2'],
                           border_width=1,
                           line_width=1,
                           type="line",
                           width=50,
                           **FONT_PARAMS),
        widget.NetGraph(border_color=WAL_COLS['colors']['color3'],
                        graph_color=WAL_COLS['colors']['color3'],
                        border_width=1,
                        line_width=1,
                        type="line",
                        width=50,
                        **FONT_PARAMS),
        # IP information
        # ShellScript(
        #     fname="ipadr.sh",
        #     update_interval=10,
        #     markup=True,
        #     padding=1,
        #     **FONT_PARAMS
        # ),
        # # Available apt upgrades
        # ShellScript(
        #     fname="aptupgrades.sh",
        #     update_interval=600,
        #     markup=True,
        #     padding=1,
        #     **FONT_PARAMS
        # ),
        # Current battery level
        widget.TextBox("", **FONT_PARAMS),
        widget.CheckUpdates(
            distro="Arch_checkupdates",
            display_format="{updates}",
            colour_no_updates=WAL_COLS['special']['foreground'],
            colour_have_updates=WAL_COLS['colors']['color4'],
            **FONT_PARAMS),
        # Wifi strength
        # ShellScript(
        #     fname="wifi-signal.sh",
        #     update_interval=60,
        #     markup=True,
        #     padding=1,
        #     **FONT_PARAMS
        # ),
        # Volume % : scroll mouse wheel to change volume
        widget.TextBox("蓼", **FONT_PARAMS),
        widget.Volume(**FONT_PARAMS),
        widget.TextBox("", **FONT_PARAMS),
        widget.Backlight(
            format="{percent:2.0%}",
            backlight_name="intel_backlight",
            brightness_file='/sys/class/backlight/intel_backlight/brightness',
            max_brightness_file=
            "/sys/class/backlight/intel_backlight/max_brightness",
            change_command="brightnessctl -set {0}%",
            **FONT_PARAMS),
        widget.TextBox("直", **FONT_PARAMS),
        widget.Wlan(interface='wlp2s0',
                    update_interval='10',
                    format="{percent:2.0%}",
                    **FONT_PARAMS),
        # widget.TextBox("", **FONT_PARAMS),
        widget.Battery(charge_char="",
                       full_char="",
                       empty_char="",
                       unkown_char="",
                       discharge_char="",
                       format="{char}",
                       show_short_text=False,
                       **FONT_PARAMS),
        widget.Battery(charge_char="",
                       full_char="",
                       empty_char="",
                       unkown_char="",
                       discharge_char="",
                       format="{percent:2.0%}",
                       show_short_text=False,
                       **FONT_PARAMS),
        _separator(),
        # Current time
        widget.Clock(format="%m/%d/%Y %I:%M %p %a", **FONT_PARAMS),
        # # Keyboard layout
        # widget.KeyboardLayout(
        #     configured_keyboards=['us', 'gb'],
        #     **FONT_PARAMS
        # ),
        # Visual indicator of the current layout for this workspace.
        widget.CurrentLayoutIcon(
            custom_icon_paths=[os.path.expanduser("~/.config/qtile/icons")],
            **FONT_PARAMS),
    ]
    # Section "Device"
    # Identifier  "0x72"
    # Driver      "intel"
    # Option      "Backlight"  "intel_backlight"
    # EndSection
    # 1e2
    if systray:
        # Add in the systray and additional separator
        blocks.insert(-1, widget.Systray())
        blocks.insert(-1, _separator())

    # return Screen(top=bar.Bar(blocks, 25, background=COLS["deus_1"]))
    return Screen(top=bar.Bar(
        blocks, 25, background=WAL_COLS['special']['background'], opacity=.8))
Пример #16
0
from libqtile import bar, widget

soft_sep = {
    'linewidth': 2,
    'size_percent': 70,
    'foreground': '393939',
    'padding': 7
}

icon_theme_path = '/usr/share/icons/AwOkenWhite/clear/24x24/status/'
main_bar = bar.Bar([
    widget.GroupBox(),
    widget.Mpris2(background='253253',
                  name='spotify',
                  stop_pause_text='▶',
                  scroll_chars=None,
                  display_metadata=['xesam:title', 'xesam:artist'],
                  objname="org.mpris.MediaPlayer2.spotify"),
    widget.Sep(linewidth=2, size_percent=100, padding=12),
    widget.Prompt(),
    widget.Volume(theme_path=icon_theme_path),
    widget.WindowName(),
    widget.Systray(),
    widget.Sep(**soft_sep),
    widget.BatteryIcon(theme_path=icon_theme_path),
    widget.Battery(foreground='247052',
                   low_percentage=0.20,
                   low_foreground='fa5e5b',
                   update_delay=10,
                   format='{percent:.0%} {hour:d}:{min:02d} '
                   '{watt:.2}W'),
Пример #17
0
                                 lambda: self.start_scroll(_id))
            else:
                self.stop_scroll()

    def stop_scroll(self):
        if self.is_scrolling:
            self.scroll_id += 1
            self.is_scrolling = False


def log(content):
    open('mpris.log', 'a').write(str(content) + '\n')


# initializing the class with the import function
widget.Mpris2()


class Mpris2(widget.mpris2widget.Mpris2, ScrollText):

    defaults = [('play_char', ''), ('pause_char', ''),
                ('format', '{status_char}  <b>{title}</b> - {artist}'),
                ('txt_inactive', ''), ('scrolling_enabled', True),
                ('fetch_song_buffer_delay', 0.12)]

    def __init__(self, **config):
        widget.mpris2widget.Mpris2.__init__(self, **config)
        ScrollText.__init__(self, **config)
        self.add_defaults(Mpris2.defaults)
        self.interface = None
        self.add_callbacks({
Пример #18
0
)
extension_defaults = widget_defaults.copy()

top = bar.Bar(
    [
        widget.Spacer(length=960 - 54, foreground=FG),
        widget.Wttr(format="%t %c",
                    location={"Partille": "Partille"},
                    font="Ubuntu Nerd Font",
                    foreground=FG),
        widget.Sep(size_percent=50, foreground=FG),
        widget.Mpris2(
            name='spotifyd',
            objname="org.mpris.MediaPlayer2.spotifyd",
            display_metadata=['xesam:title', 'xesam:artist'],
            scroll_chars=30,
            stop_pause_text='asd',
            foreground=FG,
            # **widget_defaults
        ),
        widget.Clock(
            font="Ubuntu Nerd Font", format='%H:%M %a %d/%m', foreground=FG),
        # widget.Spacer(),
    ],
    24,
    opacity=0.8,
    name="bar",
    background=BG,
)

screens = [Screen(top=top)]