Browse Source

Update background image paths and thumbnails.

sisyphus
Dustin Falgout 10 years ago
parent
commit
b19d595e07
  1. 50
      themes/antergos/.gitignore
  2. 8
      themes/antergos/README.textile
  3. BIN
      themes/antergos/img/thumbs/c65sk3mshowxrtlljbvh.jpg
  4. 0
      themes/antergos/img/thumbs/morning_light.jpg
  5. 0
      themes/antergos/img/thumbs/nikon_d40.jpg
  6. BIN
      themes/antergos/img/thumbs/sky_full_of_stars.jpg
  7. 0
      themes/antergos/img/thumbs/solely_by_stevenfields.jpg
  8. 18
      themes/antergos/index.html
  9. 2
      themes/antergos/index.theme
  10. 446
      themes/antergos/js/greeter.js

50
themes/antergos/.gitignore vendored

@ -0,0 +1,50 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
*.iml
## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:
# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml
# Gradle:
# .idea/gradle.xml
# .idea/libraries
# Mongo Explorer plugin:
# .idea/mongoSettings.xml
## File-based project format:
*.ipr
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

8
themes/antergos/README.textile

@ -13,15 +13,15 @@ h2. Screenshots
h2. Prerequisites h2. Prerequisites
* lightdm * lightdm
* lightdm-webkit-greeter * lightdm-webkit2-greeter
* antergos-wallpapers (used for the background switcher) * antergos-wallpapers (used for the background switcher)
Enable @ligthdm-webkit-greeter@ by editing @/etc/lightdm/lightdm.conf@ and setting @greeter-session@ property to @lightdm-webkit-greeter@ : Enable @ligthdm-webkit2-greeter@ by editing @/etc/lightdm/lightdm.conf@ and setting @greeter-session@ property to @lightdm-webkit2-greeter@ :
bc. bc.
[SeatDefaults] [SeatDefaults]
#greeter-session=lightdm-gtk-greeter #greeter-session=lightdm-gtk-greeter
greeter-session=lightdm-webkit-greeter greeter-session=lightdm-webkit2-greeter
user-session=your-session (gnome,cinnamon,xfce...) user-session=your-session (gnome,cinnamon,xfce...)
h2. Installation h2. Installation
@ -34,7 +34,7 @@ Others can install manually:
# Unzip it. # Unzip it.
# This should create a folder named like @Antergos-lightdm-webkit-theme-antergos-28c4b13@ # This should create a folder named like @Antergos-lightdm-webkit-theme-antergos-28c4b13@
# Rename this folder to @antergos@ (so that the complete path becomes @/usr/share/lightdm-webkit/themes/antergos@) # Rename this folder to @antergos@ (so that the complete path becomes @/usr/share/lightdm-webkit/themes/antergos@)
# Edit the resource @/etc/lightdm/lightdm-webkit-greeter.conf@ and set @webkit-theme@ property to @antergos@ : # Edit the resource @/etc/lightdm/lightdm-webkit2-greeter.conf@ and set @webkit-theme@ property to @antergos@ :
bc. bc.
theme-name=Adwaita theme-name=Adwaita

BIN
themes/antergos/img/thumbs/c65sk3mshowxrtlljbvh.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

0
themes/antergos/img/thumbs/morning_light_by_l33tc4k3-d5d2yu0.jpg → themes/antergos/img/thumbs/morning_light.jpg

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

0
themes/antergos/img/thumbs/nikon_d40_test_by_desirefire1-d5fghdc.jpg → themes/antergos/img/thumbs/nikon_d40.jpg

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
themes/antergos/img/thumbs/sky_full_of_stars.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

0
themes/antergos/img/thumbs/solely_by_stevenfields-d5g1c2o.jpg → themes/antergos/img/thumbs/solely_by_stevenfields.jpg

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

18
themes/antergos/index.html

