Update installer.sh
This commit is contained in:
parent
2acaf339e6
commit
7c6e408fa6
27
installer.sh
27
installer.sh
|
@ -3,30 +3,47 @@
|
|||
set -eou pipefail
|
||||
|
||||
# Create systemd user directory
|
||||
echo "Create systemd user directory."
|
||||
echo "Creating systemd user directory:"
|
||||
mkdir -vp ~/.config/systemd/user
|
||||
echo
|
||||
|
||||
# Copy unit files
|
||||
echo "Copy unit files."
|
||||
echo "Copying unit files:"
|
||||
cp -v theme-switcher.{service,timer} ~/.config/systemd/user
|
||||
echo
|
||||
|
||||
# Add username to service file
|
||||
echo "Edit service unit file."
|
||||
echo "Editing service unit file:"
|
||||
sed -i "s/username/$(whoami)/g" ~/.config/systemd/user/theme-switcher.service
|
||||
echo
|
||||
|
||||
# Make directory for scripts
|
||||
echo "Create script directory in /home."
|
||||
echo "Creating script directory in /home:"
|
||||
mkdir -vp ~/.theme-switcher
|
||||
echo
|
||||
|
||||
# Copy script file
|
||||
echo "Copy script into directory."
|
||||
echo "Copying script into directory:"
|
||||
cp -v *.sh ~/.theme-switcher
|
||||
echo
|
||||
|
||||
# Make script executable
|
||||
echo "Making script executable"
|
||||
chmod +x ~/.theme-switcher/theme-switcher.sh
|
||||
|
||||
# Create autostart directory
|
||||
echo "Creating autostart directory:"
|
||||
mkdir -vp ~/.config/autostart
|
||||
|
||||
# Copy autostart file
|
||||
echo "Copying autostart file:"
|
||||
cp -v theme-switcher.sh.desktop ~/.config/autostart
|
||||
|
||||
# Add username to autostart file
|
||||
echo "Editing autostart file:"
|
||||
sed -i "s/username/$(whoami)/g" ~/.config/autostart/theme-switcher.sh.desktop
|
||||
echo
|
||||
|
||||
# Enable and start timer
|
||||
echo "Enabling timer."
|
||||
systemctl --user enable theme-switcher.timer
|
||||
|
|
Loading…
Reference in New Issue