#!/bin/bash

oldExec=$(grep "Exec" $HOME/Desktop/ubuntu-desktop-bootstrap_ubuntu-desktop-bootstrap.desktop | cut -d "=" -f2,3)
newExec=$(echo "Exec=systemd-inhibit ${oldExec}")
sed -i 's,Exec=.*,'"$newExec"',' $HOME/Desktop/ubuntu-desktop-bootstrap_ubuntu-desktop-bootstrap.desktop
sudo sed -i 's,Exec=.*,'"$newExec"',' /var/lib/snapd/desktop/applications/ubuntu-desktop-bootstrap_ubuntu-desktop-bootstrap.desktop
