Exemplo n.º 1
0
    def init_rules(self):
        return [
            # Floating types
            Rule(Match(wm_type=[
                "confirm",
                "download",
                "notification",
                "toolbar",
                "splash",
                "dialog",
                "error",
                "file_progress",
                "confirmreset",
                "pinentry",
                "sshaskpass",
            ]),
                 float=True),

            # Floating classes
            Rule(Match(wm_class=[
                "Gcolor2", "Gcolor3", "balena-etcher-electron", "Virt-manager",
                "Dragon-drag-and-drop",
                re.compile("VirtualBox")
            ]),
                 float=True,
                 break_on_match=False),

            # Floating names
            Rule(Match(title=[]), float=True)
        ]
Exemplo n.º 2
0
 def init_rules(self):
     return [
         # Floating names
         Rule(
             Match(title=[
                 # "mpvfloat",
                 # "Create new database",
                 "Unlock Database - KeePassXC"
                 # "Sozi"
             ]),
             float=True),
         # Floating types
         Rule(Match(wm_type=[
             "confirm", "download", "notification", "toolbar", "splash",
             "dialog", "error", "file_progress", "confirmreset",
             "makebranch", "maketag", "branchdialog", "pinentry",
             "sshaskpass"
         ]),
              float=True),
         # # Floating classes
         # Rule(
         # 	Match(wm_class = [
         # 		"Xfce4-taskmanager",
         # 		"Gparted",
         # 		"Gsmartcontrol",
         # 		"Timeshift-gtk",
         # 		"Gufw.py",
         # 		"Bleachbit",
         # 		"Nitrogen",
         # 		"Lightdm-gtk-greeter-settings",
         # 		"Nm-connection-editor",
         # 		"Lxappearance",
         # 		"Pavucontrol",
         # 		"Volumeicon",
         # 		"hp-toolbox",
         # 		"System-config-printer.py",
         # 		"Arandr",
         # 		"qt5ct",
         # 		"Catfish",
         # 		# "Nemo",
         # 		"Thunar",
         # 		"Meld",
         # 		"Engrampa",
         # 		"File-roller",
         # 		"Simple-scan",
         # 		"Mousepad",
         # 		"Gnucash",
         # 		"Gcolor3",
         # 		"vlc",
         # 		"Gnome-multi-writer",
         # 		"balena-etcher-electron",
         # 		"Virt-manager",
         # 		re.compile("VirtualBox")
         # 	]),
         # 	float = True,
         # 	break_on_match = False
         # ),
     ]
Exemplo n.º 3
0
 def add_dgroup(self, group, start=False):
     self.groups_map[group.name] = group
     rules = [Rule(m, group=group.name) for m in group.matches]
     self.rules.extend(rules)
     if start:
         self.qtile.add_group(group.name, group.layout, group.layouts,
                              group.label)
Exemplo n.º 4
0
    def _setup_groups(self):
        for group in self.groups:
            self.add_dgroup(group, group.init)

            if group.spawn and not self.qtile.no_spawn:
                pid = self.qtile.cmd_spawn(group.spawn)
                self.add_rule(Rule(Match(net_wm_pid=[pid]), group.name))
Exemplo n.º 5
0
 def add_dgroup(self, group, start=False):
     self.groups_map[group.name] = group
     rule = Rule(group.matches, group=group.name)
     self.rules.append(rule)
     if start:
         self.qtile.add_group(group.name, group.layout, group.layouts,
                              group.label)
Exemplo n.º 6
0
def build_rules() -> List[Rule]:
    return [
        # Floating types
        Rule(
            Match(
                wm_type=[
                    "confirm",
                    "dialog",
                    "download",
                    "notification",
                    "toolbar",
                    "splash",
                    "dialog",
                    "error",
                    "file_progress",
                    "confirmreset",
                    "makebranch",
                    "maketag",
                    "branchdialog",
                    "pinentry",
                    "sshaskpass",
                ]
            ),
            float=True,
            break_on_match=False,
        ),
        # Floating classes
        Rule(
            Match(
                wm_class=[
                    "Nitrogen",
                    "Lightdm-gtk-greeter-settings",
                    "Pavucontrol",
                    "Volumeicon",
                    "Virt-manager",
                    "Gnome-calculator",
                    "Arandr",
                    "vlc",
                    "Gucharmap",
                    re.compile("VirtualBox"),
                ]
            ),
            float=True,
            break_on_match=False,
        ),
    ]
