mirror of
				https://git.davidovski.xyz/dot.git
				synced 2024-08-15 00:43:28 +00:00 
			
		
		
		
	Add better laptop support
This commit is contained in:
		
							parent
							
								
									1e137b842f
								
							
						
					
					
						commit
						51292e49bb
					
				
					 14 changed files with 30 additions and 25 deletions
				
			
		
							
								
								
									
										4
									
								
								scripts/battery_level
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								scripts/battery_level
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #!/bin/sh | ||||
| full=$(cat /sys/class/power_supply/BAT0/charge_now)  | ||||
| now=$(cat /sys/class/power_supply/BAT0/charge_full) | ||||
| echo $full / $now  \* 100 | bc -l | ||||
|  | @ -1,3 +1,3 @@ | |||
| #!/bin/sh | ||||
| file=$(fzf $@) | ||||
| file="$(fzf $@)" | ||||
| xdg-open $file & | ||||
|  |  | |||
|  | @ -20,21 +20,19 @@ tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if | |||
| 
 | ||||
| screens = [ | ||||
| 	(0, 0, 1920, 1080), | ||||
| 	(0, 1080, 1920, 1080), | ||||
| 	(1920, 1080, 2560, 1440), | ||||
| ] | ||||
| 
 | ||||
| #TODO find this with xrandr | ||||
| 
 | ||||
| target = screens[2] | ||||
| target = screens[0] | ||||
| 
 | ||||
| #Physical offset of the selected screen | ||||
| offsetx = target[0] | ||||
| offsety = target[1] | ||||
| 
 | ||||
| #Size of the full screen areas | ||||
| sh = 1080+ 1440 | ||||
| sw = 1920 + 2560 | ||||
| sh = 1080 | ||||
| sw = 1920 | ||||
| #TODO calculate using list of screens | ||||
| 
 | ||||
| #Aspect ratio of the tablet, to avoid weird scaling problems | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue