notification.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:garden.notification 作者: kivy-garden 项目源码 文件源码
def _hide_x11_window(self):
        try:
            # Ubuntu's Unity for some reason ignores this if there are
            # multiple windows stacked to a single icon on taskbar.
            # Unity probably calls the same thing to stack the running
            # programs to a single icon, which makes this command worthless.
            x11_command = [
                'xprop', '-name', '{}'.format(self.title), '-f',
                '_NET_WM_STATE', '32a', '-set', '_NET_WM_STATE',
                '_NET_WM_STATE_SKIP_TASKBAR'
            ]
            check_output(x11_command)
        except Exception as e:
            tb = traceback.format_exc()
            Logger.error(
                'Notification: An error occured in {}\n'
                '{}'.format(self.title, tb)
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号