Add dpms button to lockscreen
This commit is contained in:
		
							parent
							
								
									497ca48ada
								
							
						
					
					
						commit
						57d9f9a72e
					
				
					 2 changed files with 28 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
import QtQuick
 | 
			
		||||
import QtQuick.Controls.Basic
 | 
			
		||||
import Quickshell.Io
 | 
			
		||||
 | 
			
		||||
Item {
 | 
			
		||||
	required property AuthContext context
 | 
			
		||||
| 
						 | 
				
			
			@ -101,4 +102,30 @@ Item {
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	Button {
 | 
			
		||||
		anchors {
 | 
			
		||||
			horizontalCenter: parent.horizontalCenter
 | 
			
		||||
			bottom: parent.bottom
 | 
			
		||||
			bottomMargin: 20
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		contentItem: Text {
 | 
			
		||||
			text: "Turn off Monitors"
 | 
			
		||||
			color: "#aaeeffff"
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		onClicked: dpms.running = true
 | 
			
		||||
 | 
			
		||||
		background: Rectangle {
 | 
			
		||||
			color: "#20ffffff"
 | 
			
		||||
			border.color: "#30ffffff"
 | 
			
		||||
			radius: height / 2
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Process {
 | 
			
		||||
			id: dpms
 | 
			
		||||
			command: [ "hyprctl", "dispatch", "dpms" ]
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue