Update documentation explaining the source package

This commit is contained in:
Raphaël Hertzog 2019-11-06 21:29:33 +01:00
parent 6a0f135a11
commit bc1eb8987d
2 changed files with 38 additions and 35 deletions

View File

@ -1,41 +1,32 @@
# kali-themes # kali-themes
This package joins together files that were split across gnome-theme-kali, This package joins together all files that are related to theming
kali-defaults and desktop-base. and configuration of the visual appearance. They were formerly split
across gnome-theme-kali, kali-defaults and desktop-base.
The file structure has been revamped to make it easier to see everything
that needs to be provided.
## desktop-base integration ## desktop-base integration
To create a new theme that integrates well into desktop-base, you need to desktop-base integration is provided by kali-desktop-base through
provide appropriate files in the following directories: registration of various files in alternatives defined by the desktop-base
package. The files are not installed in /usr/share/desktop-base/
except for a symlink tree mimicking a "destkop-base theme". That symlink
tree is pre-built in the "desktop-base" directory in the source package.
* Wallpapers: background images in different resolutions with GNOME and The kali-themes-common package is also installing various symlinks
KDE meta-information. trees to mimick directories that are traditionnally handled by
* Gnome-Backgrounds: an XML file defining available wallpapers. desktop-base. Most notably the directories in /usr/share/wallpapers/ that
* Grub-Background: grub background image and other associated settings are used by KDE.
used by the default grub menu.
* LockScreen: wallpapers used by the screenlocker
* LoginScreen: wallpaper used on the login screen (GDM at least)
* Plymouth-Theme: theme used by plymouth (boot splash screen)
The following directories are also used by desktop-base but they don't ## configuration files
need any change for a new theme as the Kali logo and emblems are unlikely
to need any modification:
* emblems
* kali-logos
## Other integrations The configuration files stored in the "etc" sub-directory are installed
as is in the "kali-themes" package. However the files listed in
"files-to-divert" are first diverted by dpkg-divert and the actual
files are stored in /usr/share/kali-themes/etc/ and copied in their
target location by the postinst script (see debian/kali-themes.postinst).
* Color-Schemes: color schemes for various applications and widgets When you add a new file that needs to be diverted, you can update
* Window-Theme: Desktop/GTK themes the list in "files-to-divert" and run "debian/update-maintainer-scripts"
* Icon-Theme: various icon sets to update the list of files in the 3 maintainer scripts. But you also
* Grub-Theme: theme for Grub need to add a snippet in debian/kali-themes.preinst to setup the new
diversion on upgrade.
## TODO
* The "Backgrounds" directory needs to be replaced with proper
"Wallpapers".
* We should see whether the "Grub-Theme" directory can be folded
into "Grub-Background" in some way.

View File

@ -15,11 +15,20 @@ FILES_TO_DIVERT="
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml
" # END FILES_TO_DIVERT " # END FILES_TO_DIVERT
setup_diversion_on_upgrade() {
local prev_version="$1"
local ref_version="$2"
local file="$3"
if dpkg --compare-versions "$prev_version" lt "$ref_version"; then
setup_diversion "$file"
fi
}
setup_diversion() { setup_diversion() {
local file=$1 local file="$1"
dpkg-divert --rename --package kali-themes \ dpkg-divert --rename --package kali-themes \
--divert $file.original \ --divert "$file.original" \
--add $file --add "$file"
} }
case "$1" in case "$1" in
@ -39,6 +48,9 @@ case "$1" in
;; ;;
upgrade) upgrade)
# Dynamically add new diversions when required on upgrade # Dynamically add new diversions when required on upgrade
# Example to divert /etc/xdg/xfce4/panel/default.xml when you
# upgrade from a version older than 2019.4.6:
# setup_diversion_on_upgrade $2 2019.4.6 /etc/xdg/xfce4/panel/default.xml
;; ;;
esac esac