control-printer-icon.sh 472 B

123456789101112131415
  1. #!/bin/bash
  2. # Source Qubes library.
  3. # shellcheck source=init/functions
  4. . /usr/lib/qubes/init/functions
  5. if ! is_fully_persistent && test -f /etc/xdg/autostart/print-applet.desktop ; then
  6. if qsvc cups ; then
  7. # Allow also notification icon
  8. sed -i -e '/^NotShowIn=.*QUBES/s/;QUBES//' /etc/xdg/autostart/print-applet.desktop
  9. else
  10. # Disable notification icon
  11. sed -i -e '/QUBES/!s/^NotShowIn=\(.*\)/NotShowIn=QUBES;\1/' /etc/xdg/autostart/print-applet.desktop
  12. fi
  13. fi