diff --git a/os/arch/lightdm/themes/vnought/Makefile b/os/arch/lightdm/themes/vnought/Makefile new file mode 100644 index 00000000..0b44720d --- /dev/null +++ b/os/arch/lightdm/themes/vnought/Makefile @@ -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)" + diff --git a/os/arch/lightdm/themes/vnought/css/master.css b/os/arch/lightdm/themes/vnought/css/master.css new file mode 100644 index 00000000..aab5bd4b --- /dev/null +++ b/os/arch/lightdm/themes/vnought/css/master.css @@ -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; +} diff --git a/os/arch/lightdm/themes/vnought/index.html b/os/arch/lightdm/themes/vnought/index.html new file mode 100644 index 00000000..9857da8a --- /dev/null +++ b/os/arch/lightdm/themes/vnought/index.html @@ -0,0 +1,29 @@ + + + + + + + +
+
+
+ +
+ +
+ Something went wrong +
+
+ +
+ +
+
+ + + + + diff --git a/os/arch/lightdm/themes/vnought/index.theme b/os/arch/lightdm/themes/vnought/index.theme new file mode 100644 index 00000000..c838e61a --- /dev/null +++ b/os/arch/lightdm/themes/vnought/index.theme @@ -0,0 +1,6 @@ +[theme] +name=Awe +description=Awe Greeter +engine=lightdm-webkit-greeter +url=index.html +session=bspwm diff --git a/os/arch/lightdm/themes/vnought/js/main.js b/os/arch/lightdm/themes/vnought/js/main.js new file mode 100644 index 00000000..ad665097 --- /dev/null +++ b/os/arch/lightdm/themes/vnought/js/main.js @@ -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 = "" + text + ""; + } + text = text + "
"; + 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); +} diff --git a/os/arch/lightdm/themes/vnought/power_button.png b/os/arch/lightdm/themes/vnought/power_button.png new file mode 100644 index 00000000..3e0378a5 Binary files /dev/null and b/os/arch/lightdm/themes/vnought/power_button.png differ diff --git a/os/arch/lightdm/themes/vnought/wallpaper.png b/os/arch/lightdm/themes/vnought/wallpaper.png new file mode 100644 index 00000000..3f0a301a Binary files /dev/null and b/os/arch/lightdm/themes/vnought/wallpaper.png differ