control-printer-icon.sh 437 B

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