diff --git a/config/material-colors/hooks/sddm.sh b/config/material-colors/hooks/sddm.sh new file mode 100755 index 00000000..1528b6f1 --- /dev/null +++ b/config/material-colors/hooks/sddm.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +"$HOME"/dotfiles/sddm/scripts/wallpaper.sh 1>/dev/null diff --git a/config/sddm/Main.qml b/config/sddm/Main.qml new file mode 100644 index 00000000..cb7b43be --- /dev/null +++ b/config/sddm/Main.qml @@ -0,0 +1,38 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 + +import "./components" + +Rectangle { + id: root + + height: Screen.height + width: Screen.width + + Image { + anchors { fill: parent } + + source: config.BgSource + fillMode: Image.PreserveAspectCrop + clip: true + } + + Item { + anchors { + fill: parent + margins: config.Padding + } + + DateTimePanel { + anchors { + top: parent.top + right: parent.right + } + } + + LoginPanel { + anchors { fill: parent } + } + } +} diff --git a/config/sddm/scripts/disable.sh b/config/sddm/scripts/disable.sh new file mode 100755 index 00000000..b95c874d --- /dev/null +++ b/config/sddm/scripts/disable.sh @@ -0,0 +1,12 @@ +#!/bin/bash +figlet "Disable SDDM" +if [ -f /etc/systemd/system/display-manager.service ]; then + if gum confirm "Do you want to disable the current display manager?"; then + sudo rm /etc/systemd/system/display-manager.service + echo ":: Current display manager removed." + echo ":: Please reboot your system." + fi +else + echo ":: No Display Manager enabled." +fi +sleep 3 diff --git a/config/sddm/scripts/enable.sh b/config/sddm/scripts/enable.sh new file mode 100755 index 00000000..6383ed68 --- /dev/null +++ b/config/sddm/scripts/enable.sh @@ -0,0 +1,12 @@ +#!/bin/bash +figlet "Enable SDDM" +if [ -f /etc/systemd/system/display-manager.service ]; then + echo ":: Display Manager is already enabled." +else + if gum confirm "Do you want to enable SDDM as your display manager?"; then + sudo systemctl enable sddm.service + echo ":: Display manager SDDM has been enabled." + echo ":: Please reboot your system!" + fi +fi +sleep 3 diff --git a/config/sddm/scripts/wallpaper.sh b/config/sddm/scripts/wallpaper.sh new file mode 100755 index 00000000..f8a0b36d --- /dev/null +++ b/config/sddm/scripts/wallpaper.sh @@ -0,0 +1,31 @@ +#!/bin/bash +cache_file="$HOME/.cache/current_wallpaper" +if [ ! -d /etc/sddm.conf.d/ ]; then + sudo mkdir /etc/sddm.conf.d + echo "Folder /etc/sddm.conf.d created." +fi + +cp $HOME/dotfiles/sddm/sddm.conf /etc/sddm.conf.d/ +cp $HOME/dotfiles/sddm/sddm.conf /etc/ +if [ "$1" != "init" ]; then + echo "File /etc/sddm.conf.d/sddm.conf updated." +fi + +current_wallpaper=$(cat "$cache_file") +extension="${current_wallpaper##*.}" + +cp $current_wallpaper /usr/share/sddm/themes/corners/backgrounds/current_wallpaper.$extension + +if [ "$1" != "init" ]; then + echo "Current wallpaper copied into /usr/share/sddm/themes/corners/backgrounds/" +fi + +new_wall=$(echo $current_wallpaper | sed "s|$HOME/wallpaper/||g") +cp $HOME/.cache/material/colors-sddm-style.conf /usr/share/sddm/themes/corners/theme.conf +sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.$extension"'/' /usr/share/sddm/themes/corners/theme.conf + +if [ "$1" != "init" ]; then + echo "File theme.conf updated in /usr/share/sddm/themes/corners/" + + echo "DONE! Please logout to test sddm." +fi diff --git a/config/sddm/sddm.conf b/config/sddm/sddm.conf new file mode 100644 index 00000000..7d30d16e --- /dev/null +++ b/config/sddm/sddm.conf @@ -0,0 +1,138 @@ +[Autologin] +# Whether sddm should automatically log back into sessions when they exit +Relogin=false + +# Name of session file for autologin session (if empty try last logged in) +Session= + +# Username for autologin session +User= + +[General] +# Which display server should be used. +# Valid values are: x11, x11-user, wayland. Wayland support is experimental +DisplayServer=x11 + +# Comma-separated list of environment variables to be set +GreeterEnvironment= + +# Halt command +HaltCommand=/usr/bin/systemctl poweroff + +# Input method module +InputMethod= + +# Comma-separated list of Linux namespaces for user session to enter +Namespaces= + +# Initial NumLock state. Can be on, off or none. +# If property is set to none, numlock won't be changed +# NOTE: Currently ignored if autologin is enabled. +Numlock=none + +# Reboot command +RebootCommand=/usr/bin/systemctl reboot + + +[Theme] +# Current theme name +Current=corners + +# Cursor size used in the greeter +CursorSize=24 + +# Cursor theme used in the greeter +CursorTheme=Bibata-Modern-Ice + +# Number of users to use as threshold +# above which avatars are disabled +# unless explicitly enabled with EnableAvatars +DisableAvatarsThreshold=7 + +# Enable display of custom user avatars +EnableAvatars=false + +# Global directory for user avatars +# The files should be named .face.icon +FacesDir=/usr/share/sddm/faces + +# Font used in the greeter +Font= + +# Theme directory path +# ThemeDir=/usr/share/sddm/themes +ThemeDir=/usr/share/sddm/themes + +[Users] +# Default $PATH for logged in users +DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin + +# Comma-separated list of shells. +# Users with these shells as their default won't be listed +HideShells= + +# Comma-separated list of users that should not be listed +HideUsers= + +# Maximum user id for displayed users +MaximumUid=60513 + +# Minimum user id for displayed users +MinimumUid=1000 + +# Remember the session of the last successfully logged in user +RememberLastSession=true + +# Remember the last successfully logged in user +RememberLastUser=true + +# When logging in as the same user twice, restore the original session, rather than create a new one +ReuseSession=true + + +[Wayland] +# Path of the Wayland compositor to execute when starting the greeter +CompositorCommand=weston --shell=fullscreen-shell.so + +# Enable Qt's automatic high-DPI scaling +EnableHiDPI=true + +# Path to a script to execute when starting the desktop session +SessionCommand=/usr/share/sddm/scripts/wayland-session + +# Comma-separated list of directories containing available Wayland sessions +SessionDir=/usr/local/share/wayland-sessions,/usr/share/wayland-sessions + +# Path to the user session log file +SessionLogFile=.local/share/sddm/wayland-session.log + + +[X11] +# Path to a script to execute when starting the display server +DisplayCommand=/usr/share/sddm/scripts/Xsetup + +# Path to a script to execute when stopping the display server +DisplayStopCommand=/usr/share/sddm/scripts/Xstop + +# Enable Qt's automatic high-DPI scaling +EnableHiDPI=true + +# Arguments passed to the X server invocation +ServerArguments=-nolisten tcp + +# Path to X server binary +ServerPath=/usr/bin/X + +# Path to a script to execute when starting the desktop session +SessionCommand=/usr/share/sddm/scripts/Xsession + +# Comma-separated list of directories containing available X sessions +SessionDir=/usr/local/share/xsessions,/usr/share/xsessions + +# Path to the user session log file +SessionLogFile=.local/share/sddm/xorg-session.log + +# Path to Xephyr binary +XephyrPath=/usr/bin/Xephyr + + diff --git a/setup b/setup index 3916e3de..f28a4b57 100755 --- a/setup +++ b/setup @@ -101,6 +101,7 @@ pkg=( hyprlock hypridle sddm + sddm-theme-corners-git xdg-user-dirs # AGS @@ -492,7 +493,12 @@ sudo tee /etc/sddm.conf.d/theme.conf <