diff --git a/setup.yml b/setup.yml index 1d3c915..8df6080 100644 --- a/setup.yml +++ b/setup.yml @@ -31,6 +31,8 @@ when: install_jdtls - ansible.builtin.import_tasks: tasks/sqlcmd.yml when: install_sqlcmd + - ansible.builtin.import_tasks: tasks/ghostty.yml + when: install_ghostty - ansible.builtin.import_tasks: tasks/dotfiles.yml - ansible.builtin.import_tasks: tasks/user_config.yml - ansible.builtin.import_tasks: tasks/pcloud.yml diff --git a/tasks/ghostty.yml b/tasks/ghostty.yml new file mode 100644 index 0000000..4f3791e --- /dev/null +++ b/tasks/ghostty.yml @@ -0,0 +1,48 @@ +--- +- name: Stat Ghostty installation + ansible.builtin.stat: + path: /opt/ghostty/Ghostty.AppImage + register: ghostty_installed_result + +- name: Create Ghostty install directory + ansible.builtin.file: + path: /opt/ghostty + state: directory + owner: root + group: root + mode: "0755" + when: not ghostty_installed_result.stat.exists + +- name: Download Ghostty AppImage + ansible.builtin.get_url: + url: "https://github.com/pkgforge-dev/ghostty-appimage/releases/download/v{{ ghostty_version }}/Ghostty-{{ ghostty_version }}-{{ ghostty_arch }}.AppImage" + dest: /opt/ghostty/Ghostty.AppImage + mode: "0755" + timeout: 300 + when: not ghostty_installed_result.stat.exists + +- name: Link Ghostty onto system PATH + ansible.builtin.file: + src: /opt/ghostty/Ghostty.AppImage + dest: /usr/local/bin/ghostty + state: link + force: true + +- name: Ensure system desktop application directory exists + ansible.builtin.file: + path: /usr/local/share/applications + state: directory + mode: "0755" + +- name: Create Ghostty desktop launcher + ansible.builtin.copy: + dest: /usr/local/share/applications/ghostty.desktop + mode: "0644" + content: | + [Desktop Entry] + Type=Application + Name=Ghostty + Comment=Ghostty terminal emulator + Exec=/usr/local/bin/ghostty + Terminal=false + Categories=System;TerminalEmulator; diff --git a/vars.yml b/vars.yml index 63a16a1..a8678d8 100644 --- a/vars.yml +++ b/vars.yml @@ -2,7 +2,7 @@ user_name: "{{ lookup('env', 'USER') }}" user_home: "{{ lookup('env', 'HOME') }}" dotfiles_dir: "{{ user_home }}/dotfiles" -dotfiles_repo: https://git.flo.fo/FLO/dotfiles.git +dotfiles_repo: ssh://git@git.flo.fo:2222/FLO/dotfiles.git jdtls_url: https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz jdtls_install_dir: "{{ user_home }}/.local/share/jdtls" jdtls_bin_dir: "{{ user_home }}/.local/bin" @@ -31,6 +31,9 @@ pcloud_appimage_url: "https://plon1.pcloud.com/cBZeyCak57Ztkt7yq7ZZZ8t965kZ2ZZec install_typora: true typora_archive_url: https://downloads.typora.io/linux/Typora-linux-x64.tar.gz typora_archive: /tmp/Typora-linux-x64.tar.gz +install_ghostty: true +ghostty_version: "1.3.1" +ghostty_arch: x86_64 fedora_packages: # Media and documents