Compare commits
3 commits
ee86257e93
...
34cb296725
Author | SHA1 | Date | |
---|---|---|---|
34cb296725 | |||
8a0df461bb | |||
660045acdb |
7 changed files with 88 additions and 67 deletions
|
@ -37,7 +37,7 @@ workspaces:
|
|||
monitor: "Acer Technologies KG271U TATEE0048524"
|
||||
default: true
|
||||
layoutopt_orientation: "top"
|
||||
on_created_empty: "flatpak run com.discordapp.Discord & keepassxc"
|
||||
on_created_empty: "~/.local/bin/update-discord && discord-canary & keepassxc"
|
||||
- id: 9
|
||||
monitor: "LG Electronics LG ULTRAGEAR 311NTVS8J911"
|
||||
|
||||
|
|
2
main.yml
2
main.yml
|
@ -10,4 +10,4 @@
|
|||
#- vs-code
|
||||
#- qemu-kvm
|
||||
#- docker
|
||||
#- discord
|
||||
#- discord-canary
|
||||
|
|
|
@ -79,67 +79,38 @@
|
|||
- "Aquamarine"
|
||||
- "hyprgraphics"
|
||||
|
||||
- name: Checkout hyprutils repo
|
||||
- name: Checkout required source repositories
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprutils.git'
|
||||
dest: /usr/local/src/hyprutils
|
||||
version: v0.2.6
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout hyprwayland-scanner repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprwayland-scanner.git'
|
||||
dest: /usr/local/src/hyprwayland-scanner
|
||||
version: v0.4.2
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout hyprlang repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprlang.git'
|
||||
dest: /usr/local/src/hyprlang
|
||||
version: v0.6.0
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout hyprcursor repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprcursor.git'
|
||||
dest: /usr/local/src/hyprcursor
|
||||
version: v0.1.10
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout xdg-desktop-portal-hyprland repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/xdg-desktop-portal-hyprland.git'
|
||||
dest: /usr/local/src/xdg-desktop-portal-hyprland
|
||||
version: v1.3.9
|
||||
force: true
|
||||
|
||||
- name: Checkout Aquamarine repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/aquamarine.git'
|
||||
dest: /usr/local/src/Aquamarine
|
||||
version: v0.5.1
|
||||
force: true
|
||||
recursive: true
|
||||
|
||||
- name: Checkout hyprgraphics repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/hyprgraphics.git'
|
||||
dest: /usr/local/src/hyprgraphics
|
||||
version: v0.1.1
|
||||
force: true
|
||||
|
||||
- name: Checkout Hyprland repo
|
||||
ansible.builtin.git:
|
||||
repo: 'https://github.com/hyprwm/Hyprland.git'
|
||||
dest: /usr/local/src/Hyprland
|
||||
version: v0.46.2
|
||||
repo: "{{ item.repo }}"
|
||||
dest: "{{ item.dest }}"
|
||||
version: "{{ item.version }}"
|
||||
force: true
|
||||
recursive: true
|
||||
loop:
|
||||
- repo: "https://github.com/hyprwm/hyprutils.git"
|
||||
version: "v0.5.0"
|
||||
dest: "/usr/local/src/hyprutils"
|
||||
- repo: "https://github.com/hyprwm/hyprwayland-scanner.git"
|
||||
version: "v0.4.4"
|
||||
dest: "/usr/local/src/hyprwayland-scanner"
|
||||
- repo: "https://github.com/hyprwm/hyprlang.git"
|
||||
version: "v0.6.0"
|
||||
dest: "/usr/local/src/hyprlang"
|
||||
- repo: "https://github.com/hyprwm/hyprcursor.git"
|
||||
version: "v0.1.11"
|
||||
dest: "/usr/local/src/hyprcursor"
|
||||
- repo: "https://github.com/hyprwm/xdg-desktop-portal-hyprland.git"
|
||||
version: "v1.3.9"
|
||||
dest: "/usr/local/src/xdg-desktop-portal-hyprland"
|
||||
- repo: "https://github.com/hyprwm/aquamarine.git"
|
||||
version: "v0.7.2"
|
||||
dest: "/usr/local/src/Aquamarine"
|
||||
- repo: "https://github.com/hyprwm/hyprgraphics.git"
|
||||
version: "v0.1.1"
|
||||
dest: "/usr/local/src/hyprgraphics"
|
||||
- repo: "https://github.com/hyprwm/Hyprland.git"
|
||||
version: "v0.47.1"
|
||||
dest: "/usr/local/src/Hyprland"
|
||||
|
||||
- name: Build hyprutils
|
||||
ansible.builtin.command:
|
||||
|
|
23
roles/discord-canary/files/update-discord
Executable file
23
roles/discord-canary/files/update-discord
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}")
|
||||
CACHE_FILE_PATH="$SCRIPT_PATH/.discord_version_cache"
|
||||
|
||||
CURRENT_VERSION=$(curl -s "https://discord.com/api/updates/canary?platform=linux" | jq -r .name)
|
||||
INSTALLED_VERSION=""
|
||||
|
||||
if test -f "$CACHE_FILE_PATH"; then
|
||||
INSTALLED_VERSION=$(head -n 1 "$CACHE_FILE_PATH")
|
||||
fi
|
||||
|
||||
if [ "$CURRENT_VERSION" != "$INSTALLED_VERSION" ]; then
|
||||
echo "New version $CURRENT_VERSION found. Downloading..."
|
||||
curl -Ls -o /tmp/discord-canary.deb "https://discord.com/api/download/canary?platform=linux&format=deb"
|
||||
if [ $1 != "--download-only" ]; then
|
||||
pkexec apt install -y /tmp/discord-canary.deb
|
||||
rm /tmp/discord-canary.deb
|
||||
fi
|
||||
echo $CURRENT_VERSION > $CACHE_FILE_PATH
|
||||
fi
|
32
roles/discord-canary/tasks/main.yml
Normal file
32
roles/discord-canary/tasks/main.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
- name: Install pkexec
|
||||
become: yes
|
||||
apt:
|
||||
state: latest
|
||||
install_recommends: false
|
||||
name: pkexec
|
||||
|
||||
- name: Copy update helper
|
||||
copy:
|
||||
src: "{{ role_path }}/files/update-discord"
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/"
|
||||
|
||||
- name: Make update helper executable
|
||||
ansible.builtin.file:
|
||||
dest: "{{ ansible_env.HOME }}/.local/bin/update-discord"
|
||||
mode: "ug+x"
|
||||
|
||||
- name: Download Discord canary using helper
|
||||
ansible.builtin.command:
|
||||
cmd: "update-discord --download-only"
|
||||
chdir: "{{ ansible_env.HOME }}/.local/bin"
|
||||
|
||||
- name: Install Discord canary
|
||||
become: yes
|
||||
apt:
|
||||
deb: /tmp/discord-canary.deb
|
||||
install_recommends: false
|
||||
|
||||
- name: Remove installation package
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: /tmp/discord-canary.deb
|
|
@ -1,5 +0,0 @@
|
|||
- name: Install Discord
|
||||
community.general.flatpak:
|
||||
name: "com.discordapp.Discord"
|
||||
state: present
|
||||
method: user
|
|
@ -6,7 +6,7 @@
|
|||
uris: http://repository.spotify.com
|
||||
suites: stable
|
||||
components: non-free
|
||||
signed_by: https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg
|
||||
signed_by: https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg
|
||||
state: present
|
||||
enabled: yes
|
||||
|
||||
|
@ -28,4 +28,4 @@
|
|||
- name: Create Spotify desktop entry
|
||||
copy:
|
||||
src: "{{ role_path }}/files/spotify.desktop"
|
||||
dest: "{{ ansible_env.HOME }}/.local/share/applications/spotify.desktop"
|
||||
dest: "{{ ansible_env.HOME }}/.local/share/applications/spotify.desktop"
|
||||
|
|
Loading…
Add table
Reference in a new issue