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)
)
评论列表
文章目录