#!/bin/bash

## Colored message

msg() {
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
GREEN="${BOLD}\e[1;32m"
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&2
}
 
## Symple script to check if printing support is installed

if pacman -Qi cups > /dev/null 2>&1; then
   echo ""
   msg "Printing support installed"
   echo ""
else 
   echo ""
   msg "Printing support not installed, to enable please type this in a terminal:
	 -> sudo pacman -S manjaro-printer
	 -> or install manjaro-printer pkg via pamac"
   echo ""
fi

## Inform users about QT style changes

if pacman -Qi qt5ct > /dev/null 2>&1; then
   echo""
   msg "We have switched into qgnomeplatform instead qt5ct so now 
    -> qt5ct
    -> qt5-styleplugins
    are marked as orphans. If you want you can continue to use this two packages but
    if you want use qgnomeplatform engine you need to modify your /etc/environment 
    with this changes:
    remove or comment this:
    -> QT_QPA_PLATFORMTHEME="qt5ct"
    add:
    -> QT_AUTO_SCREEN_SCALE_FACTOR=1
    -> QT_QPA_PLATFORMTHEME="gnome"
    -> QT_STYLE_OVERRIDE="kvantum"
    This is all"
    echo""
fi