Browse Source
			
			
			
			
				
		In this commit module `xutil` is added which will contain utility functions relatd to xorg (e.g. xinput, xrandr and ...). modules and classes inside xutil are wrappers around those binaries.pull/2/head
				 1 changed files with 10 additions and 0 deletions
			
			
		@ -0,0 +1,10 @@ | 
				
			|||
import subprocess | 
				
			|||
 | 
				
			|||
ENCODING = 'utf-8' | 
				
			|||
 | 
				
			|||
def get_list_short(): | 
				
			|||
    """Returns string output of the `xinput --list --short` command encoded as | 
				
			|||
    UTF-8""" | 
				
			|||
    completed = subprocess.run( | 
				
			|||
        ['xinput', '--list', '--short'], capture_output=True) | 
				
			|||
    return completed.stdout.decode(ENCODING) | 
				
			|||
					Loading…
					
					
				
		Reference in new issue