Compare commits
3 Commits
1184062dc7
...
webcatalog
| Author | SHA1 | Date | |
|---|---|---|---|
| 356cf58e74 | |||
| c596fcb87a | |||
| 441343fd7c |
12
.vim/coc-settings.json
Normal file
12
.vim/coc-settings.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"yaml.schemas": {
|
||||||
|
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible.json#/$defs/playbook": [
|
||||||
|
"./*.yaml"
|
||||||
|
],
|
||||||
|
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible.json#/$defs/tasks": [
|
||||||
|
"./roles/*/handlers/*.yaml",
|
||||||
|
"./roles/*/tasks/*.yaml",
|
||||||
|
"./tasks.yaml"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
- role: ag
|
- role: ag
|
||||||
- role: bat
|
- role: bat
|
||||||
|
- role: fzf
|
||||||
- role: git
|
- role: git
|
||||||
- role: op
|
- role: op
|
||||||
- role: tree
|
- role: tree
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
- role: system-info
|
- role: system-info
|
||||||
|
|
||||||
- role: ag
|
- role: ag
|
||||||
|
- role: fzf
|
||||||
- role: git
|
- role: git
|
||||||
- role: op
|
- role: op
|
||||||
- role: tree
|
- role: tree
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: install fzf binaries
|
- name: install fzf binaries
|
||||||
command:
|
command:
|
||||||
cmd: ~/.config/zsh/fzf/install --bin
|
cmd: ~/.local/src/fzf/install --bin
|
||||||
5
roles/fzf/tasks/Darwin.yaml
Normal file
5
roles/fzf/tasks/Darwin.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install homebrew package
|
||||||
|
homebrew:
|
||||||
|
name: fzf
|
||||||
|
state: latest
|
||||||
13
roles/fzf/tasks/Debian-old.yaml
Normal file
13
roles/fzf/tasks/Debian-old.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
- name: clone fzf repo
|
||||||
|
git:
|
||||||
|
repo: https://github.com/junegunn/fzf.git
|
||||||
|
dest: ~/.local/src/fzf
|
||||||
|
notify: install fzf binaries
|
||||||
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
- name: create symbolic links
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
src: ~/.local/src/fzf/bin/fzf
|
||||||
|
dest: ~/.local/bin/fzf
|
||||||
12
roles/fzf/tasks/Debian.yaml
Normal file
12
roles/fzf/tasks/Debian.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
- name: install apt package
|
||||||
|
when: ansible_distribution == "Debian" and
|
||||||
|
ansible_distribution_version == "unstable"
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name: fzf
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- include_tasks: Debian-old.yaml
|
||||||
|
when: not (ansible_distribution == "Debian" and
|
||||||
|
ansible_distribution_version == "unstable")
|
||||||
5
roles/fzf/tasks/Windows.yaml
Normal file
5
roles/fzf/tasks/Windows.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- name: install chocolatey package
|
||||||
|
win_chocolatey:
|
||||||
|
name: fzf
|
||||||
|
state: latest
|
||||||
2
roles/fzf/tasks/main.yaml
Normal file
2
roles/fzf/tasks/main.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||||
3
roles/webcatalog/tasks/Darwin.yaml
Normal file
3
roles/webcatalog/tasks/Darwin.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
- set_fact:
|
||||||
|
download_url: https://cdn-2.webcatalog.io/webcatalog/WebCatalog-{{latest.version}}-universal.dmg
|
||||||
31
roles/webcatalog/tasks/Debian.yaml
Normal file
31
roles/webcatalog/tasks/Debian.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- assert: {that: [ansible_machine == 'x86_64']}
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
filename: 'WebCatalog-{{latest.version}}.AppImage'
|
||||||
|
# TODO: Support arm64: 'WebCatalog-{{latest.version}}-arm64.AppImage'
|
||||||
|
|
||||||
|
- name: create directory for download
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
dest: ~/.local/src/webcatalog
|
||||||
|
|
||||||
|
- name: download AppImage
|
||||||
|
get_url:
|
||||||
|
url: 'https://cdn-2.webcatalog.io/webcatalog/{{filename}}'
|
||||||
|
dest: '~/.local/src/webcatalog/{{filename}}'
|
||||||
|
|
||||||
|
- name: make AppImage executable
|
||||||
|
file:
|
||||||
|
dest: '~/.local/src/webcatalog/{{filename}}'
|
||||||
|
mode: a+x
|
||||||
|
|
||||||
|
- name: create symbolic link
|
||||||
|
file:
|
||||||
|
src: '~/.local/src/webcatalog/{{filename}}'
|
||||||
|
dest: '~/.local/bin/WebCatalog'
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: create desktop file
|
||||||
|
template:
|
||||||
|
dest: io.webcatalog.WebCatalog.desktop
|
||||||
5
roles/webcatalog/tasks/Windows.yaml
Normal file
5
roles/webcatalog/tasks/Windows.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
- set_fact:
|
||||||
|
filename: WebCatalog%20Setup%20{{latest.version}}.exe
|
||||||
|
|
||||||
|
- name: download
|
||||||
19
roles/webcatalog/tasks/main.yaml
Normal file
19
roles/webcatalog/tasks/main.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
- name: get latest releases
|
||||||
|
uri:
|
||||||
|
url: https://raw.githubusercontent.com/kbenzie/webcatalog-release-scraper/main/webcatalog-releases.json
|
||||||
|
register: releases
|
||||||
|
|
||||||
|
- set_fact:
|
||||||
|
latest: '{{releases.json[0]}}'
|
||||||
|
|
||||||
|
- include_tasks: '{{ansible_os_family}}.yaml'
|
||||||
|
|
||||||
|
# TODO: Generate these links from the changelog from 42.0.0 up
|
||||||
|
|
||||||
|
- debug: msg=https://cdn-2.webcatalog.io/webcatalog/WebCatalog-{{latest.version}}-universal.dmg
|
||||||
|
- debug: msg=https://cdn-2.webcatalog.io/webcatalog/WebCatalog%20Setup%20{{latest.version}}.exe
|
||||||
|
- debug: msg=https://cdn-2.webcatalog.io/webcatalog/WebCatalog-{{latest.version}}.AppImage
|
||||||
|
- debug: msg=https://cdn-2.webcatalog.io/webcatalog/WebCatalog-{{latest.version}}-arm64.AppImage
|
||||||
|
|
||||||
|
# NOTE: Otherwise use https://github.com/webcatalog/webcatalog-legacy/releases
|
||||||
11
roles/webcatalog/templates/webcatalog.desktop.j2
Normal file
11
roles/webcatalog/templates/webcatalog.desktop.j2
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=WebCatalog
|
||||||
|
Exec={{command}}
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=webcatalog
|
||||||
|
StartupWMClass=WebCatalog
|
||||||
|
X-AppImage-Version={{latest.version}}
|
||||||
|
Comment=Turn Any Websites Into Real Desktop Apps
|
||||||
|
MimeType=x-scheme-handler/webcatalog;
|
||||||
|
Categories=Utility;
|
||||||
@@ -21,13 +21,6 @@
|
|||||||
- repo: https://github.com/zsh-users/zsh-completions.git
|
- repo: https://github.com/zsh-users/zsh-completions.git
|
||||||
dest: ~/.config/zsh/zsh-completions
|
dest: ~/.config/zsh/zsh-completions
|
||||||
|
|
||||||
- name: clone fzf repo
|
|
||||||
git:
|
|
||||||
repo: https://github.com/junegunn/fzf.git
|
|
||||||
dest: ~/.config/zsh/fzf
|
|
||||||
notify: install fzf binaries
|
|
||||||
- meta: flush_handlers
|
|
||||||
|
|
||||||
- name: create directories
|
- name: create directories
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
@@ -62,10 +55,6 @@
|
|||||||
dest: ~/.local/share/zsh/site-functions/_layout
|
dest: ~/.local/share/zsh/site-functions/_layout
|
||||||
- src: ~/.config/zsh/notes/_note
|
- src: ~/.config/zsh/notes/_note
|
||||||
dest: ~/.local/share/zsh/site-functions/_note
|
dest: ~/.local/share/zsh/site-functions/_note
|
||||||
- src: ~/.config/zsh/fzf/bin/fzf
|
|
||||||
dest: ~/.local/bin/fzf
|
|
||||||
- src: ~/.config/zsh/fzf/bin/fzf-tmux
|
|
||||||
dest: ~/.local/bin/fzf-tmux
|
|
||||||
- src: ~/.config/zsh/cmake-uninstall
|
- src: ~/.config/zsh/cmake-uninstall
|
||||||
dest: ~/.local/bin/cmake-uninstall
|
dest: ~/.local/bin/cmake-uninstall
|
||||||
- src: ~/.config/zsh/$
|
- src: ~/.config/zsh/$
|
||||||
|
|||||||
Reference in New Issue
Block a user