I’m trying to set a keyboard shortcut so that I can restart Plasma and Kwin quickly(killall kwin_wayland && kstart kwin_wayland plasmashell) while my script works in terminal whenever I try to access it through the shortcut either nothing happens or I get an error saying that it can’t find the script file. I tried to put it in /usr/bin, but it still only works when invoked in terminal and not from the shortcut.
hi, welcome.
shortcut process to run a command is different in plasma 5 that it is in plasma 6 so you need to provide your system info text in order to know which one you are using.
for me it was easier to just add an alias in .bash_aliases
like this:
alias nps="systemctl restart --user plasma-plasmashell.service"
when i type “nps” into a console window it restarts the shell.
plasmashell 6.3.5
This is my Plasma version.
I tried your method as making an alias but, it only works in terminal, not when I do my keyboard shortcut.
I also tried entering the command directly into the line like so
But it didn’t work either when I did the shortcut.
So I tried using the shortcut again, and now it works with the direct way shown in the above screenshot. I have honestly no clue what fixed it, so my best guess is that rebooting fixes it and allows you to use the shortcut.