【问题标题】:Awesome-wm notifications to bottom-rightAwesome-wm 通知到右下角
【发布时间】:2021-11-26 20:24:52
【问题描述】:

我正在寻找一种将所有桌面通知从右上角移动到右下角的方法,但我只能通过谷歌搜索找到此页面 https://awesomewm.org/apidoc/core_components/naughty.notification.html,它似乎从程序员的角度解释了如何做到这一点而不是从 WM 配置的角度来看。 有什么指点吗?

【问题讨论】:

    标签: notifications position awesome-wm


    【解决方案1】:

    这似乎从程序员的角度而不是从 WM 配置的角度解释了如何做到这一点。有什么指点吗?

    配置实际上是“真实”代码。所以文档的配置(或任何模块/扩展)。

    至于问题本身。使用很棒的 git-master(这是您提供的链接)的最佳方法是修改规则(rc.lua 的 git-master 版本的ruled.notification 部分)并设置position 属性。

    -- Correct way for awesome >= v4.4/git-master.
    --
    -- IF YOU HAVE A RECENT RC.LUA THIS SECTION IS ALREADY THERE,
    -- ELSE, ADD IT.
    --
    -- WARNING: WILL **NOT** WORK IN < v4.4/git-master
    ruled.notification.connect_signal('request::rules', function()
        -- All notifications will match this rule.
        ruled.notification.append_rule {
            rule       = { },
            properties = {
                screen           = awful.screen.preferred,
                implicit_timeout = 5,
                position         = "bottom_right", -- <<<<< ADD THIS
            }
        }
    end)
    
    

    如果您使用的是 3.4 到 4.3 版本,设置它的唯一方法是使用“通知预设”

    -- OLD WAY, DEPRECATED in git-master/v4.4+
    for _, preset in pairs(naughty.config.presets) do
        preset.position = "bottom_right"
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多