Laptop config changes
This commit is contained in:
		
							parent
							
								
									2e81ad001f
								
							
						
					
					
						commit
						705a2aaaa7
					
				
					 6 changed files with 878 additions and 421 deletions
				
			
		| 
						 | 
				
			
			@ -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
											
										
									
								
							
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue