Guest User

Untitled

a guest
Nov 19th, 2023
1,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Remove the performance overlay, it meddles with some tasks
  4. unset LD_PRELOAD
  5.  
  6. ## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
  7. ## whilst being launched by plasma-session
  8. mkdir $XDG_RUNTIME_DIR/nested_plasma -p
  9.  
  10. X=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1)
  11. Y=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2)
  12.  
  13. cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
  14. #!/bin/sh
  15. /usr/bin/kwin_wayland_wrapper --width $X --height $Y --no-lockscreen \$@
  16. EOF
  17. chmod a+x $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
  18. export PATH=$XDG_RUNTIME_DIR/nested_plasma:$PATH
  19.  
  20. dbus-run-session startplasma-wayland
  21.  
  22. rm $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
  23.  
Advertisement
Add Comment
Please, Sign In to add comment