kuuhana
  • Communities
  • Multi-communities
  • Support Lemmy
  • Search
  • Login
  • Sign Up
Linux@programming.devbyKatzenmann@programming.dev
3 years

Cthulock: Wayland screen locker focused on customizability

programming.dev

https://github.com/FriederHannenheim/cthulock Hey everybody. I’m releasing my new screen locker for Wayland which you can easily customize using the Slint language. Feel free to ask me any questions in the comments.___

8
    You must log in or register to comment.

    • Vilian@lemmy.ca
      3 years

      why slint? i never heard about it

        • odium@programming.dev
          3 years

          Looks like it makes rust easier based on a quick 30 second search

          • Katzenmann@programming.dev
            3 years

            I was looking for a UI framework that could easily embedded into other applications. I’m doing all the communication with Wayland myself, then create an OpenGL context from the Wayland surface which Slint renders into. Also Slint has this language you can create UI’s with, which I think is not too difficult for users to learn so anyone can customize their lock screen easily with it.

          • Illecors@lemmy.cafeEnglish
            3 years

            Would you mind providing any more details on what exactly one can customise? Might give this a shot tomorrow.

              • Katzenmann@programming.dev
                3 years

                Yeah sure. Well slint is a whole ui library and so you can customize basically anything. You could add extra text, move the clock and the password prompt wherever you want. You could even remove the password prompt and replace it by something else. Here’s the config of the screenshot above:

                import { LineEdit , TextEdit} from "std-widgets.slint";
                export component HelloWorld {
                    in property clock_text;
                    in property checking_password;
                    in-out property password <=> password.text;
                    callback submit <=> password.accepted;
                    forward-focus: password;
                    states [
                        checking when checking-password : {
                            password.enabled: false;
                        }
                    ]
                
                    Image {
                        width: parent.width;
                        height: parent.height;
                        source: @image-url("wallpaper.png");
                        HorizontalLayout {
                            VerticalLayout {
                                alignment: end;
                                spacing: 10px;
                                padding: 40px;
                                width: 350px;
                                Text {
                                    text: clock_text;
                                    horizontal-alignment: center;
                                    font-size: 60pt;
                                    color: white;
                                }
                                password := LineEdit {
                                    enabled: true;
                                    horizontal-alignment: left;
                                    input-type: InputType.password;
                                    placeholder-text: "password...";
                                }
                            }
                        }
                    }
                }
                
              • LiveLM@lemmy.zipEnglish
                3 years

                Very interesting!
                Will give this a shot soon, particularly after the mess that was customizing Swaylock

                • BetterDev@programming.dev
                  3 years

                  This looks really cool, thanks for your effort here, @Katzenmann@programming.dev

                  • mrkite@programming.dev
                    3 years

                    Interesting. I didn’t realize Wayland was so extendible. I wonder if that means we can do a konfabulator clone.

                    Linux@programming.dev

                    linux@programming.dev

                    Subscribe from remote instance

                    Create post

                    Report community

                    Modlog
                    You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@programming.dev

                    A community for everything relating to the GNU/Linux operating system (except the memes!)

                    Also, check out:

                    • !linux_memes@programming.dev
                    • !linuxphones@lemmy.ca
                    • our Matrix group chat
                    • !reactos@programming.dev

                    Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

                    Visibility: Public

                    This community is visible to everyone.

                    • 206 users / Day
                    • 491 users / Week
                    • 501 users / Month
                    • 8.6K users / 6 months
                    • 4.52K posts
                    • 36.5K comments
                    • 1 local subscriber
                    • 14.1K subscribers
                    • UI: 1.0.0-beta.0
                    • BE: 1.0.0-alpha.20
                    • Modlog
                    • Instances
                    • Docs
                    • Code
                    • join-lemmy.org