Last active
April 14, 2023 02:39
-
-
Save ihipop/aa4ccb4e0dc8bfa8d3e7bedc38c88bfd to your computer and use it in GitHub Desktop.
use DBUS to reload KWIN or PlasmaShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ "$XDG_SESSION_DESKTOP" = "KDE" ] || exit | |
#dbus-send --session --print-reply --dest=org.kde.kded5 \ | |
# /kded \ | |
# org.kde.kded5.unloadModule \ | |
# string:"kscreen" | |
{ | |
dbus-send --session --type=method_call --print-reply --dest=org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.refreshCurrentShell || | |
{ killall plasmashell -u ${USER:-$(whoami)} && echo killed plasmashell ; kstart5 -- plasmashell >/dev/null 2>&1 & } | |
} & | |
{ | |
dbus-send --session --type=signal --print-reply --dest=org.kde.KWin /KWin org.kde.KWin.reloadConfig || | |
{ kstart5 -- kwin_x11 --replace >/dev/null 2>&1 & } | |
} & | |
#killall spectacle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment