os/arch/lightdm: add vnought theme
This commit is contained in:
		
							parent
							
								
									9ad12f877b
								
							
						
					
					
						commit
						b0a0a9b8d1
					
				
							
								
								
									
										8
									
								
								os/arch/lightdm/themes/vnought/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								os/arch/lightdm/themes/vnought/Makefile
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEST=/usr/share/lightdm-webkit/themes/vnought
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install: $(DEST)
 | 
				
			||||||
 | 
						[ -d "$(DEST)" ] && sudo rm -rf "$(DEST)"
 | 
				
			||||||
 | 
						sudo cp -r . "$(DEST)"
 | 
				
			||||||
 | 
						sudo chown root:root -R "$(DEST)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										62
									
								
								os/arch/lightdm/themes/vnought/css/master.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								os/arch/lightdm/themes/vnought/css/master.css
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,62 @@
 | 
				
			||||||
 | 
					html { background: #22252c url(../wallpaper.png) center center; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					html, body {
 | 
				
			||||||
 | 
					  width: 100%; height: 100%;
 | 
				
			||||||
 | 
					  margin: 0; padding: 0;
 | 
				
			||||||
 | 
					  overflow: hidden;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					body {
 | 
				
			||||||
 | 
					  color: #afbfbf;
 | 
				
			||||||
 | 
					  font-size: 24px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					input { display: block; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.container {
 | 
				
			||||||
 | 
					  width: 400px;
 | 
				
			||||||
 | 
					  height: 100%;
 | 
				
			||||||
 | 
					  margin: 0 auto;
 | 
				
			||||||
 | 
					  vertical-align: middle;
 | 
				
			||||||
 | 
					  display: -webkit-flex;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  -webkit-flex-direction: column;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.login {
 | 
				
			||||||
 | 
					  position: absolute;
 | 
				
			||||||
 | 
					  top: 45%; left: 50%;
 | 
				
			||||||
 | 
					  margin-left: -200px;
 | 
				
			||||||
 | 
					  width: 400px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.info {
 | 
				
			||||||
 | 
					  position: absolute;
 | 
				
			||||||
 | 
					  bottom: 5%; left: 50%;
 | 
				
			||||||
 | 
					  margin-left: -200px;
 | 
				
			||||||
 | 
					  width: 400px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.login { height: 50%; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					input {
 | 
				
			||||||
 | 
					  width: 100%;
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					  font-size: 36px;
 | 
				
			||||||
 | 
					  border: none;
 | 
				
			||||||
 | 
					  background: rgba(34, 37, 44, 0.25);
 | 
				
			||||||
 | 
					  padding: 6px 6px 2px;
 | 
				
			||||||
 | 
					  margin: 0;
 | 
				
			||||||
 | 
					  margin-left: -6px;
 | 
				
			||||||
 | 
					  outline: none;
 | 
				
			||||||
 | 
					  color: #dfdfdf;
 | 
				
			||||||
 | 
					  border-radius: 4px;
 | 
				
			||||||
 | 
					  border-bottom: 2px solid #3f3f3f;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.messageBox {
 | 
				
			||||||
 | 
					  text-align: center;
 | 
				
			||||||
 | 
					  visibility: hidden;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										29
									
								
								os/arch/lightdm/themes/vnought/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								os/arch/lightdm/themes/vnought/index.html
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,29 @@
 | 
				
			||||||
 | 
					<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 | 
				
			||||||
 | 
					<html>
 | 
				
			||||||
 | 
					  <head>
 | 
				
			||||||
 | 
					    <link rel="stylesheet" href="css/master.css" type="text/css" />
 | 
				
			||||||
 | 
					  </head>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  <body>
 | 
				
			||||||
 | 
					    <div class="container">
 | 
				
			||||||
 | 
					      <div class="login">
 | 
				
			||||||
 | 
					        <form action="javascript: handle_input()">
 | 
				
			||||||
 | 
					          <input id="entry" placeholder="Username" />
 | 
				
			||||||
 | 
					        </form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <div class="messageBox" id="messages">
 | 
				
			||||||
 | 
					          Something went wrong
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <div class="info">
 | 
				
			||||||
 | 
					        <img onclick="javascript:lightdm.shutdown();" src="power_button.png" />
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <script src="js/main.js"></script>
 | 
				
			||||||
 | 
					    <script>
 | 
				
			||||||
 | 
					      start_authentication();
 | 
				
			||||||
 | 
					    </script>
 | 
				
			||||||
 | 
					  </body>
 | 
				
			||||||
 | 
					</html>
 | 
				
			||||||
							
								
								
									
										6
									
								
								os/arch/lightdm/themes/vnought/index.theme
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								os/arch/lightdm/themes/vnought/index.theme
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,6 @@
 | 
				
			||||||
 | 
					[theme]
 | 
				
			||||||
 | 
					name=Awe
 | 
				
			||||||
 | 
					description=Awe Greeter
 | 
				
			||||||
 | 
					engine=lightdm-webkit-greeter
 | 
				
			||||||
 | 
					url=index.html
 | 
				
			||||||
 | 
					session=bspwm
 | 
				
			||||||
							
								
								
									
										81
									
								
								os/arch/lightdm/themes/vnought/js/main.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								os/arch/lightdm/themes/vnought/js/main.js
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,81 @@
 | 
				
			||||||
 | 
					/*********************************************************************/
 | 
				
			||||||
 | 
					/*                Callbacks for lightdm-webkit-greeter               */
 | 
				
			||||||
 | 
					/*********************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * show_prompt callback.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function show_prompt(text, type) {
 | 
				
			||||||
 | 
					    // type is either "text" or "password"
 | 
				
			||||||
 | 
					    // prompt = document.getElementById("prompt");
 | 
				
			||||||
 | 
					    // prompt.innerHTML = text;
 | 
				
			||||||
 | 
					    entry = document.getElementById("entry");
 | 
				
			||||||
 | 
					    entry.value = "";    // clear entry
 | 
				
			||||||
 | 
					    entry.type = type;
 | 
				
			||||||
 | 
					    entry.placeholder = text;
 | 
				
			||||||
 | 
					    entry.focus();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * show_message callback.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function show_message(text, type) {
 | 
				
			||||||
 | 
					    if (text.length == 0)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    messages = document.getElementById("messages");
 | 
				
			||||||
 | 
					    messages.style.visibility = "visible";
 | 
				
			||||||
 | 
					    // type is either "info" or "error"
 | 
				
			||||||
 | 
					    if (type == "error") {
 | 
				
			||||||
 | 
					        text = "<font color=\"red\">" + text + "</font>";
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    text = text + "<br>";
 | 
				
			||||||
 | 
					    messages.innerHTML = messages.innerHTML + text;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * authentication_complete callback.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function authentication_complete() {
 | 
				
			||||||
 | 
					    if (lightdm.is_authenticated) {
 | 
				
			||||||
 | 
					        lightdm.start_session_sync(); // Start default session
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        show_message("Authentication Failed", "error");
 | 
				
			||||||
 | 
					        setTimeout(start_authentication, 3000);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * autologin_timer_expired callback.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function autologin_timer_expired(username) {
 | 
				
			||||||
 | 
					    /* Stub.  Does nothing. */
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*********************************************************************/
 | 
				
			||||||
 | 
					/*                Functions local to this greeter                    */
 | 
				
			||||||
 | 
					/*********************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * clear_messages
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function clear_messages() {
 | 
				
			||||||
 | 
					    messages = document.getElementById("messages");
 | 
				
			||||||
 | 
					    messages.innerHTML = "";
 | 
				
			||||||
 | 
					    messages.style.visibility = "hidden";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Kickoff the authentication process
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function start_authentication() {
 | 
				
			||||||
 | 
					    clear_messages();
 | 
				
			||||||
 | 
					    lightdm.start_authentication();   // start with null userid, have pam prompt for userid.
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * handle the input from the entry field.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					function handle_input() {
 | 
				
			||||||
 | 
					    entry = document.getElementById("entry");
 | 
				
			||||||
 | 
					    lightdm.respond(entry.value);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								os/arch/lightdm/themes/vnought/power_button.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								os/arch/lightdm/themes/vnought/power_button.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								os/arch/lightdm/themes/vnought/wallpaper.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								os/arch/lightdm/themes/vnought/wallpaper.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 272 KiB  | 
		Loading…
	
		Reference in a new issue