diff --git a/ansible/playbook.yaml b/ansible/playbook.yaml index 9670453..4aec288 100644 --- a/ansible/playbook.yaml +++ b/ansible/playbook.yaml @@ -91,7 +91,7 @@ - jail - bhyve - wireguard - # - emacs + - emacs - mrmanager - hosts: admin_git:public_dns diff --git a/ansible/roles/emacs/files/plainmacs.desktop b/ansible/roles/emacs/files/plainmacs.desktop new file mode 100644 index 0000000..7e9b737 --- /dev/null +++ b/ansible/roles/emacs/files/plainmacs.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Plainmacs +GenericName=Text Editor +Comment=Edit text +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +Exec=plainmacs %F +Icon=emacs +Type=Application +Terminal=false +Categories=Development;TextEditor; +StartupNotify=true +StartupWMClass=Emacs diff --git a/ansible/roles/emacs/tasks/linux.yaml b/ansible/roles/emacs/tasks/linux.yaml index f3d0baa..2bc8e37 100644 --- a/ansible/roles/emacs/tasks/linux.yaml +++ b/ansible/roles/emacs/tasks/linux.yaml @@ -30,3 +30,26 @@ - gopls - typescript-language-server state: present + +- name: Create directories + file: + name: "{{ item }}" + state: directory + mode: 0755 + owner: root + group: root # Using root group to match /usr/share/applications + loop: + - /usr/local/share/applications + +- name: Install Configuration + copy: + src: "files/{{ item.src }}" + dest: "{{ item.dest }}" + mode: 0644 + owner: root + group: wheel + # Can't use validate because it complains about the file extension for the temporary file. + # validate: "desktop-file-validate %s" + loop: + - src: plainmacs.desktop + dest: /usr/local/share/applications/