#!/bin/bash . /etc/profile #. /etc/systemconfig function msg(){ /usr/bin/notify-send --app-name="LinHES" --icon=dialog-information "$1" "$2" } function applyUIsettings(){ cp /usr/share/linhes/templates/plasma-org.kde.plasma.desktop-appletsrc ~/.config/ #restart plasma kquitapp5 plasmashell kstart5 plasmashell > /dev/null 2>&1 plasma-apply-colorscheme BreezeDark kwriteconfig5 --group KDE --key SingleClick false kwriteconfig5 --file ~/.config/kscreenlockerrc --group Daemon --key Autolock false kwriteconfig5 --file ~/.config/kscreenlockerrc --group Daemon --key LockOnResume false #disable file indexing balooctl disable sleep 2 plasma-apply-wallpaperimage /usr/share/linhes/templates/lights-bud-abstract-4k-cq.jpg msg "Welcome to LinHES 9!" } function make_nanorc(){ mkdir ~/.config/nano echo -e 'set tabsize 4\nset tabstospaces\ninclude "/usr/share/nano/*.nanrc"' >> ~/.config/nano/nanorc } function notify_scan(){ if [ -e /tmp/scan_report ] then msg "New Storage Found" "Run add_storage.py for details." fi } function first_configure(){ echo "First configure..." if [ ! $SystemType = "Frontend_only" ] then if [ ! -f ~/.config/lh_configured ] then applyUIsettings msg "New install of LinHES. Starting setup." # only run mythfilldatabase for masterbackends if [ $SystemType = "Master_backend" ] then #nice -n 19 mythfilldatabase --quiet & msg "Guide data is being loaded." "Until this completes some shows will appear as unknown in the program guide." fi touch ~/.config/lh_configured fi else if [ ! -f ~/.config/lh_configured ] then applyUIsettings touch -f ~/.config/lh_configured fi fi } #-------MAIN------- first_configure /usr/bin/enableIRWake.sh & notify_scan