You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

247 lines
8.3 KiB

#!/bin/bash
set -e # exit on error
set -o pipefail # exit on pipeline error
set -u # treat unset variable as error
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
GTKUI="2"
$APT_CMD update >>$OUTPUT 2>&1
if [ $DISTRIBUTION = "buster" ] && [ $GTKUI = "3" ]; then
$APT_CMD install $APT_OPTIONS \
gnupg curl >>$OUTPUT 2>&1
echo "deb http://mxrepo.com/mx/repo/ temp main" >>/etc/apt/sources.list
curl -L https://cyber-x.ru/wp-content/upload/mx19/mx19.gpg | sudo apt-key add -
$APT_CMD update >>$OUTPUT 2>&1
fi
echo "nodm nodm/enabled boolean true" | debconf-set-selections
echo "samba-common samba-common/dhcp boolean false" | debconf-set-selections
# install packages
if [ -f $SCRIPT_DIR/$PACKAGE_VARIANT.list ]; then
$APT_CMD install $APT_OPTIONS \
$(grep -vE "^\s*#" $SCRIPT_DIR/$PACKAGE_VARIANT.list | tr "\n" " ") >>$OUTPUT 2>&1
fi
# install packages
if [ $DISTRIBUTION = "stretch" ]; then
wget -c http://ftp.ru.debian.org/debian/pool/main/e/elementary-xfce/elementary-xfce-icon-theme_0.15.2-1_all.deb
$APT_CMD install $APT_OPTIONS \
./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1
rm -f ./elementary-xfce-icon-theme_0.15.2-1_all.deb >>$OUTPUT 2>&1
else
$APT_CMD install $APT_OPTIONS \
elementary-xfce-icon-theme >>$OUTPUT 2>&1
fi
if [ $DISTRIBUTION = "buster" ] && [ $GTKUI = "3" ]; then
sed -i "s,deb http://mxrepo.com/mx/repo/ temp main,#deb http://mxrepo.com/mx/repo/ temp main,g" /etc/apt/sources.list
$APT_CMD update >>$OUTPUT 2>&1
fi
if [ $DISTRIBUTION = "bullseye" ]; then
$APT_CMD install $APT_OPTIONS \
librsvg2-common >>$OUTPUT 2>&1
fi
if grep xfce4-whiskermenu-plugin $SCRIPT_DIR/$PACKAGE_VARIANT.list >>$OUTPUT 2>&1; then
if [ $DISTRIBUTION = "buster" ] || [ $DISTRIBUTION = "stretch" ]; then
echo "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
elif [ $DISTRIBUTION = "bullseye" ]; then
echo "favorites=xfce4-terminal-emulator.desktop,xfce4-file-manager.desktop,xfce4-web-browser.desktop,xfce4-mail-reader.desktop" >/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
fi
cat <<EOF >>/etc/skel/.config/xfce4/panel/whiskermenu-1.rc
recent=
button-icon=/usr/share/pixmaps/MiniOS-white.svg
button-single-row=false
show-button-title=false
show-button-icon=true
launcher-show-name=true
launcher-show-description=false
launcher-show-tooltip=true
item-icon-size=2
hover-switch-category=false
category-show-name=true
category-icon-size=1
load-hierarchy=false
view-as-icons=false
default-category=0
recent-items-max=10
favorites-in-recent=true
position-search-alternate=true
position-commands-alternate=false
position-categories-alternate=true
stay-on-focus-out=false
confirm-session-command=true
menu-width=450
menu-height=500
menu-opacity=100
command-settings=xfce4-settings-manager
show-command-settings=false
command-lockscreen=xflock4
show-command-lockscreen=false
command-switchuser=dm-tool switch-to-greeter
show-command-switchuser=false
command-logoutuser=xfce4-session-logout --logout --fast
show-command-logoutuser=false
command-restart=xfce4-session-logout --reboot --fast
show-command-restart=false
command-shutdown=xfce4-session-logout --halt --fast
show-command-shutdown=false
command-suspend=xfce4-session-logout --suspend
show-command-suspend=false
command-hibernate=xfce4-session-logout --hibernate
show-command-hibernate=false
command-logout=xfce4-session-logout
show-command-logout=true
command-menueditor=menulibre
show-command-menueditor=true
command-profile=mugshot
show-command-profile=false
search-actions=5
[action0]
name=Man Pages
pattern=#
command=exo-open --launch TerminalEmulator man %s
regex=false
[action1]
name=Web Search
pattern=?
command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u
regex=false
[action2]
name=Wikipedia
pattern=!w
command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u
regex=false
[action3]
name=Run in Terminal
pattern=!
command=exo-open --launch TerminalEmulator %s
regex=false
[action4]
name=Open URI
pattern=^(file|http|https):\\/\\/(.*)$
command=exo-open \\0
regex=true
EOF
else
cat <<EOF >/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=8;x=512;y=752"/>
<property name="length" type="uint" value="100"/>
<property name="position-locked" type="bool" value="true"/>
<property name="size" type="uint" value="34"/>
<property name="background-alpha" type="uint" value="90"/>
<property name="mode" type="uint" value="0"/>
<property name="enter-opacity" type="uint" value="100"/>
<property name="leave-opacity" type="uint" value="100"/>
<property name="plugin-ids" type="array">
<value type="int" value="1"/>
<value type="int" value="2"/>
<value type="int" value="3"/>
<value type="int" value="4"/>
<value type="int" value="5"/>
<value type="int" value="6"/>
<value type="int" value="7"/>
<value type="int" value="8"/>
<value type="int" value="9"/>
<value type="int" value="10"/>
<value type="int" value="12"/>
<value type="int" value="13"/>
<value type="int" value="14"/>
</property>
</property>
<property name="dark-mode" type="bool" value="true"/>
</property>
<property name="plugins" type="empty">
<property name="plugin-1" type="string" value="applicationsmenu">
<property name="button-icon" type="string" value="/usr/share/pixmaps/MiniOS-white.svg"/>
<property name="show-button-title" type="bool" value="false"/>
</property>
<property name="plugin-2" type="string" value="separator">
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-3" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="TerminalEmulator.desktop"/>
</property>
</property>
<property name="plugin-4" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="FileManager.desktop"/>
</property>
</property>
<property name="plugin-5" type="string" value="launcher">
<property name="items" type="array">
<value type="string" value="WebBrowser.desktop"/>
</property>
</property>
<property name="plugin-6" type="string" value="separator">
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-7" type="string" value="tasklist">
<property name="show-handle" type="bool" value="false"/>
<property name="flat-buttons" type="bool" value="true"/>
<property name="show-labels" type="bool" value="true"/>
<property name="grouping" type="uint" value="1"/>
</property>
<property name="plugin-8" type="string" value="separator">
<property name="style" type="uint" value="0"/>
<property name="expand" type="bool" value="true"/>
</property>
<property name="plugin-9" type="string" value="xkb">
<property name="display-type" type="uint" value="2"/>
<property name="display-name" type="uint" value="0"/>
<property name="group-policy" type="uint" value="0"/>
</property>
<property name="plugin-10" type="string" value="battery"/>
<property name="plugin-12" type="string" value="systray">
<property name="known-legacy-items" type="array">
<value type="string" value="task manager"/>
<value type="string" value="volumeicon"/>
<value type="string" value="networkmanager applet"/>
</property>
</property>
<property name="plugin-13" type="string" value="clock">
<property name="digital-format" type="string" value="%_H:%M"/>
</property>
<property name="plugin-14" type="string" value="showdesktop"/>
</property>
</channel>
EOF
fi
if [ $PACKAGE_VARIANT = "minimal" ]; then
cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xterm
FileManager=pcmanfm
WebBrowser=
EOF
elif [ $PACKAGE_VARIANT = "standard" ]; then
cat <<EOF >/etc/skel/.config/xfce4/helpers.rc
TerminalEmulator=xterm
FileManager=Thunar
WebBrowser=
EOF
fi