Files
dotfiles/roles/hyprland/tasks/main.yml
Johannes Knopp aae0275e60 update conf
2026-07-09 03:36:38 +02:00

76 lines
1.8 KiB
YAML

---
- name: Check if hypr path is a symlink
stat:
path: "{{ config_dir }}/hypr"
register: hypr_stat
- name: Remove existing hypr symlink if present
file:
path: "{{ config_dir }}/hypr"
state: absent
when: hypr_stat.stat.exists and hypr_stat.stat.islnk
- name: Create hypr config directory
file:
path: "{{ config_dir }}/hypr"
state: directory
mode: '0755'
- name: Symlink hyprland config files
file:
src: "{{ role_path }}/files/hypr/{{ conf_file }}"
dest: "{{ config_dir }}/hypr/{{ conf_file }}"
state: link
force: true
loop:
# hyprland.conf ported to hyprland.lua (hyprlang deprecated in Hyprland >= 0.55).
# hyprlock/hyprpaper stay on hyprlang - they do not support Lua configs yet.
- hyprland.lua
- hyprlock.conf
- hyprpaper.conf
- scripts
loop_control:
loop_var: conf_file
- name: Symlink host-specific monitors.lua
file:
src: "{{ role_path }}/files/hypr/monitors/{{ ansible_facts['hostname'] }}.lua"
dest: "{{ config_dir }}/hypr/monitors.lua"
state: link
force: true
- name: Symlink host-specific workspaces.lua
file:
src: "{{ role_path }}/files/hypr/workspaces/{{ ansible_facts['hostname'] }}.lua"
dest: "{{ config_dir }}/hypr/workspaces.lua"
state: link
force: true
- name: Symlink dunst
file:
src: "{{ role_path }}/files/dunst"
dest: "{{ config_dir }}/dunst"
state: link
force: true
- name: Symlink wofi
file:
src: "{{ role_path }}/files/wofi"
dest: "{{ config_dir }}/wofi"
state: link
force: true
- name: Symlink waybar
file:
src: "{{ role_path }}/files/waybar"
dest: "{{ config_dir }}/waybar"
state: link
force: true
- name: Symlink hyprpanel
file:
src: "{{ role_path }}/files/hyprpanel"
dest: "{{ config_dir }}/hyprpanel"
state: link
force: true