@ -136,6 +136,9 @@
<a href="#" data-img="blossom_by_snipes2.jpg" class="bg clearfix"> <a href="#" data-img="blossom_by_snipes2.jpg" class="bg clearfix">
<img src="img/thumbs/blossom_by_snipes2.jpg" /> <img src="img/thumbs/blossom_by_snipes2.jpg" />
</a> </a>
<a href="#" data-img="c65sk3mshowxrtlljbvh.jpg" class="bg clearfix">
<img src="img/thumbs/c65sk3mshowxrtlljbvh.jpg" />
</a>
<a href="#" data-img="early_morning_by_kylekc.jpg" class="bg clearfix"> <a href="#" data-img="early_morning_by_kylekc.jpg" class="bg clearfix">
<img src="img/thumbs/early_morning_by_kylekc.jpg" /> <img src="img/thumbs/early_morning_by_kylekc.jpg" />
</a> </a>
@ -157,17 +160,20 @@
<a href="#" data-img="In_the_Grass.jpg" class="bg clearfix"> <a href="#" data-img="In_the_Grass.jpg" class="bg clearfix">
<img src="img/thumbs/In_the_Grass.jpg" /> <img src="img/thumbs/In_the_Grass.jpg" />
</a> </a>
<a href="#" data-img="morning_light_by_l33tc4k3-d5d2yu0.jpg" class="bg clearfix"> <a href="#" data-img="morning_light.jpg" class="bg clearfix">
<img src="img/thumbs/morning_light_by_l33tc4k3-d5d2yu0.jpg" /> <img src="img/thumbs/morning_light.jpg" />
</a> </a>
<a href="#" data-img="Nautilus_Fullscreen.jpg" class="bg clearfix"> <a href="#" data-img="Nautilus_Fullscreen.jpg" class="bg clearfix">
<img src="img/thumbs/Nautilus_Fullscreen.jpg" /> <img src="img/thumbs/Nautilus_Fullscreen.jpg" />
</a> </a>
<a href="#" data-img="nikon_d40_test_by_desirefire1-d5fghdc.jpg" class="bg clearfix"> <a href="#" data-img="nikon_d40.jpg" class="bg clearfix">
<img src="img/thumbs/nikon_d40_test_by_desirefire1-d5fghdc.jpg" /> <img src="img/thumbs/nikon_d40.jpg" />
</a>
<a href="#" data-img="solely_by_stevenfields.jpg" class="bg clearfix">
<img src="img/thumbs/solely_by_stevenfields.jpg" />
</a> </a>
<a href="#" data-img="solely_by_stevenfields-d5g1c2o.jpg" class="bg clearfix"> <a href="#" data-img="sky_full_of_stars.jpg" class="bg clearfix">
<img src="img/thumbs/solely_by_stevenfields-d5g1c2o.jpg" /> <img src="img/thumbs/sky_full_of_stars.jpg" />
</a> </a>
<a href="#" data-img="the_world_inside_my_lens__by_moskanon-d5fsiqs.jpg" class="bg clearfix"> <a href="#" data-img="the_world_inside_my_lens__by_moskanon-d5fsiqs.jpg" class="bg clearfix">
<img src="img/thumbs/the_world_inside_my_lens__by_moskanon-d5fsiqs.jpg" /> <img src="img/thumbs/the_world_inside_my_lens__by_moskanon-d5fsiqs.jpg" />

2
themes/antergos/index.theme

@ -1,6 +1,6 @@
[theme] [theme]
name=Antergos name=Antergos
version=2.0.7 version=2.0.8
description=Antergos Theme description=Antergos Theme
engine=lightdm-webkit2-greeter engine=lightdm-webkit2-greeter
url=index.html url=index.html

446
themes/antergos/js/greeter.js

