aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/switch-themes
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/switch-themes')
-rwxr-xr-xscripts/switch-themes42
1 files changed, 9 insertions, 33 deletions
diff --git a/scripts/switch-themes b/scripts/switch-themes
index 083ea95..8c0e644 100755
--- a/scripts/switch-themes
+++ b/scripts/switch-themes
@@ -5,13 +5,13 @@
# Public License (GPL)
# $Id$
-bootsplashdir=/usr/share/bootsplash
+plymouthdir=/usr/share/plymouth
sysconfig=/etc/sysconfig/bootsplash
bootdir=/boot
function list_available_themes () {
local basename=
- for i in $bootsplashdir/themes/*;do
+ for i in $plymouthdir/themes/*;do
basename=${i##*/}
echo $basename
done
@@ -31,30 +31,6 @@ function read_link () {
perl -e '{print readlink shift, "\n"}' $1
}
-function lilo_switch_themes () {
- local theme=$1
- local message_from_theme=$bootsplashdir/themes/$theme/lilo/message
- local message_from_current=$bootdir/lilo/message
-
- #checking
- if [[ ! -f $message_from_theme ]];then
- return;
- fi
-
- #Make sure to point on lilo-graphic
- if [[ -L $bootdir/message ]];then
- point_to=$(read_link $bootdir/message)
- if [[ $point_to != message-graphic ]];then
- rm -f $bootdir/message
- ln -s message-graphic $bootdir/message
- fi
- fi
-
- if ! cmp -s $message_from_theme $message_from_current;then
- cp -f $message_from_theme $bootdir/message-graphic
- fi
-}
-
function grub_switch_themes () {
if [ -x /usr/sbin/grub-gfxmenu ]; then
/usr/sbin/grub-gfxmenu --update-theme
@@ -81,8 +57,13 @@ function update () {
rm -f /usr/share/gfxboot/themes/current
ln -s $theme /usr/share/gfxboot/themes/current
- rm -f $bootsplashdir/current
- ln -s $theme $bootsplashdir/current
+ if [[ -z $update ]]; then
+ /usr/sbin/plymouth-set-default-theme $theme
+ fi
+
+ [ -f /usr/lib/libDrakX/Xconfig/resolution_and_depth.pm ] && perl -I/usr/lib/libDrakX -MXconfig::xfree -MXconfig::resolution_and_depth -e 'Xconfig::resolution_and_depth::set_default_background(Xconfig::xfree->read->get_resolution)'
+
+
}
function switch_theme () {
@@ -111,13 +92,8 @@ function switch_theme () {
echo "THEME=$toswitch" >> $sysconfig
fi
rm -f $tmpfile
- if [[ -d /etc/bootsplash/themes/$toswitch ]]; then
- rm -f /etc/bootsplash/themes/current
- ln -s $toswitch /etc/bootsplash/themes/current
- fi
update $toswitch
fi
- #lilo_switch_themes $toswitch
grub_switch_themes $toswitch
}