mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-13 03:05:25 +00:00
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
- name: Installing packages
|
|
become: true
|
|
package:
|
|
name:
|
|
- flatpak
|
|
state: present
|
|
|
|
- name: Add the flathub flatpak repository remote
|
|
community.general.flatpak_remote:
|
|
name: flathub
|
|
state: present
|
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
|
|
- name: Install multiple packages
|
|
community.general.flatpak:
|
|
name:
|
|
- org.gimp.GIMP
|
|
- org.telegram.desktop
|
|
- net.christianbeier.Gromit-MPX
|
|
- md.obsidian.Obsidian
|
|
- com.bitwarden.desktop
|
|
- com.github.tchx84.Flatseal
|
|
- com.github.alexr4535.siglo
|
|
- com.nextcloud.desktopclient.nextcloud
|
|
- com.github.unrud.VideoDownloader
|
|
- fyi.zoey.Boop-GTK
|
|
- nl.hjdskes.gcolor3
|
|
- re.sonny.Junction
|
|
- org.gnome.DejaDup
|
|
state: present
|
|
|
|
- name: Check if open function is set
|
|
shell: grep -c "^function open" ~/.shellconfig/functions.sh || true
|
|
register: open_test
|
|
|
|
- name: "Adding 'open' shell function"
|
|
ansible.builtin.lineinfile:
|
|
name: ~/.shellconfig/functions.sh
|
|
line: |
|
|
# Open files from CLI via Junction flatpak
|
|
function open() { if [[ -f $@ || -d $@ ]]; then flatpak run re.sonny.Junction $@ &>/dev/null; else echo "❌No such file or directory '$@'"; false; fi}
|
|
state: present
|
|
when: open_test.stdout|int == 0
|