Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save erm3nda/6eae0d5967cf0e36bf835692c1216937 to your computer and use it in GitHub Desktop.

Select an option

Save erm3nda/6eae0d5967cf0e36bf835692c1216937 to your computer and use it in GitHub Desktop.
Give KDE Plasma same F4 shortcut behavior -> Close active window or gimme logout window
#!/bin/bash
xdotool getwindowfocus getwindowname | \
grep "Plasma" && \
qdbus org.kde.ksmserver /KSMServer logout 1 0 1 || \
xdotool getwindowfocus windowclose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment