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
37 changes: 26 additions & 11 deletions pkgbuild/pkgbuild.install
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,36 @@

## arg 1: the new package version
post_install() {
if [ ! -e "/etc/systemd/user/default.target.wants/sddm-wallpaper.path" ];then
ln -s /usr/lib/systemd/user/sddm-wallpaper.path /etc/systemd/user/default.target.wants/sddm-wallpaper.path
fi
systemctl --global enable sddm-wallpaper.path
Comment thread
bigbruno marked this conversation as resolved.
Resolved
# Each user's sddm-wallpaper.service copies their wallpaper over it.
chmod 666 /usr/share/sddm/wallpaper/image.png
user=$(awk -F':' '{ if ($3 >= 1000 && $1 != "nobody") print $1 }' /etc/passwd | head -n1)
sudo -u $user XDG_RUNTIME_DIR=/run/user/$(id -u $user) systemctl --user daemon-reload
sudo -u $user XDG_RUNTIME_DIR=/run/user/$(id -u $user) systemctl -q --user start sddm-wallpaper.service

systemctl enable --now sddm-fix.service

# Generated by big-first-boot and the live session, with x11 after sddm-verify.
# It would override sddm-theme-biglinux.conf and start maliit-keyboard, which
# is not installed. Other content is the administrator's.
wayland_config=/etc/sddm.conf.d/10-wayland.conf
generated='[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 --inputmethod maliit-keyboard'
if [ -f "$wayland_config" ] &&
[ "$(grep -v -e '^# Generated by big-first-boot;' -e '^# Generated by biglinux-livecd;' "$wayland_config" |
sed 's/^DisplayServer=x11$/DisplayServer=wayland/')" = "$generated" ]; then
rm -f "$wayland_config"
fi
}

## arg 2: the old package version
#pre_upgrade() {
# do something here
#}
pre_upgrade() {
# sddm-fix.service wanted sddm.service; drop its enablement while the unit exists.
if [ -e /usr/lib/systemd/system/sddm-fix.service ]; then
systemctl disable --no-reload sddm-fix.service
fi
# The X11 greeter's NumLock setting, written by sddm-fix.
rm -f /etc/sddm.conf.d/enable_numlock.conf
}

