Skip to content

Commit

Permalink
feat(aurora): Add Kde branding via a theme (ublue-os#1140)
Browse files Browse the repository at this point in the history
Co-authored-by: Niklas <40402114+NiHaiden@users.noreply.github.com>
  • Loading branch information
m2Giles and NiHaiden authored Apr 21, 2024
1 parent 1abb6d5 commit 173c5d5
Show file tree
Hide file tree
Showing 17 changed files with 211 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build_files/base/aurora-changes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set -oue pipefail

if [[ "${BASE_IMAGE_NAME}" = "kinoite" ]]; then
ln -sf ../places/distributor-logo.svg /usr/share/icons/hicolor/scalable/apps/start-here.svg
sed -i 's@ColorScheme=BreezeLight@ColorScheme=BreezeDark@' /usr/share/plasma/look-and-feel/org.fedoraproject.fedora.desktop/contents/defaults
sed -i 's@Image=Fedora@Image=/usr/share/wallpapers/jonaton-pie-aurora.jpg@' /usr/share/plasma/look-and-feel/org.fedoraproject.fedora.desktop/contents/defaults
ln -sf jonatan-pie-aurora.png /usr/share/backgrounds/default.png
ln -sf greg-rakozy-aurora.png /usr/share/backgrounds/default-dark.png
ln -sf aurora.xml /usr/share/backgrounds/default.xml
sed -i '/<entry name="launchers" type="StringList">/,/<\/entry>/ s/<default>[^<]*<\/default>/<default>preferred:\/\/browser,applications:org.gnome.Ptyxis.desktop,applications:org.kde.discover.desktop,preferred:\/\/filemanager<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
sed -i '/<entry name="favorites" type="StringList">/,/<\/entry>/ s/<default>[^<]*<\/default>/<default>preferred:\/\/browser,systemsettings.desktop,org.kde.dolphin.desktop,org.kde.kate.desktop,org.gnome.Ptyxis.desktop,org.kde.discover.desktop<\/default>/' /usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/config/main.xml
sed -i 's@Exec=ptyxis@Exec=kde-ptyxis@g' /usr/share/applications/org.gnome.Ptyxis.desktop
Expand Down
1 change: 1 addition & 0 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"kinoite": [
"libadwaita-qt5",
"libadwaita-qt6",
"kde-runtime-docs",
"kdeplasma-addons",
"plasma-wallpapers-dynamic"
],
Expand Down
6 changes: 6 additions & 0 deletions system_files/kinoite/usr/etc/xdg/kdeglobals
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[KDE]
LookAndFeelPackage=dev.getaurora.aurora.desktop

[KDE Control Module Restrictions][$i]
kcm_plymouth.desktop=false

[General]
TerminalApplication=kde-ptyxis
TerminalService=org.gnome.Ptyxis.desktop
38 changes: 38 additions & 0 deletions system_files/kinoite/usr/share/backgrounds/aurora.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<background>
<starttime>
<year>2024</year>
<month>04</month>
<day>23</day>
<hour>8</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- This animation will start at 8 AM. -->

<!-- We start with day at 8 AM. It will remain up for 10 hours. -->
<static>
<duration>36000.0</duration>
<file>/usr/share/backgrounds/default.png</file>
</static>

<!-- Day ended and starts to transition to night at 6 PM. The transition lasts for 2 hours, ending at 8 PM. -->
<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/default.png</from>
<to>/usr/share/backgrounds/default-dark.png</to>
</transition>

<!-- It's 8 PM, we're showing the night till 6 AM. -->
<static>
<duration>36000.0</duration>
<file>/usr/share/backgrounds/default-dark.png</file>
</static>

<!-- It's 6 AM, and we're starting to transition to day. Transition completes at 8 AM. -->
<transition type="overlay">
<duration>7200.0</duration>
<from>/usr/share/backgrounds/default-dark.png</from>
<to>/usr/share/backgrounds/default.png</to>
</transition>

</background>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[kdeglobals][KDE]
widgetStyle=Breeze

[kdeglobals][General]
ColorScheme=BreezeDark

[kdeglobals][Icons]
Theme=breeze-dark

[plasmarc][Theme]
name=default

[kcminputrc][Mouse]
cursorTheme=breeze_cursors

[kwinrc][WindowSwitcher]
LayoutName=org.kde.breeze.desktop

[kwinrc][DesktopSwitcher]
LayoutName=org.kde.breeze.desktop

[kwinrc][org.kde.kdecoration2]
library=org.kde.breeze

[KSplash]
Theme=dev.getauorora.aurora
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
applet.wallpaperPlugin = 'org.kde.image'
applet.currentConfigGroup = ["Wallpaper", "org.kde.image", "General"]
applet.writeConfig("Image", "/usr/share/wallpapers/jonatan-pie-aurora.jpg")
applet.reloadConfig()
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
applet.currentConfigGroup = ["General"]
applet.writeConfig("icon", "distributor-logo")
applet.reloadConfig()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
systemtrayId = applet.readConfig("SystrayContainmentId");
if (systemtrayId) {
const systrayContainer = desktopById(systemtrayId);
systrayContainer.currentConfigGroup = ["General"];
systrayContainer.writeConfig("scaleIconsToFit", true);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
SPDX-FileCopyrightText: 2014 Marco Martin <mart@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/

import QtQuick 2.5
import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore

Rectangle {
id: root
color: "black"

property int stage

onStageChanged: {
if (stage == 2) {
introAnimation.running = true;
} else if (stage == 5) {
introAnimation.target = busyIndicator;
introAnimation.from = 1;
introAnimation.to = 0;
introAnimation.running = true;
}
}

width: 1280
height: 800

Component.onCompleted: stage = 2

Item {
id: content
anchors.fill: parent
opacity: 0

Image {
id: logo
//match SDDM/lockscreen avatar positioning
property real size: PlasmaCore.Units.gridUnit * 24

anchors.centerIn: parent

source: "images/aurora_logo.svgz"

sourceSize.width: 128
sourceSize.height: 128
}

// TODO: port to PlasmaComponents3.BusyIndicator
Image {
id: busyIndicator
//in the middle of the remaining space
y: parent.height - (parent.height - logo.y) / 3 - height/2
anchors.horizontalCenter: parent.horizontalCenter
source: "images/busywidget.svgz"
sourceSize.height: PlasmaCore.Units.gridUnit * 2
sourceSize.width: PlasmaCore.Units.gridUnit * 2
RotationAnimator on rotation {
id: rotationAnimator
from: 0
to: 360
// Not using a standard duration value because we don't want the
// animation to spin faster or slower based on the user's animation
// scaling preferences; it doesn't make sense in this context
duration: 2000
loops: Animation.Infinite
// Don't want it to animate at all if the user has disabled animations
running: PlasmaCore.Units.longDuration > 1
}
}
}

OpacityAnimator {
id: introAnimation
running: false
target: content
from: 0
to: 1
duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Desktop Entry]
Comment=Aurora - Theme based on KDE BreezeDark
Name=Aurora
Type=Service

X-KDE-ServiceTypes=Plasma/LookAndFeel
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Universal-Blue
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Email=
X-KDE-PluginInfo-License=GPL-2.0+
X-KDE-PluginInfo-Name=dev.getaurora.aurora.desktop
X-KDE-PluginInfo-Version=0.01
X-KDE-PluginInfo-Website=
X-Plasma-MainScript=defaults
X-KDE-PluginInfo-License=GPLv2+
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"KPlugin": {
"Authors": [
{
"Email": "",
"Name": "Universal Blue"
}
],
"Category": "",
"Description": "Aurora - Theme variant of KDE BreezeDark",
"Id": "dev.getaurora.aurora.desktop",
"License": "GPLv2+",
"Name": "Aurora",
"ServiceTypes": [
"Plasma/LookAndFeel"
],
"Version": "0.01",
"Website": ""
},
"X-KDE-ParentApp": "",
"X-Plasma-MainScript": "defaults"
}

0 comments on commit 173c5d5

Please sign in to comment.