summarylogtreecommitdiffstats
path: root/papirus-plasma-theme.install
diff options
context:
space:
mode:
Diffstat (limited to 'papirus-plasma-theme.install')
-rw-r--r--papirus-plasma-theme.install33
1 files changed, 33 insertions, 0 deletions
diff --git a/papirus-plasma-theme.install b/papirus-plasma-theme.install
new file mode 100644
index 000000000000..83150ca06ef6
--- /dev/null
+++ b/papirus-plasma-theme.install
@@ -0,0 +1,33 @@
+plasma-cache-refresh() {
+ _l="/etc/login.defs"
+ _p="/etc/passwd"
+
+ ## get mini UID limit ##
+ l=$(grep "^UID_MIN" $_l)
+
+ ## get max UID limit ##
+ l1=$(grep "^UID_MAX" $_l)
+
+ ## use awk to print if UID >= $MIN and UID <= $MAX and shell is not /sbin/nologin ##
+ users=$(awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{ if ( $3 >= min && $3 <= max && $7 != "/sbin/nologin" ) print $0 }' "$_p" | cut -d: -f1)
+ for u in $users; do
+ rm -rf /home/$u/.cache/plasma* &> /dev/null
+ done
+ echo "Plasma cache files were purged."
+ echo "Reboot for regenerate plasma cache files."
+}
+
+papirus-dark-note() {
+ echo "WARNING: Papirus Dark was removed."
+ echo "If You using Papirus Dark variant, switch to arc-dark-suite-git"
+}
+
+post_install() {
+ plasma-cache-refresh
+ papirus-dark-note
+}
+
+post_upgrade() {
+ plasma-cache-refresh
+ papirus-dark-note
+}