mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-10-31 07:56:36 +00:00 
			
		
		
		
	Add userspace reboot option to menuquit
This commit is contained in:
		
							parent
							
								
									6e31a94da3
								
							
						
					
					
						commit
						9a79a5453b
					
				
					 1 changed files with 26 additions and 23 deletions
				
			
		|  | @ -1,28 +1,31 @@ | ||||||
| #!/bin/bash | #!/bin/bash | ||||||
| 
 | 
 | ||||||
| action="$(printf 'Quit WM\nLock session\nLogout\nLock TTYs\nPoweroff\nReboot\nNothing' | menuprompt -c --app wofi -p "Select Action" -- -O default)" | action="$(printf 'Quit WM\nLock session\nLogout\nLock TTYs\nPoweroff\nReboot\nUserspace Reboot\nNothing' | menuprompt -c --app wofi -p "Select Action" -- -O default)" | ||||||
| 
 | 
 | ||||||
| case "$action" in | case "$action" in | ||||||
|     "Quit WM") | "Quit WM") | ||||||
|   hyprctl dispatch exit "" |   hyprctl dispatch exit "" | ||||||
|   ;; |   ;; | ||||||
|     "Lock session") | "Lock session") | ||||||
|   loginctl lock-session |   loginctl lock-session | ||||||
|   ;; |   ;; | ||||||
|     "Logout") | "Logout") | ||||||
|   loginctl terminate-user "$USER" |   loginctl terminate-user "$USER" | ||||||
|   ;; |   ;; | ||||||
|     "Lock TTYs") | "Lock TTYs") | ||||||
|   physlock |   physlock | ||||||
|   ;; |   ;; | ||||||
|     "Poweroff") | "Poweroff") | ||||||
|   systemctl poweroff |   systemctl poweroff | ||||||
|   ;; |   ;; | ||||||
|     "Reboot") | "Reboot") | ||||||
|   systemctl reboot |   systemctl reboot | ||||||
|   ;; |   ;; | ||||||
|     "Nothing") ;& | "Userspace Reboot") | ||||||
|     *) |   systemctl soft-reboot | ||||||
|  |   ;; | ||||||
|  | "Nothing") ;& | ||||||
|  | *) | ||||||
|   exit 1 |   exit 1 | ||||||
|   ;; |   ;; | ||||||
| esac | esac | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue