GithubHelp home page GithubHelp logo

m-wynn / sddm_wynn-theme Goto Github PK

View Code? Open in Web Editor NEW
23.0 5.0 5.0 1.93 MB

Material Design sddm theme

License: Creative Commons Attribution Share Alike 4.0 International

QML 100.00%
sddm-theme theme material sddm greeter login

sddm_wynn-theme's Introduction

sddm_wynn theme

A flexible, configurable, material SDDM theme. Most values are configurable via the theme.conf file.

Screenshots (some functionality not shown)

Screenshot

Features

  • Select user via user picker
  • Select user via typing in username (optional)
  • Display organization logo instead of user icon (optional)
  • Select background image (configuration option)
  • Customizable color scheme (configuration option)
  • Set default session (configuration option)
  • User selects their preferred session via menu
  • Select user's session via request to your API (optional, see below)
  • Display a configurable usage message to the user (optional)

Installation

  1. Install sddm
  2. git clone https://github.com/m-wynn/sddm_wynn-theme.git /usr/share/sddm/themes/sddm_wynn-theme
  3. chmod -R 755 /usr/share/sddm/themes/sddm_wynn-theme
  4. Install qml dependencies (qt5-graphicaleffects and qt5-quickcontrols2)
  5. Put "Current=sddm_wynn-theme" in the [Theme] section of /etc/sddm.conf

Configuration file values

You can create a theme.conf.user file in the theme folder, which will override the defaults.

  • default_background: Path to background image
  • default_session: Session name to default to. This is the sessionname in /usr/share/xsessions/sessionname.desktop (i.e. cinnamon or cinnamon2d, NOT Cinnamon (Software Rendering))
  • font: The name of font family to use in labels and fields
  • accent1: The color of the top bar
  • accent1_text: The color of the top bar text and buttons
  • accent2: The color of other items, like the "LOG IN" button
  • accent2_hover: The color that will be applied on hover to accent2 items
  • am_pm_clock: Whether to use a 12-hour AM/PM clock or a 24-hour clock
  • logo (optional): Path to the image that will be placed in the spot usually filled by a face icon
  • primary_screen_only: Whether or not to display the panel on both screens, or just the primary screen.
  • user_name: fill to have the user type in their own username, or select if you would like to provide a menu of users to choose from
  • session_api (optional): A url which will return the user's preferred desktop environment (yes, this was made with a very specific use-case in mind, see more below)
  • aup (optional): A string that will contain an Acceptable Use Policy for your users. Escape characters such as '\n' will render properly (i.e. as actual newlines). Alternatively, quote the whole thing and put in real newlines.

Session API

The session API value is useful if, for example, you are running a linux lab of many users, and users can choose a desktop environment to be associated with their account. As an example, this could be done via LDAP and an small web API.

The greeter theme will read your session_api value from the configuration file, replace %s with the username, perform an HTTP GET request, and use the body of the result as the session name. Again, the session name should be the sessionname in /usr/share/xsessions/sessionname.desktop (i.e. cinnamon or cinnamon2d, NOT Cinnamon (Software Rendering)). If the API returns N, then it will reset to the default_session configuration value.

For example, if your session_api is http://ldap-api.mylab.com/%s/session/0 and a user types in their name m_wynn into the username box, as soon as they focus away from the username box, the theme will GET http://ldap-api.mylab.com/m_wynn/session/0. If the result is N, the default_session will be used. Otherwise, the body of the response (i.e. "cinnamon") is used as the session name.

sddm_wynn-theme's People

Contributors

erickotato avatar kulinacs avatar m-wynn avatar mathew-d avatar pvsr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sddm_wynn-theme's Issues

Cannot change the background image in configure file and in plasma settings.

My desktop environment is Plasma by KDE, more details please see below:

image

The content of the theme.conf.user file likes below:

[General]
background=anotherBackground.png
type=image

And the content of the theme.conf file likes below:

[General]
default_background=background.png
default_session=plasma
accent1=#4dd0e1
accent2=#00796b
accent2_hover=#009688
user_name=select

the size of my background image is 1920 X 1297

Is there any mistake I have made? If so, I will appreciate it if you can tell me.

How to translate this theme?

I want to translate it into my language, I can find texts such as LOG IN quote by a function clalled qsTr, But I don't know how to translate it.

User avatar redraw

Greetings.

Found a strange bug: just after booting user avatar on LoginFrame not draws until you hover it with mouse or selecting other user. After this bug disappears until next boot (even SDDM restart does not cause it).

So, fix is not clear. There is this line:

onSourceChanged: delayPaintTimer.running = true

Which starts timer on changing source property that after 150ms executes redraw:

onTriggered: avatar.requestPaint()

Only time when timer does not execute is just after booting.

But if we change onSourceChanged to:

onSourceChanged: avatar.requestPaint()

It will draw just fine.

So I have a question: is that timer in any way important to avatar redraw?

Buttons on secondary monitors appear but don't function with primary_screen_only=true

When configured with primary_screen_only = true, the control buttons (WM, User Switch, Power) appear on secondary monitors, but do not have the expected effect when pressed, and instead only blur the background.

The expected behavior is either that the buttons are not displayed or are entirely effective, having the normal action either on their monitor, or alternatively, the primary monitor.

SDDM version: 0.18.1
Wynn version: 1.4

Keyboard controls not responding if page was opened by mouse

Greetings.

When selecting page by mouse, keyboard controls stops to respond. Problem stands for all three pages, but it is tricky to fix them all.

For "sessions" page you can just add this call to onClicked (Main.qml, line 286):

sessionFrame.currentItem.forceActiveFocus()

so it will be

onClicked: {
    root.state = "stateSession"
    sessionFrame.focus = true
    sessionFrame.currentItem.forceActiveFocus()
}

You can actually do same thing to other two pages ("users" and "power"), but if you will, then there will be frame showing current selection even if pages was selected by mouse. It makes no difference for "sessions" page though.

Virtual Keyboard fills the whole screen

When using this theme on OpenSuse Tumbleweed a virtual keyboard fills the whole screen.
Is this a feature? Can this be disabled?

The workaround I've figured is to press enter then login fails and the keyboard disappears.

Compatibility with sddm-kcm generated theme.conf.user

sddm-kcm provides a GUI to configure SDDM in Plasma's system settings. The tool will generate a theme.conf.user w.r.t user settings.

For example, this is a generated theme.conf.user after changing background:

[General]
background=68814585_p0.png
type=image

Obviously it won't work because the theme wants default_background instead.

There could be more config options differ from sddm-kcm generated, please rename options to match sddm-kcm standard.

Handle invalid session api response

If the session API responds with an invalid session (maybe one that has been uninstalled), the theme should fallback to the defaultSession value before defaulting to the first session installed

Build in material

It's impossible to send the correct environment variables to sddm-greeter, so the material theme has to be manually specified everywhere

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.