Exemplo n.º 7
0
def init_rules():
    return [
        # Floating types
        Rule(Match(wm_type=[
            "confirm", "download", "notification", "toolbar", "splash",
            "dialog", "error", "file_progress", "confirmreset", "makebranch",
            "maketag", "branchdialog", "pinentry", "sshaskpass"
        ]),
             float=True),

        # Floating classes
        Rule(Match(wm_class=[
            "Xfce4-taskmanager", "Gparted", "Nitrogen",
            "Lightdm-gtk-greeter-settings", "Nm-connection-editor",
            "Lxappearance", "Pavucontrol", "Arandr", "qt5ct", "Thunar",
            "Engrampa", "File-roller", "Simple-scan",
            re.compile("VirtualBox")
        ]),
             float=True,
             break_on_match=False)
    ]
Exemplo n.º 8
0
    def _setup_groups(self):
        for group in self.groups:
            self.add_dgroup(group, group.init)

            if group.spawn and not self.qtile.no_spawn:
                if isinstance(group.spawn, str):
                    spawns = [group.spawn]
                else:
                    spawns = group.spawn
                for spawn in spawns:
                    pid = self.qtile.cmd_spawn(spawn)
                    self.add_rule(Rule(Match(net_wm_pid=[pid]), group.name))
Exemplo n.º 9
0
    def cmd_add_rule(self, match_args, rule_args, min_priorty=False):
        """Add a dgroup rule, returns rule_id needed to remove it

        Parameters
        ==========
        match_args :
            config.Match arguments
        rule_args :
            config.Rule arguments
        min_priorty :
            If the rule is added with minimum priority (last) (default: False)
        """
        if not self.dgroups:
            logger.warning('No dgroups created')
            return

        match = Match(**match_args)
        rule = Rule([match], **rule_args)
        return self.dgroups.add_rule(rule, min_priorty)
Exemplo n.º 10
0
        top=top_bar,
        bottom=bottom_bar,
        left=bar.Gap(size=8),
        right=bar.Gap(size=8),
    ),
]

#####! ADDITIONAL VARIABLES !#####

dgroups_key_binder = None
dgroups_app_rules = [
    Rule(Match(wm_type=[
        "confirm",
        "download",
        "notification",
        "toolbar",
        "splash",
        "dialog",
        "error",
    ]),
         float=True),
    Rule(Match(wm_class=[
        "Pavucontrol",
        "Oomox",
    ]),
         float=True,
         break_on_match=False)
]
main = None  # WARNING: this is deprecated and will be removed soon
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
Exemplo n.º 11
0
    # Add more items or change values qtile.test_data is set
    keys.append(
        Key(["mod4"], "l", lazy.layout.right(), desc="Move focus to right"), )

    groups.extend([Group(i) for i in "6789"])

    layouts.append(layout.Max())

    screens = [
        Screen(top=bar.Bar([widget.CurrentLayout()], 32)),
    ]

    widget_defaults["background"] = "#ff0000"

    mouse.append(
        Drag(
            ["mod4"],
            "Button3",
            lazy.window.set_size_floating(),
            start=lazy.window.get_size(),
        ), )

    dropdowns.append(DropDown("dropdown2", script))

    dgroups_key_binder = simple_key_binder
    dgroups_app_rules = [Rule(Match(wm_class="test"), float=True)]
    floating_layout = layout.Floating()
    wmname = "TEST"

groups.append(ScratchPad("S", dropdowns))
Exemplo n.º 12
0
        # set the roster as master window and ratio 0.20
        layout_opts={
            "ratio": 0.20,
            "master_match": Match(role=['roster'])
        },
    ),
]

