Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
674 changes: 674 additions & 0 deletions ultramarine/budgie-sddm-switch/LICENSE

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ultramarine/budgie-sddm-switch/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project "pkg" {
rpm {
spec = "budgie-sddm-switch.spec"
sources = "."
Comment thread
nothingneko marked this conversation as resolved.
}
}
42 changes: 42 additions & 0 deletions ultramarine/budgie-sddm-switch/budgie-sddm-switch.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Name: budgie-sddm-switch
Version: 1.0
Release: 1%{?dist}
Summary: LightDM/Slick config + SDDM switching for Ultramarine Budgie

License: GPL-3.0-or-later
URL: https://ultramarine-linux.org
Source0: slick-greeter-budgie.conf
Source1: sddm-warning.sh
Source2: switch2sddm.sh
Source3: sddm-warning.desktop
Source4: LICENSE

Requires: ultramarine-budgie-filesystem bash sddm libnotify xdg-utils
Requires: ultramarine-release-identity-budgie >= 43

%description
This package is for the LightDM->SDDM switch on Budgie Edition in UM44, we don't automatically migrate users, so this package exists to avoid breaking systems.

This package does 3 things:
- Provides the Budgie LightDM configs
- Notifies the user on every login that they should switch to SDDM
- Gives the user a command to switch to SDDM and stop the notifications

%install
install -Dm644 %{SOURCE0} %{buildroot}%{_sysconfdir}/lightdm/lightdm.conf.d/50-ultramarine-budgie-slick-greeter.conf
install -Dm755 %{SOURCE1} %{buildroot}%{_libexecdir}/sddm-warning
install -Dm755 %{SOURCE2} %{buildroot}%{_bindir}/switch2sddm
install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xdg/autostart/sddm-warning.desktop
install -Dm644 %{S:4} %{buildroot}%{_defaultlicensedir}/%{name}/LICENSE

%files
%{_sysconfdir}/lightdm/lightdm.conf.d/50-ultramarine-budgie-slick-greeter.conf
%{_libexecdir}/sddm-warning
%{_sbindir}/switch2sddm
%{_sysconfdir}/xdg/autostart/sddm-warning.desktop
%license %{_defaultlicensedir}/%{name}/LICENSE


%changelog
* Sun May 31 2025 Jaiden Riordan <jade@fyralabs.com> - 1
- Initial package
6 changes: 6 additions & 0 deletions ultramarine/budgie-sddm-switch/sddm-warning.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=Budgie SDDM Warning
Exec=/usr/libexec/sddm-warning.sh
NoDisplay=true
X-GNOME-Autostart-enabled=true
24 changes: 24 additions & 0 deletions ultramarine/budgie-sddm-switch/sddm-warning.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

CHECKFILE="/etc/sddm-switched"

[[ -f "$CHECKFILE" ]] && exit 0

# If SDDM is already the default DM, mark done and exit silently
DM_LINK=$(readlink -f /etc/systemd/system/display-manager.service 2>/dev/null || true)
DM=$(basename "$DM_LINK" .service)

if [[ "$DM" == "sddm" ]]; then
pkexec touch "$CHECKFILE"
exit 0
fi

(action=$(notify-send --wait \
--urgency=critical \
--app-icon=ultramarine \
--app-name="Ultramarine System" \
--action="default=Open Wiki" \
"Upgrade Display Manager" \
"Ultramarine Budgie is switching to the SDDM display manager, if you don't switch, you won't be able to update to the next release. Click this notification to open the wiki.") \
&& [[ "$action" == "default" ]] \
&& xdg-open "https://wiki.ultramarine-linux.org/en/release/budgie-sddm") &
39 changes: 39 additions & 0 deletions ultramarine/budgie-sddm-switch/slick-greeter-budgie.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# LightDM Slick Configuration
# Available configuration options listed below.
#
# Appearance:
# theme-name = GTK+ theme to use
# icon-theme-name = Icon theme to use
# background = Background file to use, either an image path or a color (e.g. #772953)
# draw-user-backgrounds = false|true ("true" by default) Display user background (if available)
#
# Fonts:
# font-name = Font to use
# xft-antialias = false|true Whether to antialias Xft fonts
# xft-dpi = Resolution for Xft in dots per inch (e.g. 96)
# xft-hintstyle = none|slight|medium|hintfull What degree of hinting to use
# xft-rgba = none|rgb|bgr|vrgb|vbgr Type of subpixel antialiasing

[Greeter]
#background=/usr/share/backgrounds/default.png
#background-color=#000000
draw-user-backgrounds=true
draw-grid=true
show-hostname=true
#logo=
#background-logo=
theme-name=Fluent-round-Dark
icon-theme-name=Fluent
#font-name=Noto Sans 11
#xft-antialias=true
#xft-dpi=96
#xft-hintstyle=hintslight
#xft-rgba=rgb
#onscreen-keyboard=false
#high-contrast=false
#screen-reader=false
play-ready-sound=true
#hidden-users=
#group-filter=
#idle-timeout=300
enable-hidpi=auto
47 changes: 47 additions & 0 deletions ultramarine/budgie-sddm-switch/switch2sddm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bash

set -euo pipefail

CHECKFILE="/etc/sddm-switched"

if [[ -f "$CHECKFILE" ]]; then
echo "You're already on SDDM, if you're still getting the notification, get support or file an issue."
read -p "Press Enter to open Community page on the Wiki, or Ctrl+C to exit" && xdg-open "https://wiki.ultramarine-linux.org/en/community/community"
exit 0
fi

DM_LINK=$(readlink -f /etc/systemd/system/display-manager.service 2>/dev/null || true)
DM=$(basename "$DM_LINK" .service)

if [[ "$DM" == "sddm" ]]; then
echo "SDDM is already the default display manager."
pkexec touch "$CHECKFILE"
exit 0
fi

if [[ "$DM" != "lightdm" ]]; then
echo "You're not on lightdm, seeing '${DM:-unknown}'. If you know what you're doing stop here, otherwise get help on Discord." >&2
Comment thread
nothingneko marked this conversation as resolved.
read -p "Press Enter to open Community page on the Wiki, or Ctrl+C to exit" && xdg-open "https://wiki.ultramarine-linux.org/en/community/community"
exit 1
fi

echo "Disable LightDM"
systemctl disable lightdm.service

echo "Enable SDDM"
systemctl enable sddm.service

echo "Disable Notification"
pkexec touch "$CHECKFILE"

echo ""
echo "All Done!"
echo "Your device needs to restart"
notify-send --wait \
--urgency=critical \
--app-icon=ultramarine \
--app-name="Ultramarine System" \
"Switch Complete" \
"Save your work and return to the terminal to restart your device"
read -p "Save your work and press enter when you're ready to reboot" && pkexec systemctl soft-reboot
# we're gonna test this with a soft reboot