| 1 | #!/bin/sh -e |
| 2 | |
| 3 | . /usr/share/debconf/confmodule |
| 4 | |
| 5 | db_get debian-installer/theme |
| 6 | theme=$RET |
| 7 | |
| 8 | case "$theme" in |
| 9 | dark) |
| 10 | cat > /target/usr/share/glib-2.0/schemas/99_enable_accessibility_theme.gschema.override << END |
| 11 | # Setup by debian-installer (via finish-install.d/06rootskel) since |
| 12 | # dark theme was enabled during initial installation |
| 13 | |
| 14 | [org.mate.Marco.general] |
| 15 | theme='HighContrastInverse' |
| 16 | |
| 17 | [org.mate.interface] |
| 18 | gtk-theme='HighContrastInverse' |
| 19 | gtk-key-theme='Default' |
| 20 | icon-theme='ContrastHigh' |
| 21 | |
| 22 | [org.gnome.desktop.interface] |
| 23 | cursor-theme='ContrastHigh' |
| 24 | gtk-theme='HighContrastInverse' |
| 25 | icon-theme='ContrastHigh' |
| 26 | |
| 27 | [org.gnome.desktop.wm.preferences] |
| 28 | theme='HighContrastInverse' |
| 29 | END |
| 30 | |
| 31 | # Install and enable compiz, to provide very good zoom support |
| 32 | if /bin/in-target dpkg -l mate-session-manager |
| 33 | then |
| 34 | apt-install compiz |
| 35 | cat > /target/usr/share/glib-2.0/schemas/15_rootskel.gschema.override << END |
| 36 | # Setup by debian-installer (via finish-install.d/06rootskel) since |
| 37 | # dark theme was enabled during initial installation |
| 38 | |
| 39 | [org.mate.session.required-components] |
| 40 | windowmanager='compiz' |
| 41 | END |
| 42 | db_get passwd/username |
| 43 | USERNAME="$RET" |
| 44 | if [ -n "$USERNAME" ] |
| 45 | then |
| 46 | /bin/in-target su -s /bin/sh -c "mkdir -p /home/$USERNAME/.config/compiz/compizconfig" "$USERNAME" |
| 47 | cat > /target/home/$USERNAME/.config/compiz/compizconfig/Default.ini << END |
| 48 | [ezoom] |
| 49 | s0_scale_mouse = true |
| 50 | s0_hide_original_mouse = true |
| 51 | s0_follow_focus = true |
| 52 | s0_always_center_mouse = true |
| 53 | END |
| 54 | /bin/in-target chown $USERNAME:$USERNAME /home/$USERNAME/.config/compiz/compizconfig/Default.ini |
| 55 | fi |
| 56 | fi |
| 57 | |
| 58 | in-target dpkg-trigger --no-await /usr/share/glib-2.0/schemas || true |
| 59 | in-target dpkg --triggers-only -a || true |
| 60 | |
| 61 | mkdir -p /target/etc/grub.d |
| 62 | cat > /target/etc/grub.d/06_dark_theme << END |
| 63 | # Setup by debian-installer (via finish-install.d/06rootskel) since |
| 64 | # dark theme was enabled during initial installation |
| 65 | |
| 66 | echo "set menu_color_normal=white/black" |
| 67 | echo "set menu_color_highlight=yellow/black" |
| 68 | echo "set color_normal=white/black" |
| 69 | echo "set color_highlight=yellow/black" |
| 70 | echo "background_image" |
| 71 | END |
| 72 | chmod +x /target/etc/grub.d/06_dark_theme |
| 73 | in-target update-grub || true |
| 74 | ;; |
| 75 | esac |
| 76 | |
| 77 | exit 0 |