# dgroup rules that not belongs to any group
dgroups_app_rules = [
    # Everything i want to be float, but don't want to change group
    Rule(Match(
        title=['nested', 'gscreenshot'],
        wm_class=[
            'Guake.py', 'Exe', 'Onboard', 'Florence', 'Terminal', 'Gpaint',
            'Kolourpaint', 'Wrapper', 'Gcr-prompter', 'Ghost',
            re.compile('Gnome-keyring-prompt.*?')
        ],
    ),
         float=True,
         intrusive=True),

    # floating windows
    Rule(Match(wm_class=['Wine', 'Xephyr']), float=True),
]

# auto bind keys to dgroups mod+1 to 9
dgroups_key_binder = simple_key_binder(mod)

#   Layouts Config
# -------------------
Exemplo n.º 13
0
from libqtile.config import Match, Rule
from libqtile import hook

dgroups_app_rules = [
    Rule(Match(wm_type=[
        "confirm", "download", "notification", "toolbar", "splash", "dialog",
        "error", "file_progress", "confirmreset", "makebranch", "maketag",
        "branchdialog", "pinentry", "sshaskpass"
    ]),
         float=True),
    Rule(Match(
        wm_class=["lutris", "league of legends.exe", "leagueclientux.exe"]),
         float=True,
         break_on_match=True)
]


@hook.subscribe.client_new
def floating_dialogs(window):
    dialog = window.window.get_wm_type() == 'dialog'
    transient = window.window.get_wm_transient_for()
    if dialog or transient:
        window.floating = True
Exemplo n.º 14
0
    #     matches=[Match(wm_class=['Gajim.py'])],
    #     # set the roster as master window and ratio 0.20
    #     layout_opts={"ratio": 0.20, "master_match": Match(role=['roster'])},
    #     position=2, exclusive=True,
    #     ),
]

# dgroup rules that not belongs to any group
dgroups_app_rules = [
    # Everything i want to be float, but don't want to change group
    Rule(Match(
        title=['nested', 'gscreenshot'],
        wm_class=[
            'Guake.py', 'Exe', 'Onboard', 'Florence', 'Plugin-container',
            'Terminal', 'Gpaint', 'Kolourpaint', 'Wrapper', 'Gcr-prompter',
            'Ghost', 'feh', 'Gnuplot', 'Pinta',
            re.compile('Gnome-keyring-prompt.*?')
        ],
    ),
         float=True,
         intrusive=True),

    # floating windows
    Rule(
        Match(
            wm_class=['Synfigstudio', 'Wine', 'Xephyr', 'postal2-bin'],
            # title=[re.compile('[a-zA-Z]*? Steam'),
            #        re.compile('Steam - [a-zA-Z]*?')]
        ),
        float=True),
Exemplo n.º 15
0
         start=lazy.window.get_position()),
    Drag([win],
         "Button3",
         lazy.window.set_size_floating(),
         start=lazy.window.get_size()),
    Click([win], "Button2", lazy.window.bring_to_front())
]

dgroups_key_binder = None
# dgroups_app_rules = [
#    Rule(Match(title=["Welcome to PyCharm"]), float=True, break_on_match=False),
#    Rule(Match(wm_class=["jetbrains-idea"]), group="s", float=False, break_on_match=False),
#    Rule(Match(title=["Welcome to IntelliJ IDEA"]), group="s", float=True, break_on_match=False),
#    Rule(Match(title=["Welcome to WebStorm"]), float=True, break_on_match=False),
#    Rule(Match(title=["Welcome to CLion"]), float=True, break_on_match=False),
# ]
dgroups_app_rules = [
    Rule(Match(wm_class=["sun-awt-X11-XWindowPeer"]), float=True)
]

main = None
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(auto_float_types=[
    'notification', 'toolbar', 'splash', 'dialog', 'utility'
])
auto_fullscreen = True
focus_on_window_activation = "smart"
wmname = "LG3D"
Exemplo n.º 16
0
         lazy.window.set_position_floating(),
         start=lazy.window.get_position()),
    Drag("M-3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
    Click("M-2", lazy.window.bring_to_front())
]

