Skip to content

Instantly share code, notes, and snippets.

@InsanusMokrassar
Last active May 24, 2020 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save InsanusMokrassar/7db797a3e34badc28840df76542e445b to your computer and use it in GitHub Desktop.
Save InsanusMokrassar/7db797a3e34badc28840df76542e445b to your computer and use it in GitHub Desktop.
In Elementary OS sometimes stortcuts (like Super + T) is not working. I have created this script as temporal resolve of this problem until it will be resolved by Elementary OS developers
#!/bin/bash
function send_notification() {
notify-send -u low -i keyboard -c system "Shortcuts fixer" "$1"
}
function assert_success() {
"${@}"
local status=${?}
if [ ${status} -ne 0 ]; then
send_notification "### Error ${status} at: ${BASH_LINENO[*]} ###"
exit ${status}
fi
}
# id=`ps -u "$USER" | grep "gsd-media-keys" | grep -o "^[[:space:]]*[[:digit:]]*"`
assert_success killall -u "$USER" gsd-media-keys
# assert_success killall gsd-media-keys
sleep 5
assert_success /usr/lib/gnome-settings-daemon/gsd-media-keys &
send_notification Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment