Skip to content

Instantly share code, notes, and snippets.

View DomingoMontoya's full-sized avatar

DomingoMontoya

View GitHub Profile
@DomingoMontoya
DomingoMontoya / kwin_compositor_restarter.sh
Created March 10, 2021 21:42
Script to have KDE autostart on login to restart compositor on crash (due to removing monitors or suspend/resume)
#!/bin/sh
while true; do
# Check if opengl marked as unsafe, set to safe, and restart kwin
if grep "OpenGLIsUnsafe=true" ~/.config/kwinrc ; then
sed -i "s/OpenGLIsUnsafe=true/OpenGLIsUnsafe=false/g" ~/.config/kwinrc
nohup kwin_x11 --replace &
fi