What i am trying to do is to set up a keyboard shortcut to power off my pc.
Ive tried this code in the terminal(replaceing the 'password' with my real password ofc):
echo 'password' | sudo -S shutdown now
And that works but when i try to convert it to the shortcut like this:
gnome-terminal echo 'password' | sudo -S shutdown now
It stops working. I think that it is provberbly just stupidity on my part because i dont understand that code that well. Any help for as to why it doesent work is really apriciated.