Compare commits

..

2 Commits

3 changed files with 34 additions and 5 deletions

View File

@ -13,6 +13,7 @@
appimage: 'Obsidian-{{latest.json.name}}.AppImage'
- set_fact:
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
iconpath: 'share/icons/hicolor/512x512/apps/obsidian.png'
asset_query: '[?contains(name, `{{appimage}}`)] | [0]'
- set_fact:
needs_installed:
@ -31,7 +32,7 @@
state: directory
with_items:
- '{{ansible_env.HOME}}/.local/bin'
- '{{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps'
- '{{ansible_env.HOME}}/.local/share/icons/hicolor/512x512/apps'
- name: create symlink
file:
@ -40,16 +41,19 @@
state: link
- name: extract squashfs-root for app icon
when: needs_installed
command:
cmd: '{{ansible_env.HOME}}/.local/bin/Obsidian --appimage-extract'
chdir: '/tmp'
- name: copy icon file
when: needs_installed
copy:
src: '/tmp/squashfs-root/usr/share/icons/hicolor/512x512/apps/obsidian.png'
dest: '{{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps/'
src: '/tmp/squashfs-root/usr/{{iconpath}}'
dest: '{{ansible_env.HOME}}/.local/{{iconpath}}'
- name: remove squashfs-root directory
when: needs_installed
file:
path: '/tmp/squashfs-root'
state: absent

View File

@ -3,7 +3,7 @@ Name=Obsidian
Exec={{ansible_env.HOME}}/.local/bin/Obsidian
Terminal=false
Type=Application
Icon={{ansible_env.HOME}}/.local/share/icon/hicolor/512x512/apps/obsidian.png
Icon=obsidian
StartupWMClass=Obsidian
X-AppImage-Version={{latest.json.name}}
Comment=Private and flexible notetaking app that adapts to the way you think.

View File

@ -16,6 +16,7 @@
appimage: 'WebCatalog-{{releases[0].version}}.AppImage'
- set_fact:
filepath: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
iconpath: 'share/icons/hicolor/512x512/apps/webcatalog.png'
- set_fact:
needs_installed:
@ -28,13 +29,37 @@
dest: '{{ansible_env.HOME}}/.local/bin/{{appimage}}'
mode: '0755'
- name: create directories
file:
path: '{{item}}'
state: directory
with_items:
- '{{ansible_env.HOME}}/.local/bin'
- '{{ansible_env.HOME}}/.local/share/icons/hicolor/512x512/apps'
- name: create symlink
file:
src: '{{filepath}}'
dest: '{{ansible_env.HOME}}/.local/bin/WebCatalog'
state: link
# TODO: icon for desktop file
- name: extract squashfs-root for app icon
when: needs_installed
command:
cmd: '{{ansible_env.HOME}}/.local/bin/WebCatalog --appimage-extract'
chdir: '/tmp'
- name: copy icon file
when: needs_installed
copy:
src: '/tmp/squashfs-root/usr/{{iconpath}}'
dest: '{{ansible_env.HOME}}/.local/{{iconpath}}'
- name: remove squashfs-root directory
when: needs_installed
file:
path: '/tmp/squashfs-root'
state: absent
- name: create desktop file
template: