- name: kde plasma desktop
  apt:
    name:
      - task-kde-desktop
      - sddm-theme-debian-breeze
      - cups
    state: latest # noqa package-latest

## Bug #698504
- name: allow print job management
  replace:
    dest: "/etc/cups/cups-files.conf"
    regexp: '^(SystemGroup lpadmin)$'
    replace: '\1 root'

- name: enable splash screen
  replace:
    dest: "/etc/default/grub"
    regexp: '"quiet"$'
    replace: '"quiet splash"'
  notify: update grub

- name: switch default browser
  blockinfile:
    path: /etc/xdg/kdeglobals
    block: |
      #[General]
      #BrowserApplication=firefox-esr.desktop
    create: true

- name: add some favorites to the KDE menu
  blockinfile:
    path: /etc/xdg/kickoffrc
    block: |
      #[Favorites]
      #FavoriteURLs=firefox-esr.desktop,org.kde.dolphin.desktop,libreoffice-startcenter.desktop,org.kde.okular.desktop,org.kde.kate.desktop,gimp.desktop,inkscape.desktop,vlc.desktop,org.kde.konsole.desktop
    create: true
