Re-appearing a disappearing KDE panel

Due to me not upgrading my now quite old Fedora installation, I’m having to suffer bugs in KDE that quite likely have been fixed now for years. One of them concerns moving the “Panel” (a toolbar that usually sits at the bottom of the screen) from one display to another. Every once in a while when I move the panel it disappears completely from the screen!

The following might work to get the panel back:

  • Edit ~/.config/plasmashelrc and look for [PlasmaViews][Panel 1][Horizontal####] sections, where #### is the width in pixels of the screen where you want the panel to reappear:
    • My main HP monitor is 1920 pixels wide
    • The laptop screen is 1600 pixels wide
  • Change the panelvisibility for that entry to 2 and save the file
  • Restart the KDE Plasma shell:
      xrandr --output eDP1 --preferred && kill $(pidof plasmashell); nohup plasmashell --shut-up >/dev/null 2>&1