コード例 #1
0
    def init_floating_layout(self) -> Floating:
        """Creates and returns the floating layout used."""

        self.floating_layout = Floating(
            auto_float_typesR=[
                # Run the utility `xprop`
                # to see the wm class and name of an X client
                {
                    "wmclass": "confirm"
                },
                {
                    "wmclass": "dialog"
                },
                {
                    "wmclass": "download"
                },
                {
                    "wmclass": "error"
                },
                {
                    "wmclass": "file_progress"
                },
                {
                    "wmclass": "notification"
                },
                {
                    "wmclass": "notify"
                },
                {
                    "wmclass": "popup_menu"
                },
                {
                    "wmclass": "splash"
                },
                {
                    "wmclass": "toolbar"
                },
                {
                    "wmclass": "confirmreset"
                },  # gitk
                {
                    "wmclass": "makebranch"
                },  # gitk
                {
                    "wmclass": "maketag"
                },  # gitkm
                {
                    "wname": "branchdialog"
                },  # gitk
                {
                    "wname": "pinentry"
                },  # GPG key password entry
                {
                    "wmclass": "ssh-askpass"
                },  # ssh-askpass
            ],
            **self.theme_config.layouts["floating"],
        )

        return self.floating_layout
コード例 #2
0
    def init_layouts(self) -> list:
        """Creates and returns the layouts used."""

        if not self.layouts:
            self.layouts = [
                # Bsp(**self.theme_config.layouts["default"]),
                Columns(
                    **{
                        **self.theme_config.layouts["default"],
                        **self.theme_config.layouts["columns"],
                    }, ),
                Floating(**self.theme_config.layouts["floating"]),
                Max(**self.theme_config.layouts["default"]),
                # Matrix(**self.theme_config.layouts["default"]),
                MonadTall(**self.theme_config.layouts["default"]),
                # MonadWide(**self.theme_config.layouts["default"]),
                # RatioTile(**self.theme_config.layouts["default"]),
                Stack(**self.theme_config.layouts["default"]),
                Tile(**self.theme_config.layouts["default"]),
                # TreeTab(**self.theme_config.layouts["default"]),
                # VerticalTile(**self.theme_config.layouts["default"]),
                # Zoomy(**self.theme_config.layouts["default"]),
            ]

        return self.layouts
コード例 #3
0
floating_layout = Floating(
    border_focus=bar_colors[2],
    float_rules=[
        {
            "wmclass": "confirm"
        },
        {
            "wmclass": "dialog"
        },
        {
            "wmclass": "download"
        },
        {
            "wmclass": "error"
        },
        {
            "wmclass": "file_progress"
        },
        {
            "wmclass": "notification"
        },
        {
            "wmclass": "splash"
        },
        {
            "wmclass": "toolbar"
        },
        {
            "wmclass": "confirmreset"
        },  # gitk
        {
            "wmclass": "makebranch"
        },  # gitk
        {
            "wmclass": "maketag"
        },  # gitk
        {
            "wname": "branchdialog"
        },  # gitk
        {
            "wname": "pinentry"
        },  # GPG key password entry
        {
            "wmclass": "ssh-askpass"
        },  # ssh-askpass
        {
            "wmclass": "feh"
        },
        {
            "wmclass": "vlc"
        },
        {
            "wmclass": "Picture in picture"
        },
        {
            "wmclass": "FreeTube"
        },
        {
            "wmclass": "lutris"
        },
        {
            "wmclass": "gimp-2.10"
        },
        {
            "wmclass": "Gimp-2.10"
        },
        {
            "wmclass": "virt-manager"
        },
    ])
コード例 #4
0
    def __init__(self, theme_config: ThemeConfig) -> None:
        """Inits the attributes."""

        self.theme_config: ThemeConfig = theme_config
        self.layouts: list = []
        self.floating_layout: Floating = Floating()
コード例 #5
0
}

layouts = [
    MonadTall(
        **my_layout,
        name="Tall",
    ),
    MonadWide(**my_layout, name="wide"),
    Max(**my_layout, name="Full"),
]

floating_layout = Floating(**my_layout,
                           name="Float",
                           float_rules=[
                               *layout.Floating.default_float_rules,
                               Match(title='mpv'),
                               Match(title='gimp'),
                               Match(title='virt-manager'),
                               Match(title='mpv'),
                           ])


@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


groups = [