Laptop config changes

This commit is contained in:
Kevin Alberts 2020-10-14 18:57:20 +02:00
parent 2e81ad001f
commit 705a2aaaa7
Signed by: Kurocon
GPG key ID: BCD496FEBA0C6BC1
6 changed files with 878 additions and 421 deletions

View file

@ -1,19 +1,25 @@
import re
import subprocess
import traceback
from time import sleep
import notify2
import six
from dbus import DBusException
from libqtile import widget
from libqtile.window import Internal
from libqtile.bar import Bar
from notify2 import Notification, URGENCY_NORMAL
from libqtile.log_utils import logger
notify2.init("QTileWM")
BUTTON_LEFT = 1
BUTTON_MIDDLE = 2
BUTTON_RIGHT = 3
BUTTON_UP = 4
BUTTON_DOWN = 5
BUTTON_MUTE = 1
BUTTON_SCROLL_UP = 4
BUTTON_SCROLL_DOWN = 5
@ -92,7 +98,11 @@ def notify(title, content, urgency=URGENCY_NORMAL, timeout=5000, image=None):
notification.set_timeout(timeout)
notification.set_urgency(urgency)
return notification.show()
try:
return notification.show()
except DBusException as e:
logger.warning("Showing notification failed: {}".format(e))
logger.warning(traceback.format_exc())
def spawn_popup(qtile, x, y, text):

File diff suppressed because it is too large Load diff