# Windows Rule

dgroups_app_rules = [
    # Everything i want to be float, but don't want to change group
    Rule(Match(
        title=['nested', 'gscreenshot'],
        wm_class=[
            'Exe', 'Onboard', 'Florence', 'Plugin-container', 'Terminal',
            'Gpaint', 'Kolourpaint', 'Wrapper', 'Gcr-prompter', 'Ghost', 'feh',
            'Gnuplot', 'Pinta',
            re.compile('Gnome-keyring-prompt.*?')
        ],
    ),
         float=True,
         intrusive=True),

    # floating windows
    Rule(Match(wm_class=[
        'TeamViewer', 'Wine', 'Xephyr', 'postal2-bin', 'whatpulse', 'doublecmd'
    ],
               title=[
                   re.compile('[a-zA-Z]*? Steam'),
                   re.compile('Steam - [a-zA-Z]*?'), 'TeamViewer'
               ]),
         float=True),
Exemplo n.º 17
0
        ),
    ),
]

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

dgroups_key_binder = None
dgroups_app_rules = [Rule(Match(title=[webex_share]),
                          float=True
                          )]  # type: List
# main = None
follow_mouse_focus = False
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating(float_rules=[
    {'wmclass': 'confirm'},
    {'wmclass': 'dialog'},
    {'wmclass': 'download'},
    {'wmclass': 'error'},
    {'wmclass': 'file_progress'},
    {'wmclass': 'notification'},
    {'wmclass': 'splash'},
    {'wmclass': 'toolbar'},
    {'wmclass': 'confirmreset'},  # gitk
Exemplo n.º 18
0
         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())
]

dgroups_key_binder = None
dgroups_app_rules = [

    # intrusive windows
    Rule(
        Match(wm_class=['xfce4-notifyd']),
        intrusive=True,
        float=True,
    )
]

follow_mouse_focus = True
bring_front_click = True
cursor_warp = False
auto_fullscreen = True
focus_on_window_activation = 'urgent'

floating_layout = layout.Floating(
    border_width=0,
    float_rules=[
        # Run the utility of `xprop` to see the wm class and name of an X client.
        {
Exemplo n.º 19
0
 def add_dgroup(self, group, start=False):
     self.groupMap[group.name] = group
     rules = [Rule(m, group=group.name) for m in group.matches]
     self.rules.extend(rules)
     if start:
         self.qtile.addGroup(group.name)
Exemplo n.º 20
0
         "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())
]
follow_mouse_focus = False
bring_front_click = False

dgroups_key_binder = None
dgroups_app_rules = [
    # floating windows
    Rule(Match(wm_class=['Synfigstudio', 'Wine', 'Xephyr', 'postal2-bin']),
         float=True),
]
main = None
cursor_warp = False
auto_fullscreen = True
wmname = "LG3D"


# Autostart
@hook.subscribe.startup_once
def autostart():
    home = expanduser("~")
    subprocess.Popen([home + "/.config/qtile/autostart.sh"])


# xrandr --output DP2 --auto --right-of eDP1
Exemplo n.º 21
0
    ),
    Group(
        "gaming",
        persist=True,
        init=False,
        matches=[
            Match(wm_class=["LoLPatcherUx.exe", "LoLClient.exe", "Wine", "Steam"])
        ],
    ),
    Group("reference", persist=False, init=False, matches=[Match(wm_class=["Zeal"])]),
]

# dgroup rules that not belongs to any group
dgroups_app_rules = [
    # Everything i want to be float, but don't want to change group
    Rule(Match(title=["nested", "gscreenshot"]), float=True, intrusive=True),
    Rule(
        Match(
            wm_class=[
                "Plugin-container",
                "Gnome-commander",
                "Nautilus",
                "Krusader",
                re.compile(".*keyring.*"),
            ]
        ),
        float=True,
        intrusive=True,
    ),
    Rule(Match(wm_type="dialog"), float=True, intrusive=True),
    # floating windows