Skip to content

Instantly share code, notes, and snippets.

@itsMapleLeaf
Created December 11, 2021 04:24
Show Gist options
  • Save itsMapleLeaf/41fe950ecd1b079175e9d1e88589815d to your computer and use it in GitHub Desktop.
Save itsMapleLeaf/41fe950ecd1b079175e9d1e88589815d to your computer and use it in GitHub Desktop.
cinnamon restart script
#!/bin/bash
pkill -HUP -f "cinnamon --replace"
killall -HUP cinnamon
export DISPLAY=":0"
cinnamon &
# https://unix.stackexchange.com/questions/30370/how-to-get-the-pid-of-the-last-executed-command-in-shell-script
disown $!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment