#!/bin/bash

#Translation
export TEXTDOMAINDIR="/usr/share/locale"
export TEXTDOMAIN=biglinux-session-and-themes

windowID="$(xprop -root '\t$0' _NET_ACTIVE_WINDOW | cut -f 2)"

echo "2" > "$HOME/.big_performance"

# Animation 0
kwriteconfig5 --file ~/.config/kwinrc --group Compositing --key AnimationSpeed 2
kwriteconfig5 --file ~/.config/kdeglobals --group KDE --key AnimationDurationFactor 0.25
kwriteconfig5 --file ~/.config/klaunchrc --group BusyCursorSettings --key Blinking true
kwriteconfig5 --file ~/.config/klaunchrc --group BusyCursorSettings --key Bouncing false

# XRender
kwriteconfig5 --file ~/.config/kwinrc --group Compositing --key Backend XRender


if [ "$1" != "quiet" ]; then
    # Restart plasmashell
    # systemctl --user restart plasma-plasmashell
        
    # Apply
    systemctl --user restart plasma-kwin_x11
    
    kdialog  --attach="$windowID" --msgbox $"Desempenho em modo performance!" &
    
    # Restart plasmashell
    # systemctl --user restart plasma-plasmashell
fi