## arg 2: the old package version
post_upgrade() {
Expand Down
18 changes: 0 additions & 18 deletions sddm-theme-biglinux/usr/bin/sddm-fix
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ if [ ! -e "/usr/share/sddm/wallpaper/image.png" ];then
cp "$(grep -m1 -Po "(?<=^Image=).*" "/home/$user/.config/plasma-org.kde.plasma.desktop-appletsrc" | tr -d '"' | tr -d ';')" /usr/share/sddm/wallpaper/image.png
fi

OLD_IFS=$IFS
IFS=$'\n'
for user in $(awk -F':' '{ if ($3 >= 1000 && $1 != "nobody") print $1 }' /etc/passwd); do
if [ ! -e "/var/lib/AccountsService/icons/$user" ];then
cp "$(shuf -n 1 -e $(ls /usr/share/plasma/avatars/*.png))" /var/lib/AccountsService/icons/$user
fi
done
IFS=$OLD_IFS


##### Numlock #######
# Verify if last login user select auto enable numlock in kwin
if grep -qi "NumLock=0" "/home/$(grep User= /var/lib/sddm/state.conf | sed 's|User=||g;s| ||g')/.config/kcminputrc"; then
Expand All @@ -43,11 +33,3 @@ else
fi

fi

# Numlock X11
if [[ "$NumLockUser" = "true" ]]; then
echo '[General]
Numlock=on' > /etc/sddm.conf.d/enable_numlock.conf
else
rm -f /etc/sddm.conf.d/enable_numlock.conf
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# A file in /etc/sddm.conf.d overrides these values.
[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1 --inputmethod plasma-keyboard
11 changes: 0 additions & 11 deletions sddm-theme-biglinux/usr/lib/systemd/system/sddm-fix.service

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Part of sddm.service rather than a unit of its own, so that it runs only where
# SDDM is the display manager and never starts SDDM itself.
[Service]
ExecStartPre=-/usr/bin/sddm-fix
3 changes: 2 additions & 1 deletion sddm-theme-biglinux/usr/lib/systemd/user/sddm-wallpaper.path
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=SDDM change WallPaper
ConditionUser=!root
# System accounts, the greeter's among them, have no desktop.
ConditionUser=!@system

[Path]
PathModified=%h/.config/plasma-org.kde.plasma.desktop-appletsrc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Unit]
Description=SDDM change WallPaper
ConditionUser=!root
ConditionUser=!@system
# Plasma writes its settings several times per change; a start limit would fail
# the path unit and end the sync for the session.
StartLimitIntervalSec=0

[Service]
Type=oneshot
ExecStart=/usr/share/sddm/wallpaper/change-wallpaper.sh

[Install]
WantedBy=default.target
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Drops the KDE mascot avatars and stock photos plasma-workspace ships, leaving
# the BigLinux avatars as the choice offered for new accounts.

rm /usr/share/plasma/avatars/*Konqi*
rm /usr/share/plasma/avatars/*Katie*
rm -r /usr/share/plasma/avatars/photos
rm -rf /usr/share/plasma/avatars/*Konqi* /usr/share/plasma/avatars/*Katie* /usr/share/plasma/avatars/photos
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ cp -f /usr/share/biglinux/themes/biglinux-dark/.config/plasmarc /var/lib/sddm/.c
cp -f /etc/skel/.config/kcminputrc /var/lib/sddm/.config/kcminputrc

chown -R sddm:sddm /var/lib/sddm/
cp -f /usr/share/sddm/scripts/Xsetup-big /usr/share/sddm/scripts/Xsetup

# Revert fix from update 0.20.0-2
if grep -q 'InputMethod=qtvirtualkeyboard,compose *$' /etc/sddm.conf; then
sed -i 's|InputMethod=qtvirtualkeyboard,compose|InputMethod=qtvirtualkeyboard|g' /etc/sddm.conf
fi
19 changes: 0 additions & 19 deletions sddm-theme-biglinux/usr/share/sddm/scripts/Xsetup-big

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Item {
width: parent.width
source: config.type == "color" || !config.background ? config.auto_background : config.background
asynchronous: false
// Decoded at the screen's size and cropped like the Plasma desktop.
sourceSize: Qt.size(width * Screen.devicePixelRatio, height * Screen.devicePixelRatio)
fillMode: Image.PreserveAspectCrop
cache: true
clip: true
visible: true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Loader {
state = state === "hidden" ? "visible" : "hidden";
}

source: Qt.platform.pluginName.includes("wayland")
? Qt.resolvedUrl("./VirtualKeyboard_wayland.qml")
: Qt.resolvedUrl("./VirtualKeyboard.qml")
source: Qt.resolvedUrl("./VirtualKeyboard_wayland.qml")

onKeyboardActiveChanged: {
if (keyboardActive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Item {
width: parent.width
source: config.type == "color" || !config.background ? config.auto_background : config.background
asynchronous: false
// Decoded at the screen's size and cropped like the Plasma desktop.
sourceSize: Qt.size(width * Screen.devicePixelRatio, height * Screen.devicePixelRatio)
fillMode: Image.PreserveAspectCrop
cache: true
clip: true
visible: true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Loader {
state = state === "hidden" ? "visible" : "hidden";
}

source: Qt.platform.pluginName.includes("wayland")
? Qt.resolvedUrl("./VirtualKeyboard_wayland.qml")
: Qt.resolvedUrl("./VirtualKeyboard.qml")
source: Qt.resolvedUrl("./VirtualKeyboard_wayland.qml")

onKeyboardActiveChanged: {
if (keyboardActive) {
Expand Down
Loading
Loading