Skip to content
Open
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
16 changes: 12 additions & 4 deletions experience/cham-experience
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# GNOME files and only changes settings for the caller's desktop account.
set -euo pipefail

wallpaper='file:///usr/share/backgrounds/cham-linux/cham-horizon.svg'
wallpaper='file:///usr/share/backgrounds/cham-linux/cham-linux-default.jpeg'
icon='/usr/share/icons/hicolor/scalable/apps/cham-linux.svg'

has_key() {
Expand All @@ -26,9 +26,9 @@ reset_value() {

apply() {
set_value org.gnome.desktop.interface color-scheme "'prefer-dark'"
set_value org.gnome.desktop.interface gtk-theme "'Yaru-blue-dark'"
set_value org.gnome.desktop.interface icon-theme "'Yaru-blue'"
set_value org.gnome.desktop.interface accent-color "'blue'"
set_value org.gnome.desktop.interface gtk-theme "'Yaru-viridian-dark'"
set_value org.gnome.desktop.interface icon-theme "'Yaru-viridian'"
set_value org.gnome.desktop.interface accent-color "'viridian'"
set_value org.gnome.desktop.interface show-battery-percentage true
set_value org.gnome.desktop.interface clock-show-weekday true
set_value org.gnome.desktop.interface clock-show-seconds false
Expand All @@ -37,6 +37,10 @@ apply() {
set_value org.gnome.desktop.background picture-options "'zoom'"
set_value org.gnome.mutter edge-tiling true
set_value org.gnome.shell.extensions.dash-to-dock dash-max-icon-size 40
set_value org.gnome.shell.extensions.dash-to-dock background-color "'#1B1F23'"
set_value org.gnome.shell.extensions.dash-to-dock transparency-mode "'FIXED'"
set_value org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-color "'#1FE05E'"
set_value org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-border-color "'#1FE05E'"
set_value org.gnome.shell.extensions.dash-to-dock background-opacity 0.85
set_value org.gnome.shell.extensions.dash-to-dock apply-glossy-effect false
if has_key org.gnome.shell.extensions.arcmenu menu-button-text; then
Expand Down Expand Up @@ -70,6 +74,10 @@ reset() {
reset_value org.gnome.desktop.background picture-options
reset_value org.gnome.mutter edge-tiling
reset_value org.gnome.shell.extensions.dash-to-dock dash-max-icon-size
reset_value org.gnome.shell.extensions.dash-to-dock background-color
reset_value org.gnome.shell.extensions.dash-to-dock transparency-mode
reset_value org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-color
reset_value org.gnome.shell.extensions.dash-to-dock custom-theme-running-dots-border-color
reset_value org.gnome.shell.extensions.dash-to-dock background-opacity
reset_value org.gnome.shell.extensions.dash-to-dock apply-glossy-effect
reset_value org.gnome.shell.extensions.arcmenu menu-button-text
Expand Down
35 changes: 35 additions & 0 deletions packages/cham-core/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -1,7 +1,42 @@
#!/bin/sh
set -e

if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database -q /usr/share/applications || true
fi

if command -v glib-compile-schemas >/dev/null 2>&1; then
glib-compile-schemas /usr/share/glib-2.0/schemas/ || true
fi

if [ -f /usr/share/cham-linux/login-logo.png ] && [ -d /usr/share/plymouth ]; then
cp -n /usr/share/plymouth/ubuntu-logo.png /usr/share/plymouth/ubuntu-logo.png.bak 2>/dev/null || true
cp /usr/share/cham-linux/login-logo.png /usr/share/plymouth/ubuntu-logo.png || true
fi

if [ -f /usr/lib/os-release ]; then
cp -n /usr/lib/os-release /usr/lib/os-release.bak 2>/dev/null || true
sed -i 's/^PRETTY_NAME=.*/PRETTY_NAME="Cham Linux 0.1 (Noble)"/' /usr/lib/os-release || true
sed -i 's/^NAME=.*/NAME="Cham Linux"/' /usr/lib/os-release || true
sed -i 's/^LOGO=.*/LOGO=cham-linux/' /usr/lib/os-release || true
fi

if [ -f /usr/share/cham-linux/about-logo.png ] && [ -d /usr/share/pixmaps ]; then
for f in ubuntu-logo-text.png ubuntu-logo-text-dark.png; do
if [ -f "/usr/share/pixmaps/$f" ]; then
cp -n "/usr/share/pixmaps/$f" "/usr/share/pixmaps/${f}.bak" 2>/dev/null || true
cp /usr/share/cham-linux/about-logo.png "/usr/share/pixmaps/$f" || true
fi
done
fi

if [ -f /usr/share/plymouth/themes/cham-linux/cham-linux.plymouth ] && command -v update-alternatives >/dev/null 2>&1; then
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/cham-linux/cham-linux.plymouth 100 || true
update-alternatives --set default.plymouth /usr/share/plymouth/themes/cham-linux/cham-linux.plymouth || true
if command -v update-initramfs >/dev/null 2>&1; then
update-initramfs -u || true
fi
fi

/usr/lib/cham-linux/source-hygiene || true
exit 0
7 changes: 7 additions & 0 deletions packages/cham-core/etc/xdg/autostart/cham-daynight.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=Cham Linux Day/Night Wallpaper Switcher
Exec=/usr/bin/cham-daynight --daemon
Hidden=false
NoDisplay=true
X-GNOME-Autostart-enabled=true
51 changes: 51 additions & 0 deletions packages/cham-core/usr/bin/cham-daynight
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env bash
CONFIG_FILE="$HOME/.config/cham-daynight-enabled"

# Toggle commands (cham-daynight on | off | status)
if [ "$1" = "on" ]; then
mkdir -p "$HOME/.config"
echo "1" > "$CONFIG_FILE"
echo "Cham Auto Day/Night Wallpaper: ENABLED"
elif [ "$1" = "off" ]; then
mkdir -p "$HOME/.config"
echo "0" > "$CONFIG_FILE"
echo "Cham Auto Day/Night Wallpaper: DISABLED"
exit 0
elif [ "$1" = "status" ]; then
if [ -f "$CONFIG_FILE" ] && [ "$(cat "$CONFIG_FILE")" = "0" ]; then
echo "DISABLED"
else
echo "ENABLED"
fi
exit 0
fi

# Default is enabled unless explicitly turned off
if [ -f "$CONFIG_FILE" ] && [ "$(cat "$CONFIG_FILE")" = "0" ]; then
exit 0
fi

apply_theme_by_time() {
HOUR=$(date +%H)
# 06:00 AM to 05:59 PM (17:59) -> Light Mode
if [ "$HOUR" -ge 6 ] && [ "$HOUR" -lt 18 ]; then
gsettings set org.gnome.desktop.interface color-scheme 'default'
gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/cham-linux/Light-BG.jpg'
else
# 06:00 PM (18:00) to 05:59 AM -> Dark Mode (Eye-friendly)
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
gsettings set org.gnome.desktop.background picture-uri-dark 'file:///usr/share/backgrounds/cham-linux/Dark-BG.jpeg'
fi
}

# Loop mode for background autostart
if [ "$1" = "--daemon" ]; then
while true; do
if [ ! -f "$CONFIG_FILE" ] || [ "$(cat "$CONFIG_FILE")" != "0" ]; then
apply_theme_by_time
fi
sleep 300
done
else
apply_theme_by_time
fi
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.
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.
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,8 @@
[org.gnome.desktop.background]
picture-uri='file:///usr/share/backgrounds/cham-linux/Light-BG.jpg'
picture-uri-dark='file:///usr/share/backgrounds/cham-linux/Dark-BG.jpeg'
picture-options='zoom'

[org.gnome.desktop.screensaver]
picture-uri='file:///usr/share/backgrounds/cham-linux/Dark-BG.jpeg'
picture-options='zoom'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[org.gnome.desktop.background]
picture-uri='file:///usr/share/backgrounds/cham-linux/cham-linux-default.jpeg'
picture-uri-dark='file:///usr/share/backgrounds/cham-linux/cham-linux-default.jpeg'
picture-options='zoom'
primary-color='#1B1F23'
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Cham Linux Default</name>
<filename>/usr/share/backgrounds/cham-linux/Lightbg.jpeg</filename>
<filename-dark>/usr/share/backgrounds/cham-linux/Darkbg.jpeg</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#000000</pcolor>
<scolor>#000000</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>Cham Linux Classic</name>
<filename>/usr/share/backgrounds/cham-linux/Light-BG.jpg</filename>
<filename-dark>/usr/share/backgrounds/cham-linux/Dark-BG.jpeg</filename-dark>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#000000</pcolor>
<scolor>#000000</scolor>
</wallpaper>
</wallpapers>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Plymouth Theme]
Name=Cham Linux
Description=Cham Linux Boot Animation
ModuleName=script

[script]
ImageDir=/usr/share/plymouth/themes/cham-linux
ScriptFile=/usr/share/plymouth/themes/cham-linux/cham-linux.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Window.SetBackgroundTopColor(0.1059, 0.1176, 0.1294);
Window.SetBackgroundBottomColor(0.1059, 0.1176, 0.1294);

mode = Plymouth.GetMode();
sprite = Sprite();

if (mode == "shutdown" || mode == "reboot") {
logo_img = Image("shutdown-logo.png");
sprite.SetImage(logo_img);
sprite.SetX(Window.GetWidth() / 2 - logo_img.GetWidth() / 2);
sprite.SetY(Window.GetHeight() / 2 - logo_img.GetHeight() / 2);
} else {
total_frames = 240;
progress = 1;

for (i = 1; i <= total_frames; i++) {
if (i < 10)
num = "00" + i;
else if (i < 100)
num = "0" + i;
else
num = "" + i;

images[i] = Image("frame_" + num + ".png");
}

fun refresh_callback () {
if (progress <= total_frames) {
current_img = images[progress];
progress++;
} else {
current_img = images[total_frames];
}
sprite.SetImage(current_img);
sprite.SetX(Window.GetWidth() / 2 - current_img.GetWidth() / 2);
sprite.SetY(Window.GetHeight() / 2 - current_img.GetHeight() / 2);
}

Plymouth.SetRefreshFunction(refresh_callback);
}
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.