@ -5,44 +5,44 @@ var users_shown = null;
function buildUserList() { function buildUserList() {
// User list building // User list building
var userList = document.getElementById('user-list2'); var userList = document.getElementById('user-list2');
for (var i in lightdm.users) { for (var i in lightdm.users) {
var user = lightdm.users[i]; var user = lightdm.users[i];
var tux = 'img/antergos-logo-user.png'; var tux = 'img/antergos-logo-user.png';
var imageSrc = user.image.length > 0 ? user.image : tux; var imageSrc = user.image.length > 0 ? user.image : tux;
var lastSession = localStorage.getItem(user.name); var lastSession = localStorage.getItem(user.name);
if (lastSession == null || lastSession == undefined) { if (lastSession == null || lastSession == undefined) {
localStorage.setItem(user.name, lightdm.default_session); localStorage.setItem(user.name, lightdm.default_session);
lastSession = localStorage.getItem(user.name); lastSession = localStorage.getItem(user.name);
} }
log('Last Session (' + user.name + '): ' + lastSession); log('Last Session (' + user.name + '): ' + lastSession);
var li = '<a href="#' + user.name + '" class="list-group-item ' + user.name + '" onclick="startAuthentication(\'' + user.name + '\')" session="' + lastSession + '">' + var li = '<a href="#' + user.name + '" class="list-group-item ' + user.name + '" onclick="startAuthentication(\'' + user.name + '\')" session="' + lastSession + '">' +
'<img src="' + imageSrc + '" class="img-square" alt="' + user.display_name + '" onerror="imgNotFound(this)"/> ' + '<img src="' + imageSrc + '" class="img-square" alt="' + user.display_name + '" onerror="imgNotFound(this)"/> ' +
'<span>' + user.display_name + '</span>' + '<span>' + user.display_name + '</span>' +
'<span class="badge"><i class="fa fa-check"></i></span>' + '<span class="badge"><i class="fa fa-check"></i></span>' +
'</a>'; '</a>';
$(userList).append(li); $(userList).append(li);
} }
} }
function buildSessionList() { function buildSessionList() {
// Build Session List // Build Session List
for (i in lightdm.sessions) { for (i in lightdm.sessions) {
var session = lightdm.sessions[i]; var session = lightdm.sessions[i];
var btnGrp = document.getElementById('sessions'); var btnGrp = document.getElementById('sessions');
var theClass = session.name.replace(/ /g, ''); var theClass = session.name.replace(/ /g, '');
var button = '\n<li><a href="#" id="' + session.key + '" onclick="sessionToggle(this)" class="' + theClass + '">' + session.name + '</a></li>'; var button = '\n<li><a href="#" id="' + session.key + '" onclick="sessionToggle(this)" class="' + theClass + '">' + session.name + '</a></li>';
$(btnGrp).append(button); $(btnGrp).append(button);
} }
} }
function show_users() { function show_users() {
if ($('#collapseOne').hasClass('in')) { if ($('#collapseOne').hasClass('in')) {
$('#trigger').trigger('click'); $('#trigger').trigger('click');
users_shown = true; users_shown = true;
} }
if ($('#user-list2 a').length <= 1) $('#user-list2 a').trigger('click'); if ($('#user-list2 a').length <= 1) $('#user-list2 a').trigger('click');
} }
/** /**
@ -50,28 +50,28 @@ function show_users() {
*/ */
$(document).ready(function () { $(document).ready(function () {
initialize_timer(); initialize_timer();
get_hostname(); get_hostname();
buildUserList(); buildUserList();
buildSessionList(); buildSessionList();
// Password submit when enter key is pressed // Password submit when enter key is pressed
$(document).keydown(function (e) { $(document).keydown(function (e) {
checkKey(e); checkKey(e);
}); });
// Action buttons // Action buttons
addActionLink("shutdown"); addActionLink("shutdown");
addActionLink("hibernate"); addActionLink("hibernate");
addActionLink("suspend"); addActionLink("suspend");
addActionLink("restart"); addActionLink("restart");
}); });
function get_hostname() { function get_hostname() {
var hostname = lightdm.hostname; var hostname = lightdm.hostname;
var hostname_span = document.getElementById('hostname'); var hostname_span = document.getElementById('hostname');
$(hostname_span).append(hostname); $(hostname_span).append(hostname);
} }
/** /**
@ -81,177 +81,177 @@ function get_hostname() {
*/ */
function update_time() { function update_time() {
var time = document.getElementById("current_time"); var time = document.getElementById("current_time");
var date = new Date(); var date = new Date();
var twelveHr = [ var twelveHr = [
'sq-al', 'sq-al',
'zh-cn', 'zh-cn',
'zh-tw', 'zh-tw',
'en-au', 'en-au',
'en-bz', 'en-bz',
'en-ca', 'en-ca',
'en-cb', 'en-cb',
'en-jm', 'en-jm',
'en-ng', 'en-ng',
'en-nz', 'en-nz',
'en-ph', 'en-ph',
'en-us', 'en-us',
'en-tt', 'en-tt',
'en-zw', 'en-zw',
'es-us', 'es-us',
'es-mx']; 'es-mx'];
var userLang = window.navigator.language; var userLang = window.navigator.language;
var is_twelveHr = twelveHr.indexOf(userLang); var is_twelveHr = twelveHr.indexOf(userLang);
var hh = date.getHours(); var hh = date.getHours();
var mm = date.getMinutes(); var mm = date.getMinutes();
var suffix = "AM"; var suffix = "AM";
if (hh >= 12) { if (hh >= 12) {
suffix = "PM"; suffix = "PM";
if (is_twelveHr !== -1 && is_twelveHr !== 12) { if (is_twelveHr !== -1 && is_twelveHr !== 12) {
hh = hh - 12; hh = hh - 12;
} }
} }
if (mm < 10) { if (mm < 10) {
mm = "0" + mm; mm = "0" + mm;
} }
if (hh === 0 && is_twelveHr !== -1) { if (hh === 0 && is_twelveHr !== -1) {
hh = 12; hh = 12;
} }
time.innerHTML = hh + ":" + mm + " " + suffix; time.innerHTML = hh + ":" + mm + " " + suffix;
} }
function initialize_timer() { function initialize_timer() {
var userLang = window.navigator.language; var userLang = window.navigator.language;
log(userLang); log(userLang);
update_time(); update_time();
setInterval(update_time, 60000); setInterval(update_time, 60000);
} }
function checkKey(event){ function checkKey(event) {
var action; var action;
switch (event.which) { switch (event.which) {
case 13: case 13:
action = auth_pending ? submitPassword() : !users_shown ? show_users() : 0; action = auth_pending ? submitPassword() : !users_shown ? show_users() : 0;
log(action); log(action);
break; break;
case 27: case 27:
action = auth_pending ? cancelAuthentication() : 0; action = auth_pending ? cancelAuthentication() : 0;
log(action); log(action);
break; break;
case 32: case 32:
action = !users_shown && !auth_pending ? show_users() : 0; action = !users_shown && !auth_pending ? show_users() : 0;
log(action); log(action);
break; break;
default: default:
break; break;
} }
} }
function addActionLink(id) { function addActionLink(id) {
if (eval("lightdm.can_" + id)) { if (eval("lightdm.can_" + id)) {
var label = id.substr(0, 1).toUpperCase() + id.substr(1, id.length - 1); var label = id.substr(0, 1).toUpperCase() + id.substr(1, id.length - 1);
var id2; var id2;
if (id == "shutdown") { if (id == "shutdown") {
id2 = "power-off" id2 = "power-off"
} }
if (id == "hibernate") { if (id == "hibernate") {
id2 = "asterisk" id2 = "asterisk"
} }
if (id == "suspend") { if (id == "suspend") {
id2 = "arrow-down" id2 = "arrow-down"
} }
if (id == "restart") { if (id == "restart") {
id2 = "refresh" id2 = "refresh"
} }
$("#actionsArea").append('\n<button type="button" class="btn btn-default ' + id + '" data-toggle="tooltip" data-placement="top" title="' + label + '" data-container="body" onclick="handleAction(\'' + id + '\')"><i class="fa fa-' + id2 + '"></i></button>'); $("#actionsArea").append('\n<button type="button" class="btn btn-default ' + id + '" data-toggle="tooltip" data-placement="top" title="' + label + '" data-container="body" onclick="handleAction(\'' + id + '\')"><i class="fa fa-' + id2 + '"></i></button>');
} }
} }
function capitalize(string) { function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1); return string.charAt(0).toUpperCase() + string.slice(1);
} }
function handleAction(id) { function handleAction(id) {
log("handleAction(" + id + ")"); log("handleAction(" + id + ")");
eval("lightdm." + id + "()"); eval("lightdm." + id + "()");
} }
function getUserObj(username) { function getUserObj(username) {
var user = null; var user = null;
for (var i = 0; i < lightdm.users.length; ++i) { for (var i = 0; i < lightdm.users.length; ++i) {
if (lightdm.users[i].name == username) { if (lightdm.users[i].name == username) {
user = lightdm.users[i]; user = lightdm.users[i];
break; break;
} }
} }
return user; return user;
} }
function getSessionObj(sessionname) { function getSessionObj(sessionname) {
var session = null; var session = null;
for (var i = 0; i < lightdm.sessions.length; ++i) { for (var i = 0; i < lightdm.sessions.length; ++i) {
if (lightdm.sessions[i].name == sessionname) { if (lightdm.sessions[i].name == sessionname) {
session = lightdm.sessions[i]; session = lightdm.sessions[i];
break; break;
} }
} }
return session; return session;
} }
function startAuthentication(userId) { function startAuthentication(userId) {
log("startAuthentication(" + userId + ")"); log("startAuthentication(" + userId + ")");
if (selectedUser !== null) { if (selectedUser !== null) {
lightdm.cancel_authentication(); lightdm.cancel_authentication();
localStorage.setItem('selUser', null); localStorage.setItem('selUser', null);
log("authentication cancelled for " + selectedUser); log("authentication cancelled for " + selectedUser);
} }
localStorage.setItem('selUser', userId); localStorage.setItem('selUser', userId);
selectedUser = '.' + userId; selectedUser = '.' + userId;
$(selectedUser).addClass('hovered'); $(selectedUser).addClass('hovered');
$(selectedUser).siblings().hide(); $(selectedUser).siblings().hide();
$('.fa-toggle-down').hide(); $('.fa-toggle-down').hide();
var usrSession = localStorage.getItem(userId); var usrSession = localStorage.getItem(userId);
log("usrSession: " + usrSession); log("usrSession: " + usrSession);
var usrSessionEl = "#" + usrSession; var usrSessionEl = "#" + usrSession;
var usrSessionName = $(usrSessionEl).html(); var usrSessionName = $(usrSessionEl).html();
log("usrSessionName: " + usrSessionName); log("usrSessionName: " + usrSessionName);
$('.selected').html(usrSessionName); $('.selected').html(usrSessionName);
$('.selected').attr('id', usrSession); $('.selected').attr('id', usrSession);
$('#session-list').removeClass('hidden'); $('#session-list').removeClass('hidden');
$('#passwordArea').show(); $('#passwordArea').show();
auth_pending = true; auth_pending = true;
lightdm.start_authentication(userId); lightdm.start_authentication(userId);
} }
function cancelAuthentication() { function cancelAuthentication() {
log("cancelAuthentication()"); log("cancelAuthentication()");
$('#statusArea').hide(); $('#statusArea').hide();
$('#timerArea').hide(); $('#timerArea').hide();
$('#passwordArea').hide(); $('#passwordArea').hide();
$('#session-list').hide(); $('#session-list').hide();
if (selectedUser != null) { if (selectedUser != null) {
lightdm.cancel_authentication(); lightdm.cancel_authentication();
log("authentication cancelled for " + selectedUser); log("authentication cancelled for " + selectedUser);
$('.list-group-item.hovered').removeClass('hovered').siblings().show(); $('.list-group-item.hovered').removeClass('hovered').siblings().show();
$('.fa-toggle-down').show(); $('.fa-toggle-down').show();
selectedUser = null; selectedUser = null;
auth_pending = false; auth_pending = false;
} }
return true; return true;
} }
function submitPassword() { function submitPassword() {
log("provideSecret()"); log("provideSecret()");
lightdm.provide_secret($('#passwordField').val()); lightdm.provide_secret($('#passwordField').val());
$('#passwordArea').hide(); $('#passwordArea').hide();
$('#timerArea').show(); $('#timerArea').show();
log("done"); log("done");
} }
/** /**
@ -259,64 +259,64 @@ function submitPassword() {
*/ */
function imgNotFound(source) { function imgNotFound(source) {
source.src = 'img/antergos-logo-user.png'; source.src = 'img/antergos-logo-user.png';
source.onerror = ""; source.onerror = "";
return true; return true;
} }
function sessionToggle(el) { function sessionToggle(el) {
var selText = $(el).text(); var selText = $(el).text();
var theID = $(el).attr('id'); var theID = $(el).attr('id');
var selUser = localStorage.getItem('selUser'); var selUser = localStorage.getItem('selUser');
$(el).parents('.btn-group').find('.selected').attr('id', theID); $(el).parents('.btn-group').find('.selected').attr('id', theID);
$(el).parents('.btn-group').find('.selected').html(selText); $(el).parents('.btn-group').find('.selected').html(selText);
localStorage.setItem(selUser, theID) localStorage.setItem(selUser, theID)
} }
/** /**
* Lightdm Callbacks * Lightdm Callbacks
*/ */
function show_prompt(text) { function show_prompt(text) {
log("show_prompt(" + text + ")"); log("show_prompt(" + text + ")");
$('#passwordField').val(""); $('#passwordField').val("");
$('#passwordArea').show(); $('#passwordArea').show();
$('#passwordField').focus(); $('#passwordField').focus();
} }
function authentication_complete() { function authentication_complete() {
log("authentication_complete()"); log("authentication_complete()");
auth_pending = false; auth_pending = false;
$('#timerArea').hide(); $('#timerArea').hide();
var selSession = $('.selected').attr('id'); var selSession = $('.selected').attr('id');
if (lightdm.is_authenticated) { if (lightdm.is_authenticated) {
log("authenticated !"); log("authenticated !");
lightdm.login(lightdm.authentication_user, selSession); lightdm.login(lightdm.authentication_user, selSession);
} else { } else {
log("not authenticated !"); log("not authenticated !");
$('#statusArea').show(); $('#statusArea').show();
} }
} }
function show_message(text) { function show_message(text) {
msgWrap = document.getElementById('statusArea'); msgWrap = document.getElementById('statusArea');
showMsg = document.getElementById('showMsg'); showMsg = document.getElementById('showMsg');
showMsg.innerHTML = text; showMsg.innerHTML = text;
if (text.length > 0) { if (text.length > 0) {
$('#passwordArea').hide(); $('#passwordArea').hide();
$(msgWrap).show(); $(msgWrap).show();
} }
} }
function show_error(text) { function show_error(text) {
show_message(text); show_message(text);
} }
/** /**
* Logs. * Logs.
*/ */
function log(text) { function log(text) {
if (DEBUG) { if (DEBUG) {
$('#logArea').append(text); $('#logArea').append(text);
$('#logArea').append('<br/>'); $('#logArea').append('<br/>');
} }
} }

Loading…
Cancel
Save