├── lightdm-webkit-Y-combinator.gif ├── index.theme ├── README.md ├── theme.js ├── index.html ├── underscore-min.js └── jquery.min.js /lightdm-webkit-Y-combinator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/snowmantw/lightdm-webkit-Y-combinator/HEAD/lightdm-webkit-Y-combinator.gif -------------------------------------------------------------------------------- /index.theme: -------------------------------------------------------------------------------- 1 | [theme] 2 | name=Y-Combinator 3 | description= (Y F) = (F (Y F)) 4 | engine=lightdm-webkit-greeter 5 | url=index.html 6 | session= 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Y-combinator Theme for lightdm-webkit 2 | 3 | Because `slim` was sunk, and desktop HTML applications rocks. 4 | 5 | ## Screenshot 6 | 7 | ![Y-combinator-screenshot](https://raw.github.com/snowmantw/lightdm-webkit-Y-combinator/master/lightdm-webkit-Y-combinator.gif) 8 | 9 | The progress will automatically expand ( **animated** ). 10 | Unfortunately, I didn't finish the real evaluating function. 11 | So what you see is manually evaluating version. 12 | 13 | ## Installation 14 | 15 | 0. You must install `lightdm-webkit-greeter` first. 16 | 17 | 1. Clone this repo and copy all things in `/usr/local/share/lightdm-webkit/lightdm-webkit-Y-combinator`. 18 | 19 | And if the directory dosen't exist, create it ( you don't want your system mixed any customed things. Don't you ?) 20 | 21 | 2. Link the theme directory to `/usr/share/lightdm-webkit/lightdm-webkit-Y-combinator` 22 | 23 | 3. Add new greater in `/etc/lightdm` and named it with any name you want. 24 | 25 | You can copy the original webkit greeter. 26 | Just notice that the `webkit-theme` attribute must match to this theme's name, ex: 27 | 28 | webkit-theme=lightdm-webkit-Y-combinator 29 | 30 | 4. Modify `/etc/lightdm/lightdm.conf` to use the greeter: 31 | 32 | [SeatDefaults] 33 | greeter-session=lightdm-webkit-greeter-snowmantw 34 | 35 | 5. Done. 36 | 37 | 38 | ## Resolution issue 39 | 40 | I made this for my laptop run in 1600X800 mode, and do some basic testing under 1280X800. 41 | My keypoint is that the last line of evaluating must stick to the bottom of screen. 42 | But you can adjust it according to your resolution. 43 | 44 | ## Where is session selector, user menu, password prompt, etc.? 45 | 46 | May follow `slim`'s shortcut keys to implement these features in the future. 47 | But I almost use none of these features, so this "future" may not come true. 48 | 49 | ## License 50 | 51 | CC BY-SA-3.0 52 | -------------------------------------------------------------------------------- /theme.js: -------------------------------------------------------------------------------- 1 | DEBUG = false 2 | 3 | SHOW_LINE = 1 4 | SHOW_LINE_MAX = 15 5 | SHOW_TIME = 800 6 | SHOW_WAIT_TIME = 6000 7 | 8 | function Ycountdown() 9 | { 10 | $('#ycombinators .line').eq(SHOW_LINE).fadeIn() 11 | SHOW_LINE += 1; 12 | if( SHOW_LINE > SHOW_LINE_MAX ) 13 | { 14 | SHOW_LINE = 1 15 | setTimeout('Ycountdown_hide()', SHOW_WAIT_TIME); 16 | } 17 | else 18 | { 19 | setTimeout('Ycountdown()', SHOW_TIME); 20 | } 21 | } 22 | 23 | function Ycountdown_hide() 24 | { 25 | $("#ycombinators .line").hide() 26 | $("#ycombinators .line").eq(0).show() 27 | setTimeout('Ycountdown()', SHOW_TIME); 28 | } 29 | 30 | // Default callbakc function 31 | function authentication_complete() 32 | { 33 | debug("authentication_complete called"); 34 | debug("is_authenticated: " + lightdm.is_authenticated); 35 | debug("auth_user: " + lightdm.authentication_user); 36 | 37 | if (lightdm.is_authenticated) 38 | lightdm.login (lightdm.authentication_user, lightdm.default_session); 39 | else 40 | showMessage ("Authentication Failed"); 41 | 42 | reset (); 43 | } 44 | 45 | function reset() 46 | { 47 | $('#password').val("") 48 | } 49 | 50 | function setInput() 51 | { 52 | $('#username').focus() 53 | 54 | $('#password').keypress(function(e){ 55 | if(e.which == 13) 56 | { 57 | lightdm.start_authentication( $("#username").val() ); 58 | debug("start_authentication") 59 | } 60 | }) 61 | } 62 | 63 | function showMessage(text) 64 | { 65 | $('#message').prepend("

"+text+"

") 66 | } 67 | 68 | // Default callbakc function 69 | function show_prompt(text) { 70 | debug("show_prompt called"); 71 | debug("show_prompt text: " + text); 72 | submitPassword() 73 | } 74 | 75 | function submitPassword(){ 76 | debug("submitPassword called"); 77 | 78 | lightdm.provide_secret($("#password").val()); 79 | } 80 | 81 | function debug(txt) 82 | { 83 | if( DEBUG ) 84 | { 85 | showMessage('[DEBUG]'+txt) 86 | } 87 | } 88 | 89 | function info(txt) 90 | { 91 | showMessage(txt) 92 | } 93 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 85 | 86 | 87 | 88 | 97 | 98 | 99 | 100 | 101 |
102 |
103 | 104 | 105 | 106 |
107 |
108 | 109 |
110 |
111 | 112 |
113 |
114 | 115 |