diff --git a/x11-misc/lightdm-webkit-greeter/Manifest b/x11-misc/lightdm-webkit-greeter/Manifest
new file mode 100644
index 0000000..dd9ce7c
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/Manifest
@@ -0,0 +1,20 @@
+AUX gentoo/README.md 1031 SHA256 fb74a33f0a93156fd1f1a4db1e10246514a023b86824a2b7be9b4378cc5114c6 SHA512 4f8cc11838274aba3edb59c57a4e7e736305a287e2f1cc7a3b2d8772c3e6e0c90b0882d0ab1567142647941bdb6441f5cb1cc244dbd666f7e646149451121ef8 WHIRLPOOL 336ec3eb7675edaa522c28f741be2655a8e363f2d46fa318657b4c2be02b0c3710595cf7c053e72c7b09d055807dac8af7d2a23f020662fcd8cac42a90616255
+AUX gentoo/bg.png 43919 SHA256 2a31523afedc9f30a2059cc413b9e97ce52d904411cd697c5dd235e76e00741d SHA512 3dba95723ab3b968c2cce32159cf1270870f81c5195cf003c4a502d627412ba6faf7cb5b5369053b09efeb05d23d5f569b66d8a0bf8e0ca31513ea7670e677ed WHIRLPOOL 1812c3560b26763f93be84fff9ff9c225df6e7a9d9586f0973ecf510fcaae480fdfe46fcdef4b86ad1c83a0a796fc45bfd1a16a52b9f6ede8e7a6888a2330ad1
+AUX gentoo/font/LucidaGrande.ttf 256356 SHA256 ee962f0062412bae8c358a598c18ea4aa8851595600ca5735500c2ecc7309db5 SHA512 62c7b628e147ca118f9f266bd4b333a27f977535395b82a17d85ef66553d61657c8463125e7fcae2020ea7b817e66e082f4c843c10de9c4d704c95af07bc747f WHIRLPOOL 9906f2c6c4143a0670bc7a34801d13b9b439c95b8a8ce86127545ed94a85daaf367e6b91ad0c99e72d44c7cd6965f001e0ccb2561cab57184bd7be0726c29b03
+AUX gentoo/font/LucidaGrandeBold.ttf 193212 SHA256 45d5353a7d0714907d72e26195beb1a14d68f9967f066a520c8d8551e74dbdfb SHA512 b327d20b89c81de3427914c1783ca2c10d6f6ea42f5f1fea5b12ee5f9aad40e9785cc542c2fe19147ff761a18cab0dd1e99384b16989a2011546151e89465c6e WHIRLPOOL b51ff24e1a98722cac90997444e84a567eb97c6621249eaf797dd48575431f7907f1cf1f4c96733e9557fdcacb9412b08927a681a5a3eb97ab5d741c012cfa98
+AUX gentoo/gentoologo.png 7190 SHA256 3cf26c8d3369918661280ff21048e476140c9434ada61f6c892d28288badfe22 SHA512 661b3695f95e2779ec6bc29a3e0ced4b03775d3a0544041b1d3ad47661cd9e36355da7391b6008cc40f0b41d19f24bc6d30efc6c38519a23c5a52d5519e34fe2 WHIRLPOOL 77db0449b40dff41f1023cdea758f9483df7465455f6862463d322bd63219f29d78a710c7d7e519572ce879b9e1f24ad66be3db124da14b9c7ba5dfb6c11ed07
+AUX gentoo/img/avatar.svg 3477 SHA256 6e8aa481c3e4bb16b88ffe767fad9d952d903cc2b6e7cee2c74bf6fe0ab4bf3b SHA512 58eacc7fb81c82ac9985cf8a532c0db4df93e565cd13314c5ce96b1b8aa41204a69407f8f3bf9d42cc90dd21e41116e9cbda0ef7e72a64bac38f9a6a3bdab7ab WHIRLPOOL 2307172d4a21c6ea0196a2d940d6909bd010470be12ed5450b5f3dc447528a291831ee6d9a594e75e841897f43ec1a16a310ca15091fca2f3eb2be9572bc8961
+AUX gentoo/img/restart.svg 4986 SHA256 27b429b25ddd4bd60f3ca1cd83ad9f534365895cb3e569bcd315bbad6fd9c32a SHA512 71849f37f1f7286a176a15c4ec4b1ad75246db9cd1b408b3c9cdb60e307459bacb138dbae06063af3d870d8f5483899f5ac5b148b9a54fb08e709a7d1ef05618 WHIRLPOOL 5ec2bff5d99a7311fa8b801a7af350ba218b67ead7e5e1a056446eef051ab099871db7f4f41082788ccf682e4273b9182a05dd8875ab39b756926b8bfa015506
+AUX gentoo/img/shutdown.svg 6405 SHA256 b194d1f8e825efd2336db799fcb8157625cf74ce1667863de63fe62ccdd2a49e SHA512 8cdf0f46a94831cf6d8ac1a80aca7dd705d7023398571ea32e490e3bc1c8311a23d858f8311b427c71d8a49ce3524b0b1397e0cb187ff68507741bdfecaf5237 WHIRLPOOL 7e1c5697071503d21befd39f58845eb9e5301794ff05f49994d359cb0c98728c6c6845a13ae2223b50a8f81f4b4778c3e51321e0eb1d2bfc0fbaaa4a79e80be2
+AUX gentoo/img/sleep.svg 4737 SHA256 a09f138fff63357dbcfe1a8252414759e0b5ca2d5d34762d0b69c8154e2d4952 SHA512 71eea502f2b93257b96eac5ea97f5ed2c6159527ae40652cf395465750f3418b782660346080a94fc78bd95a12d474445a6546001aea760f8f648e5ec22feab1 WHIRLPOOL c209d66d845c7e3383bd3dbc072ed57131de6797c3a67e7a0e1eef45fccd3191e5799185a7b269d9bf96df40aae1acba73c585b53bb41d9da9cf613eedf6520b
+AUX gentoo/index.html 2251 SHA256 4633cca1665a6180d3e78ab896a18284c45300b1280b5ad3e35c6984edb1b05f SHA512 5d03fca84c9ceaaf12e2b976e18de5d35fcbc426d20f4100105923769035e588c04904e2f010f9dca2b854d0150d45ea65d2ccbbea047b589956172eb5405629 WHIRLPOOL 3104284d5234a6d58fec8c8dab2893ba784d177ec85aab2398c6bbf1f20995aeab21c29fc980e113f83b28c5d1b2a3e7251f260af42403b5b7ee662c64940f27
+AUX gentoo/index.theme 112 SHA256 a7d94846517a38d0669784a872452cf111fdd124e3740e1acc10c1a3927fd2cd SHA512 86fd85fd448bf646a15c21781093e974eb0b99e75778d3640b6f0c922c362f4ac5a95ac326ed45fbfcdccd2fdd7b5d4cdecaf0209cec94005f091062be2e6b15 WHIRLPOOL 940196e993f17245e363872801c623626548659fedc32887c7898ba14b2c896192256e48ac484ef9e5cde49d36b520ccdc53ca4a48f97c8cc1349e0586d0d1ba
+AUX gentoo/low_contrast_linen.png 22749 SHA256 4acf439c9ae114b6707b0b59036ced496e25670143d6c774bc7315dcff1a8c4e SHA512 aea519bbada8a8a05e3027632df259f1513817d684b8ef8df0f9f80ffa6abb1e15e5c86bda4d1f396f553d9b77e4b014a91b91761cfa1a2767e79ed821c71ba7 WHIRLPOOL 49ee655da8a032c65e82aa3fa43fe1558b09f7ed8f5048ef432a60d22557f50f6e721c0ba9a2f5195043789ad41dc3dffbcba8a8796f8d171c92a6e7d6c29495
+AUX gentoo/mock.js 4467 SHA256 417f2c236012badde24f5029d7af1cb71ea2b883562dbe1ba1bf2be871209853 SHA512 989aaf994df1f41b453b8efa3d910e0e19939571cb6f809e9b6eb3cf890a09ae22594c5b6feea503289f82b285cb4efbf5b805d663e7218c1a70ce8d765479a2 WHIRLPOOL 6aaddf8b3b99bf8c2bd391b64936ee5bd2ea9e53f34d28b00e6aa9e402af0c927ecc7b1493fb73471274df188920f9e8dae3048de02f91936a6afb81484fa7d2
+AUX gentoo/script.js 6464 SHA256 b855fc4b6c0a896949151aed557d1e143c612a80754b02d848373b584567bb38 SHA512 9e2c1f217e897ecf7a52ae68a5c5d37fb81e982bce6b2a442d18c4419d4b738f5c4ed40183cf5f741a2bfc82378637b5f9c135326d532ce12cd9a51ceef7151f WHIRLPOOL bdc0335f786a1a25f99b58fcb26502ea42ecbc5cc3f00be898b9d15eef57be68b674bcc39a5a4182dcca5c0a408ef2a479e446d54e936eded5ec383fa2147bc8
+AUX gentoo/style.css 2538 SHA256 0bb639fd9c5934f54e9ae26d754e51524957eaffd0ebe799fe5d27b80641ced8 SHA512 eb264ca8c988e1a511bfa28564eb4537df66c9aa28f62e16a52bafce288c8df54851f325ebdf72bc628ad3d94dc5808b72465a2f5a5f44cb73dfd3b758088944 WHIRLPOOL 18eec5603845271007afa9367acf3e8ce714fafd07ec072b9c05a52a31c97873efa80b382571dcbe1d0e5c6902778b53d08d1e4c652dea864f390467d0326897
+DIST lightdm-webkit-greeter-0.1.2.tar.gz 317550 SHA256 53d6d41127b7c4cccc239d5d98edce868f18f95c76766cd1681ef58d1678c120 SHA512 641c67f74e58cac2b68038c47692cc07091d8e842a448f6e548fff1893a3193cd6b7ef799e49e7acfe0fb3c524bee6ea73dfbfca7e3c2c834e6a215bc94df71d WHIRLPOOL 5bb543e26ea622c4d2673dd62b0aec58209178be8c826f9685fefb1756c417e0517ea6e0e374e18bafb7d695c9de3ec4cb0845323101283d9024d226a984d51b
+DIST lightdm-webkit-greeter-1.0.tar.gz 340350 SHA256 b9eb5f9c84d10bfb26a6ad0fbeabbab8fc69845452b870b96fb423334f2d4e2d SHA512 b51ed476019d6ee4fc83501aacda165d2d2b19d4bdec2b4857066d67458311835bd248ab10d6b9450a712428dd4f916bd8a85822694368d2dd86641aa6296706 WHIRLPOOL b092aecf78ff7b09ac69e7448a44c5a1e694bbfe70f31d076c4353e727531ad3110ef9097d445a6c603287d3da471386c710ff32856512577ae844dfff5370b6
+EBUILD lightdm-webkit-greeter-0.1.2-r1.ebuild 1522 SHA256 989ee6d56d52231d58f52e0e3ba0a93eaf0bd0969fd40fc3e9eb12674d0dc6ad SHA512 c77b614ad69a1fc4273dbda2c884792bbb3d8e8dee7bcc5cd10a50edfef15bddd8c49a3cc68f40be04382aa4bd7af7340fb0db4308b69c1abd30be2120a634bd WHIRLPOOL e2f770dd6e0223f70920d6a07d355b89948a4401b558fa239cd6bd9cc976867da7c5578ab1f6cbfd7bc560d4cf78ed10fea3d5a127516cfa0e40cd16cf89ca5b
+EBUILD lightdm-webkit-greeter-0.1.2.ebuild 1236 SHA256 6514d657f4b385efe58fe178142d4b4859bb8cf8929dbb556e418554929fffc6 SHA512 c613d5fa3c1fa47441e69ca508826cc8a5afb0aa751f633a1be2896599e76cb42d009ed00afc9e8845163a3555601badb831ae741c96e8350bc2c6945a4a9ac3 WHIRLPOOL ff6011ef4f1cafd9b5839a43fcff15cef2eaf146c2d3cbc56409ef8ffd1ee16380ff149067277496804fd7525934685080a984a0864438c55986e4922eac1830
+EBUILD lightdm-webkit-greeter-1.0.ebuild 1236 SHA256 6514d657f4b385efe58fe178142d4b4859bb8cf8929dbb556e418554929fffc6 SHA512 c613d5fa3c1fa47441e69ca508826cc8a5afb0aa751f633a1be2896599e76cb42d009ed00afc9e8845163a3555601badb831ae741c96e8350bc2c6945a4a9ac3 WHIRLPOOL ff6011ef4f1cafd9b5839a43fcff15cef2eaf146c2d3cbc56409ef8ffd1ee16380ff149067277496804fd7525934685080a984a0864438c55986e4922eac1830
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/README.md b/x11-misc/lightdm-webkit-greeter/files/gentoo/README.md
new file mode 100644
index 0000000..1e5e86c
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/README.md
@@ -0,0 +1,34 @@
+LightDM Webkit Arch Theme
+===========================
+
+This is a LightDM webkit greeter theme for Archlinux. Based on [LightDM-Webkit-MacOSX-Theme](http://github.com/Wattos/LightDM-Webkit-MacOSX-Theme)
+
+Installation Instructions
+-------------------------
+You will need lightdm as your login manager and the lightdm-webkit-greeter from AUR. You need to make the webkit greeter the default greeter. This is done by editing the lightdm configuration under:
+
+
+/etc/lightdm/lightdm.conf
+
+
+and changing the greeter-session value to lightdm-webkit-greeter. lightdm.conf should have:
+
+
+[SeatDefaults]
+greeter-session=lightdm-webkit-greeter
+allow-guest=false
+
+
+The second step is to install the actual theme. This is done by copying the files of this repository into the following location:
+
+
+/usr/share/lightdm-webkit/themes/arch
+
+
+Finally, change the /etc/lightdm/lightdm-webkit-greeter.conf file to contain the following line:
+
+
+webkit-theme=arch
+
+
+Now you can reboot and enjoy the new theme.
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/bg.png b/x11-misc/lightdm-webkit-greeter/files/gentoo/bg.png
new file mode 100644
index 0000000..584a4f9
Binary files /dev/null and b/x11-misc/lightdm-webkit-greeter/files/gentoo/bg.png differ
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrande.ttf b/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrande.ttf
new file mode 100644
index 0000000..63c3d97
Binary files /dev/null and b/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrande.ttf differ
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrandeBold.ttf b/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrandeBold.ttf
new file mode 100644
index 0000000..6f67c86
Binary files /dev/null and b/x11-misc/lightdm-webkit-greeter/files/gentoo/font/LucidaGrandeBold.ttf differ
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/gentoologo.png b/x11-misc/lightdm-webkit-greeter/files/gentoo/gentoologo.png
new file mode 100644
index 0000000..8f9c76d
Binary files /dev/null and b/x11-misc/lightdm-webkit-greeter/files/gentoo/gentoologo.png differ
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/img/avatar.svg b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/avatar.svg
new file mode 100644
index 0000000..6841838
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/avatar.svg
@@ -0,0 +1,59 @@
+
+
+
+
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/img/restart.svg b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/restart.svg
new file mode 100644
index 0000000..f580c18
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/restart.svg
@@ -0,0 +1,142 @@
+
+
+
+
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/img/shutdown.svg b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/shutdown.svg
new file mode 100644
index 0000000..e768c52
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/shutdown.svg
@@ -0,0 +1,198 @@
+
+
+
+
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/img/sleep.svg b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/sleep.svg
new file mode 100644
index 0000000..4e5ca87
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/img/sleep.svg
@@ -0,0 +1,134 @@
+
+
+
+
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/index.html b/x11-misc/lightdm-webkit-greeter/files/gentoo/index.html
new file mode 100644
index 0000000..8b66fca
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/index.theme b/x11-misc/lightdm-webkit-greeter/files/gentoo/index.theme
new file mode 100644
index 0000000..976cca5
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/index.theme
@@ -0,0 +1,6 @@
+[theme]
+name=arch-session
+description=Archlinux logon
+engine=lightdm-webkit-greeter
+url=index.html
+session=lxqt
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/low_contrast_linen.png b/x11-misc/lightdm-webkit-greeter/files/gentoo/low_contrast_linen.png
new file mode 100644
index 0000000..17b491e
Binary files /dev/null and b/x11-misc/lightdm-webkit-greeter/files/gentoo/low_contrast_linen.png differ
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/mock.js b/x11-misc/lightdm-webkit-greeter/files/gentoo/mock.js
new file mode 100644
index 0000000..e6de687
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/mock.js
@@ -0,0 +1,134 @@
+// mock lighdm for testing
+if (typeof lightdm == 'undefined') {
+ lightdm= {};
+ lightdm.hostname="test-host";
+ lightdm.languages= [{code: "en_US", name: "English(US)", territory: "USA"}, {code: "en_UK", name: "English(UK)", territory: "UK"}];
+ lightdm.default_language= lightdm.languages[0];
+ lightdm.layouts= [{name: "test", short_description: "test description", short_description:"really long epic description"}];
+ lightdm.default_layout= lightdm.layouts[0];
+ lightdm.layout= lightdm.layouts[0];
+ lightdm.sessions=[{key: "key1", name: "session 1", comment: "no comment"}, {key: "key2", name: "session 2", comment: "no comment"}];
+
+ lightdm.default_session=lightdm.sessions[0];
+ lightdm.authentication_user= null;
+ lightdm.is_authenticated= false;
+ lightdm.can_suspend= true;
+ lightdm.can_hibernate= true;
+ lightdm.can_restart= true;
+ lightdm.can_shutdown= true;
+
+ lightdm.users= [
+ { name: "clarkk", real_name:"Superman", display_name: "Clark Kent", image :"", language: "en_US", layout: null, session: null, logged_in: false },
+ { name: "brucew", real_name:"Batman", display_name: "Bruce Wayne", image :"/home/brokenImage.gif", language: "en_US", layout: null, session: null, logged_in: false},
+ { name: "peterp", real_name:"Spiderman", display_name: "Peter Parker", image :"", language: "en_US", layout: null, session: null, logged_in: true},
+ ]
+
+ lightdm.sessions= [
+ { name: "LXQt Desktop", key: "lxqt" },
+ { name: "KDE Plasma Desktop", key: "kdeplasma" },
+ ]
+ lightdm.default_session=lightdm.sessions[0];
+ lightdm.num_users= lightdm.users.length;
+ lightdm.timed_login_delay= 0; //set to a number higher than 0 for timed login simulation
+ lightdm.timed_login_user= lightdm.timed_login_delay > 0 ? lightdm.users[0] : null;
+
+ lightdm.get_string_property= function() {};
+ lightdm.get_integer_property= function() {};
+ lightdm.get_boolean_property= function() {};
+ lightdm.cancel_timed_login= function() {
+ _lightdm_mock_check_argument_length(arguments, 0);
+ lightdm._timed_login_cancelled= true;
+ };
+
+ lightdm.provide_secret= function(secret) {
+ if (typeof lightdm._username == 'undefined' || !lightdm._username) {
+ throw "must call start_authentication first"
+ }
+ _lightdm_mock_check_argument_length(arguments, 1);
+ var user= _lightdm_mock_get_user(lightdm.username);
+
+ if (!user && secret == lightdm._username) {
+ lightdm.is_authenticated= true;
+ lightdm.authentication_user= user;
+ } else {
+ lightdm.is_authenticated= false;
+ lightdm.authentication_user= null;
+ lightdm._username= null;
+ }
+ authentication_complete();
+ };
+
+ lightdm.start_authentication= function(username) {
+ _lightdm_mock_check_argument_length(arguments, 1);
+ if (lightdm._username) {
+ throw "Already authenticating!";
+ }
+ var user= _lightdm_mock_get_user(username);
+ if (!user) {
+ show_error(username + " is an invalid user");
+ }
+ show_prompt("Password: ");
+ lightdm._username= username;
+ };
+
+ lightdm.cancel_authentication= function() {
+ _lightdm_mock_check_argument_length(arguments, 0);
+ if (!lightdm._username) {
+ throw "we are not authenticating";
+ }
+ lightdm._username= null;
+ };
+
+ lightdm.suspend= function() {
+ alert("System Suspended. Bye Bye");
+ document.location.reload(true);
+ };
+
+ lightdm.hibernate= function() {
+ alert("System Hibernated. Bye Bye");
+ document.location.reload(true);
+ };
+
+ lightdm.restart= function() {
+ alert("System restart. Bye Bye");
+ document.location.reload(true);
+ };
+
+ lightdm.shutdown= function() {
+ alert("System Shutdown. Bye Bye");
+ document.location.reload(true);
+ };
+
+ lightdm.login= function(user, session) {
+ _lightdm_mock_check_argument_length(arguments, 2);
+ if (!lightdm.is_authenticated) {
+ throw "The system is not authenticated";
+ }
+ if (user !== lightdm.authentication_user) {
+ throw "this user is not authenticated";
+ }
+ alert("logged in successfully!!");
+ document.location.reload(true);
+ };
+
+ if (lightdm.timed_login_delay > 0) {
+ setTimeout(function() { if (!lightdm._timed_login_cancelled()) timed_login();}, lightdm.timed_login_delay);
+ }
+}
+
+function _lightdm_mock_check_argument_length(args, length) {
+ if (args.length != length) {
+ throw "incorrect number of arguments in function call";
+ }
+}
+
+function _lightdm_mock_get_user(username) {
+ var user= null;
+ for (var i= 0; i < lightdm.users.length; ++i) {
+ if (lightdm.users[i].name == username) {
+ user= lightdm.users[i];
+ break;
+ }
+ }
+ return user;
+}
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/script.js b/x11-misc/lightdm-webkit-greeter/files/gentoo/script.js
new file mode 100644
index 0000000..da101a5
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/script.js
@@ -0,0 +1,241 @@
+var time_remaining = 0;
+var selected_user = null;
+var valid_image = /.*\.(png|svg|jpg|jpeg|bmp)$/i;
+
+///////////////////////////////////////////////
+// CALLBACK API. Called by the webkit greeeter
+///////////////////////////////////////////////
+
+// called when the greeter asks to show a login prompt for a user
+function show_prompt(text) {
+ var password_container = document.querySelector("#password_container");
+ var password_entry = document.querySelector("#password_entry");
+
+ if (!isVisible(password_container)) {
+ var users = document.querySelectorAll(".user");
+ var user_node = document.querySelector("#"+selected_user);
+ var rect = user_node.getClientRects()[0];
+ var parentRect = user_node.parentElement.getClientRects()[0];
+ var center = parentRect.width/2;
+ var left = center - rect.width/2 - rect.left;
+ var i = 0;
+ if (left < 5 && left > -5) {
+ left = 0;
+ }
+ for (i = 0; i < users.length; i++) {
+ var node = users[i];
+ setVisible(node, node.id === selected_user);
+ node.style.left= left;
+ }
+
+ setVisible(password_container, true);
+ password_entry.placeholder= text.replace(":", "");
+ }
+ password_entry.value= "";
+ password_entry.focus();
+}
+
+// called when the greeter asks to show a message
+function show_message(text) {
+ var message = document.querySelector("#message_content");
+ message.innerHTML= text;
+ if (text) {
+ document.querySelector("#message").classList.remove("hidden");
+ } else {
+ document.querySelector("#message").classList.add("hidden");
+ }
+ message.classList.remove("error");
+}
+
+// called when the greeter asks to show an error
+function show_error(text) {
+ show_message(text);
+ var message = document.querySelector("#message_content");
+ message.classList.add("error");
+}
+
+// called when the greeter is finished the authentication request
+function authentication_complete() {
+ var container = document.querySelector("#session_container");
+ var children = container.querySelectorAll("input");
+ var i = 0;
+ var key = "";
+ for (i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (child.checked) {
+ key = child.value;
+ break;
+ }
+ }
+
+ if (lightdm.is_authenticated) {
+ if (key === "") {
+ lightdm.login(lightdm.authentication_user, lightdm.default_session);
+ } else {
+ lightdm.login(lightdm.authentication_user, key);
+ }
+ } else {
+ show_error("Authentication Failed");
+ start_authentication(selected_user);
+ }
+}
+
+// called when the greeter wants us to perform a timed login
+function timed_login(user) {
+ lightdm.login (lightdm.timed_login_user);
+ //setTimeout('throbber()', 1000);
+}
+
+//////////////////////////////
+// Implementation
+//////////////////////////////
+function start_authentication(username) {
+ lightdm.cancel_timed_login();
+ selected_user = username;
+ lightdm.start_authentication(username);
+}
+
+function provide_secret() {
+ show_message("Logging in...");
+ entry = document.querySelector('#password_entry');
+ lightdm.provide_secret(entry.value);
+}
+
+function initialize_sessions() {
+ var template = document.querySelector("#session_template");
+ var container = session_template.parentElement;
+ var i = 0;
+ container.removeChild(template);
+
+ for (i = 0; i < lightdm.sessions.length; i = i + 1) {
+ var session = lightdm.sessions[i];
+ var s = template.cloneNode(true);
+ s.id = "session_" + session.key;
+
+ var label = s.querySelector(".session_label");
+ var radio = s.querySelector("input");
+
+ console.log(s, session);
+ label.innerHTML = session.name;
+ radio.value = session.key;
+
+ if (session.key === lightdm.default_session) {
+ radio.checked = true;
+ }
+
+ container.appendChild(s);
+ }
+}
+
+function show_users() {
+ var users = document.querySelectorAll(".user");
+ var i = 0;
+ for (i= 0; i < users.length; i++) {
+ setVisible(users[i], true);
+ users[i].style.left = 0;
+ }
+ setVisible(document.querySelector("#password_container"), false);
+ selected_user = null;
+}
+
+function user_clicked(event) {
+ if (selected_user !== null) {
+ selected_user = null;
+ lightdm.cancel_authentication();
+ show_users();
+ } else {
+ selected_user = event.currentTarget.id;
+ start_authentication(event.currentTarget.id);
+ }
+ show_message("");
+ event.stopPropagation();
+ return false;
+}
+
+function setVisible(element, visible) {
+ if (visible) {
+ element.classList.remove("hidden");
+ } else {
+ element.classList.add("hidden");
+ }
+}
+
+function isVisible(element) {
+ return !element.classList.contains("hidden");
+}
+
+function update_time() {
+ var time = document.querySelector("#current_time");
+ var date = new Date();
+
+ var hh = date.getHours();
+ var mm = date.getMinutes();
+ var ss = date.getSeconds();
+ var suffix= "AM";
+ if (hh > 12) {
+ hh = hh - 12;
+ suffix = "PM";
+ }
+ if (hh < 10) { hh = "0"+hh; }
+ if (mm < 10) { mm = "0"+mm; }
+ if (ss < 10) { ss = "0"+ss; }
+ time.innerHTML = hh+":"+mm + " " + suffix;
+}
+
+//////////////////////////////////
+// Initialization
+//////////////////////////////////
+
+function initialize() {
+ show_message("");
+ initialize_users();
+ initialize_timer();
+ initialize_sessions();
+}
+
+function on_image_error(e) {
+ e.currentTarget.src = "img/avatar.svg";
+}
+
+function initialize_users() {
+ var template = document.querySelector("#user_template");
+ var parent = template.parentElement;
+ parent.removeChild(template);
+
+ for (i = 0; i < lightdm.users.length; i += 1) {
+ user = lightdm.users[i];
+ userNode = template.cloneNode(true);
+
+ var image = userNode.querySelectorAll(".user_image")[0];
+ var name = userNode.querySelectorAll(".user_name")[0];
+ name.innerHTML = user.display_name;
+
+ if (user.image) {
+ image.src = user.image;
+ image.onerror = on_image_error;
+ } else {
+ image.src = "img/avatar.svg";
+ }
+
+ userNode.id = user.name;
+ userNode.onclick = user_clicked;
+ parent.appendChild(userNode);
+ }
+ setTimeout(show_users, 400);
+}
+
+function initialize_timer() {
+ update_time();
+ setInterval(update_time, 1000);
+}
+
+function add_action(id, name, image, clickhandler, template, parent) {
+ action_node = template.cloneNode(true);
+ action_node.id = "action_" + id;
+ img_node = action_node.querySelectorAll(".action_image")[0];
+ label_node = action_node.querySelectorAll(".action_label")[0];
+ label_node.innerHTML = name;
+ img_node.src = image;
+ action_node.onclick = clickhandler;
+ parent.appendChild(action_node);
+}
diff --git a/x11-misc/lightdm-webkit-greeter/files/gentoo/style.css b/x11-misc/lightdm-webkit-greeter/files/gentoo/style.css
new file mode 100644
index 0000000..2893777
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/files/gentoo/style.css
@@ -0,0 +1,176 @@
+* {
+ font: normal 100% Cantarell;
+}
+
+body {
+ background: url('low_contrast_linen.png');
+ display: table;
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ color: #EFEFEF;
+
+ font-size: 10pt;
+ text-shadow: 1px 1px 3px black;
+}
+
+body, span, div, img {
+ -webkit-user-select: none;
+}
+
+input {
+ border: 1px solid white;
+ border-radius: 4px;
+ padding: 4px;
+ box-shadow: 0 0 1px 1px #222;
+
+ -webkit-transition: box-shadow 0.3s ease-in-out;
+}
+
+input:focus {
+ outline: none;
+ box-shadow: 0 0 1px 1px #222;
+ -webkit-transition: box-shadow 0.3s ease-in-out;
+}
+
+a {
+ text-decoration: none;
+}
+
+.smooth {
+ -webkit-transition: visibility 0s, opacity 0.3s, left 0.4s;
+}
+
+.hidden {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition-delay: 0.3s, 0s, 0s;
+}
+
+.center {
+ text-align: center;
+}
+
+.button {
+ cursor: pointer;
+}
+
+.header {
+ background-color: #333;
+ height: 55px;
+ border-bottom: 5px solid #A0A0F0;
+ box-shadow: 0 0 1px 1px #222;
+}
+
+.gentoologo {
+ float: left !important;
+ margin: 10px !important;
+ padding: 0 !important;
+ height: 40px !important;
+ width: 190px !important;
+ background: url('gentoologo.png') no-repeat;
+}
+
+.footer {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ height: 100px;
+ text-align: center;
+}
+
+.footer, .header {
+ width: 100%;
+}
+
+.time {
+ float: right;
+ line-height: 25px;
+ font-size: 11pt;
+ margin-right: 10px;
+ margin-top: 5px;
+}
+
+.login_content {
+ display: table-row;
+}
+
+.login_container {
+ display: table-cell;
+ vertical-align: middle;
+}
+
+#message {
+ display: table-row;
+ height: 80px;
+ -webkit-transition: visibility 0s, opacity 0.3s, height 0.3s;
+}
+
+#message.hidden {
+ height: 0px;
+}
+
+#message_content {
+ display: table-cell;
+ vertical-align: top;
+ text-align: center;
+}
+
+#message_content.error {
+ color: #F55;
+}
+
+.user {
+ display: inline-block;
+ margin-left: 20px;
+ margin-right: 20px;
+ margin-bottom: 20px;
+ position: relative;
+}
+
+.user:active {
+ opacity: 0.5;
+}
+
+.user_image_wrapper {
+ width: 80px;
+ height: 80px;
+
+ border-radius: 80px;
+ border: 5px solid #A0A0F0;
+ -webkit-transition: all 0.3s ease-in-out;
+}
+
+.user_image_wrapper:hover {
+ box-shadow: 0 0 5px 5px #A0A0F0;
+ -webkit-transition: all 0.2s ease-in-out;
+}
+
+.user_image {
+ width: 80px;
+ height: 80px;
+ border-radius: 60px;
+}
+
+.user_name {
+ display: block;
+ margin-top: 15px;
+}
+
+.action {
+ display: inline-block;
+ width: 80px;
+ margin-left: 40px;
+ margin-right: 40px;
+}
+
+.action_image {
+ height: 50px;
+ width: 50px;
+
+ margin-bottom: 5px;
+}
+
+.action_label {
+ color: #B2B2B2;
+}
diff --git a/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2-r1.ebuild b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2-r1.ebuild
new file mode 100644
index 0000000..af06596
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Webkit-based greeter for LightDM"
+HOMEPAGE="https://launchpad.net/${PN}"
+SRC_URI="${HOMEPAGE}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="branding"
+
+DEPEND="net-libs/webkit-gtk:2
+ x11-misc/lightdm
+ dev-libs/gobject-introspection
+ app-text/gnome-doc-utils
+ dev-util/intltool
+ "
+RDEPEND="${DEPEND}"
+
+src_prepare(){
+ # What is Ambiance? This should be a GTK+ 2.x theme, so we use Clearlooks here.
+ sed -i '/^theme-name=/s/Ambiance/Clearlooks/' data/lightdm-webkit-greeter.conf
+
+ # Theme 'default' does not exist...
+ sed -i '/^webkit-theme=/s/default/webkit/' data/lightdm-webkit-greeter.conf
+
+ # this is Ubuntu branding... Replace it with something useful. ;)
+ sed -i '/^background=/s|/usr/share/backgrounds/warty-final-ubuntu.png||' data/lightdm-webkit-greeter.conf
+ # Replace Ubuntu font with Dejavusans
+ sed -i '/^font-name=/s|Ubuntu 11|DejaVuSans 11|' data/lightdm-webkit-greeter.conf
+}
+
+src_compile(){
+ econf || die "econf failed"
+ emake DESTDIR="${D}" || die "emake failed"
+}
+
+src_install(){
+ emake DESTDIR="${D}" install
+ if use branding; then
+ insinto /usr/share/lightdm-webkit/themes
+ doins -r "${FILESDIR}/gentoo"
+ fi
+}
+
+pkg_postinst(){
+ elog "Hi! Thanks for using the Webkit greeter for LightDM."
+ elog "If you want to add your own themes, place them in:"
+ elog "/usr/share/lightdm-webkit/themes/"
+}
diff --git a/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2.ebuild b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2.ebuild
new file mode 100644
index 0000000..b545b63
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-0.1.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Webkit-based greeter for LightDM"
+HOMEPAGE="https://launchpad.net/${PN}"
+SRC_URI="${HOMEPAGE}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/webkit-gtk:2
+ x11-misc/lightdm
+ dev-libs/gobject-introspection
+ app-text/gnome-doc-utils
+ dev-util/intltool
+ "
+RDEPEND="${DEPEND}"
+
+src_prepare(){
+ # What is Ambiance? This should be a GTK+ 2.x theme, so we use Clearlooks here.
+ sed -i '/^theme-name=/s/Ambiance/Clearlooks/' data/lightdm-webkit-greeter.conf
+
+ # Theme 'default' does not exist...
+ sed -i '/^webkit-theme=/s/default/webkit/' data/lightdm-webkit-greeter.conf
+
+ # this is Ubuntu branding... Replace it with something useful. ;)
+ sed -i '/^background=/s|/usr/share/backgrounds/warty-final-ubuntu.png||' data/lightdm-webkit-greeter.conf
+ # Replace Ubuntu font with Dejavusans
+ sed -i '/^font-name=/s|Ubuntu 11|DejaVuSans 11|' data/lightdm-webkit-greeter.conf
+}
+
+src_compile(){
+ econf || die "econf failed"
+ emake DESTDIR="${D}" || die "emake failed"
+}
+
+src_install(){
+ emake DESTDIR="${D}" install
+}
diff --git a/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-1.0.ebuild b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-1.0.ebuild
new file mode 100644
index 0000000..b545b63
--- /dev/null
+++ b/x11-misc/lightdm-webkit-greeter/lightdm-webkit-greeter-1.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Webkit-based greeter for LightDM"
+HOMEPAGE="https://launchpad.net/${PN}"
+SRC_URI="${HOMEPAGE}/trunk/${PV}/+download/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="net-libs/webkit-gtk:2
+ x11-misc/lightdm
+ dev-libs/gobject-introspection
+ app-text/gnome-doc-utils
+ dev-util/intltool
+ "
+RDEPEND="${DEPEND}"
+
+src_prepare(){
+ # What is Ambiance? This should be a GTK+ 2.x theme, so we use Clearlooks here.
+ sed -i '/^theme-name=/s/Ambiance/Clearlooks/' data/lightdm-webkit-greeter.conf
+
+ # Theme 'default' does not exist...
+ sed -i '/^webkit-theme=/s/default/webkit/' data/lightdm-webkit-greeter.conf
+
+ # this is Ubuntu branding... Replace it with something useful. ;)
+ sed -i '/^background=/s|/usr/share/backgrounds/warty-final-ubuntu.png||' data/lightdm-webkit-greeter.conf
+ # Replace Ubuntu font with Dejavusans
+ sed -i '/^font-name=/s|Ubuntu 11|DejaVuSans 11|' data/lightdm-webkit-greeter.conf
+}
+
+src_compile(){
+ econf || die "econf failed"
+ emake DESTDIR="${D}" || die "emake failed"
+}
+
+src_install(){
+ emake DESTDIR="${D}" install
+}