Skip to content

Commit b68d26c

Browse files
authored
V2.0.3 (#28)
* remove extra spaces * use style.setProperty() * login-form: use global-bg * rename debug-mode to debug * sidebar button css * css * accounts: fix bug if default user suddenly doesnt exists * sessions: fix bug if default session suddenly doesnt exists * sessions: fix bug if default session suddenly doesnt exists * sessions: fix bug if default session suddenly doesnt exists part 3 * readme and cleanup * readme
1 parent cd88420 commit b68d26c

13 files changed

+71
-31
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## The glorious lightdm webkit2 theme
1+
## glorious - a lightdm webkit2 theme
22

33
[![maintained](https://img.shields.io/maintenance/yes/2020?label=maintained&style=flat-square)](https://github.com/manilarome/the-glorious-lightdm-webkit2-theme/commits/master) [![contributions](https://img.shields.io/badge/contribution-welcome-brightgreen&?style=flat-square)](https://github.com/manilarome/the-glorious-lightdm-webkit2-theme/pulls) [![HitCount](http://hits.dwyl.com/manilarome/the-glorious-lightdm-webkit2-theme.svg)](http://hits.dwyl.com/manilarome/the-glorious-lightdm-webkit2-theme) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/0812167ef9954b74ac23f7c1bfeb3764)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=manilarome/the-glorious-lightdm-webkit2-theme&utm_campaign=Badge_Grade)
44

55
A sleek, modern, and glorified lightdm webkit2 theme
66

77
## [Live Demo](https://manilarome.github.io/lightdm-webkit2-theme-glorious)
88

9-
#### Demo password: `toor`
9+
### Demo password: `toor`
1010

1111
<p align='center'><img alt='glorious' src='glorious.gif'/><br/><i>glorious - a lightdm webkit 2 theme</i></p>
1212

@@ -16,7 +16,6 @@ Please make sure you don't have an ancient version of these.
1616

1717
+ lightdm
1818
+ lightdm-webkit2-greeter
19-
+ an environment, a desktop environment or a window manager
2019

2120
### Installation
2221

@@ -61,6 +60,10 @@ Please make sure you don't have an ancient version of these.
6160
# If you encountered an error, right-click then reload.
6261
```
6362

63+
### Uninstall
64+
65+
1. Follow the [installation instruction](#installation) in reverse order.
66+
6467
### Features
6568

6669
+ Multi-user support
@@ -102,10 +105,10 @@ There are two clock modes available - `24-hour` and `12-hour`. Switch between cl
102105

103106
### Notes
104107

105-
+ You can add more background images by putting your wallpapers/images in `/usr/share/backgrounds/`.
106-
+ Make sure that you only have image files and directories inside `/usr/share/backgrounds/` or it will cause an error!
107-
+ If you're on a desktop environment like KDE Plasma and GNOME3, you can set your profile picture and real name in the settings. While if you're on a more minimal environment like window managers, you can install and use the program called `mugshot`.
108-
+ If your desktop environment or window manager's logo is not in the sessions screen, feel free to submit a [pull request](https://github.com/manilarome/lightdm-webkit2-theme-glorious/pulls)!
108+
+ Add more background images by putting your wallpapers/images in `/usr/share/backgrounds/`.
109+
+ Non-image and directory inside `/usr/share/backgrounds/` will cause an error! You will likely encounter this if you installed a package (for example `archlinux-wallpaper` that includes `AUTHORS` file).
110+
+ Set your profile image in system settings or by using `mugshot`.
111+
+ Missing DE/WM logo? Submit a [pull request](https://github.com/manilarome/lightdm-webkit2-theme-glorious/pulls)!
109112
+ Translations are not yet supported. PR's are welcome!
110113

111114
### Credits

css/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
--button-bg-hover: #F2F2F230;
99
--button-bg-focus: #F2F2F245;
1010
--button-bg-active: #F2F2F260;
11-
--login-form-elements-bg: #F2F2F222;
11+
--login-form-elements-bg: var(--global-bg);
1212
--login-form-elements-fg: #F2F2F2;
1313
--login-form-elements-button-bg: var(--login-form-elements-bg);
1414
--login-form-elements-button-bg-hover: var(--button-bg-hover);

css/screens.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,12 @@
9191
top: 0;
9292
position: fixed;
9393
pointer-events: unset;
94-
transform: translateZ();
95-
transition:
96-
top var(--global-animation-speed),
97-
pointer-events var(--global-animation-speed),
98-
transform var(--global-animation-speed);
94+
transition: all var(--global-animation-speed);
9995
}
10096

10197
#screen-greeter.screen-greeter-hide {
102-
top: -100vh;
98+
top: -100%;
10399
pointer-events: none;
104-
transform: translateZ();
105100
}
106101

107102
#screen-greeter-content-parent.screen-content-parent {

css/sidebar.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
backdrop-filter: blur(var(--global-blur-strength));
2323
position: fixed;
2424
top: 0;
25-
right: -411px;
25+
right: -100%;
2626
box-sizing: border-box;
2727
box-shadow: none;
2828
padding: 10px 10px;
@@ -337,6 +337,17 @@ button.button-input {
337337
border-radius: 6px;
338338
padding: 10px;
339339
margin: 10px 0;
340+
cursor: pointer;
341+
}
342+
343+
button.button-input:hover {
344+
opacity: 1;
345+
background: var(--button-bg-hover);
346+
}
347+
348+
button.button-input:active {
349+
opacity: 1;
350+
background: var(--button-bg-active);
340351
}
341352

342353
#input-buttons-parent.input-parent button:nth-child(1) {

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@
296296
</button>
297297
</div>
298298
</div>
299-
<script type='text/javascript' src='js/debug-mode.js'></script>
299+
<script type='text/javascript' src='js/debug.js'></script>
300300
<script type='text/javascript' src='js/user-profile.js'></script>
301301
<script type='text/javascript' src='js/authenticate.js'></script>
302302
<script type='text/javascript' src='js/greeter.js'></script>

js/accounts.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,29 @@ class Accounts {
6868
);
6969
}
7070

71+
_setAccountDefaultOnStartUpFallback() {
72+
this._defaultUser = this._usersObject[0].username;
73+
this._defaultUserDisplayName = this._usersObject[0].display_name;
74+
this._defaultUserProfileImage = this._usersObject[0].image;
75+
this._defaultUserProfileImageFallback = 'assets/profiles/user.svg';
76+
const userDefault = {
77+
'userName': this._defaultUser,
78+
'displayName': this._defaultUserDisplayName,
79+
'profileImage': this._defaultUserProfileImage,
80+
'profileImageFallBack': this._defaultUserProfileImageFallback
81+
};
82+
this._updateUserProfileDefaults(userDefault);
83+
}
84+
7185
_setAccountDefaultOnStartUp() {
86+
let defaultAccountItem = document.querySelector(`#button-accounts-item-${this._defaultUser}`);
87+
if (!defaultAccountItem) {
88+
// If the should've been default user does not exist
89+
defaultAccountItem = document.querySelector(`#button-accounts-item-${this._usersObject[parseInt(0, 10)].username}`);
90+
this._setAccountDefaultOnStartUpFallback();
91+
}
7292
this._setUserImageProfile(this._defaultUserProfileImage, this._defaultUserProfileImageFallback);
7393
this._setUserNameLabel(this._defaultUserDisplayName);
74-
const defaultAccountItem = document.querySelector(`#button-accounts-item-${this._defaultUser}`);
7594
this._updateAccountDefault(defaultAccountItem);
7695
}
7796

js/authenticate.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class Authenticate {
2020
'“You miss 100% of the shots you don\'t take – Wayne Gretzky – Michael Scott”',
2121
'Get out of there, it\'s gonna blow!',
2222
'I can do this all day.',
23-
'You father is right. You are a disappointment...'
23+
'You father is right. You are a disappointment...',
24+
'PAM will lock you out...'
2425
];
2526
return errorMessages[Math.floor(Math.random() * errorMessages.length)];
2627
}
@@ -41,8 +42,8 @@ class Authenticate {
4142
}
4243

4344
startAuthentication() {
44-
lightdm.cancel_authentication();
45-
lightdm.authenticate(String(accounts.getDefaultUserName()));
45+
lightdm.cancel_authentication();
46+
lightdm.authenticate(String(accounts.getDefaultUserName()));
4647
}
4748

4849
// Timer expired, create new authentication session

js/backgrounds.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Backgrounds {
6363
dummyImg.onload = () => {
6464
const src = `url('${dummyImg.src}')`;
6565
for (let background of this._backgrounds) {
66-
background.style.backgroundImage = src;
66+
background.style.setProperty('background-image', src);
6767
}
6868
}
6969
}
@@ -106,7 +106,7 @@ class Backgrounds {
106106
'click',
107107
() => {
108108
for (let background of this._backgrounds) {
109-
background.style.backgroundImage = `url('${path}')`;
109+
background.style.setProperty('background-image', `url('${path}')`);
110110
}
111111
this._localStorage.setItem('defaultBackgroundImage', String(path));
112112
this._backgroundRandomMode = false;

js/debug-mode.js renamed to js/debug.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
class DebugMode {
1+
class Debug {
22
constructor() {
33
this._debugModePass = 'toor';
4-
this._debugModeProc();
4+
this._loadDebugObjects();
55
}
66

7-
_debugModeProc() {
7+
_loadDebugObjects() {
88
if (!window.config) {
99
window.config = {};
1010
window.config.get_str = function() {

js/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Instantiate debug mode
2-
const debugMode = new DebugMode();
2+
const debug = new Debug();
33

44
// Instantiate image profile
55
const userProfile = new UserProfile();

0 commit comments

Comments
 (0)