Skip to content

Commit

Permalink
define the XDG_* dirs
Browse files Browse the repository at this point in the history
partially fixes #23
  • Loading branch information
christian-heusel committed Jun 14, 2022
1 parent cb79ebb commit ba0280a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ special_user_fonts:
main_file: "PermanentMarker-Regular.ttf"
- url: "https://dl.dafont.com/dl/?f=campus"
main_file: "CAMPUS PERSONAL USE.ttf"
# https://wiki.archlinux.org/title/XDG_Base_Directory#User_directories
xdg_base_dirs:
- XDG_CONFIG_HOME: .config
- XDG_CACHE_HOME: .cache
- XDG_DATA_HOME: .local/share
- XDG_STATE_HOME: .local/state
7 changes: 7 additions & 0 deletions roles/custom-scripts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@
state: directory
mode: '0700'

- name: create the xdg dir for the scripts
ansible.builtin.file:
path: "{{ (ansible_user_dir, item.key) | path_join }}"
state: directory
mode: '0700'
with_dict: "{{ xdg_base_dirs }}"

- include_tasks: autoupdate_dotfiles.yml
- include_tasks: april_fools.yml
7 changes: 7 additions & 0 deletions roles/i3-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@
name: systemd-timesyncd
enabled: yes
become: yes

- name: persist the XDG_DIRS
lineinfile:
path: /etc/security/pam_env.conf
line: "{{ item.key }}\tDEFAULT=@{HOME}/{{ item.value }}"
with_dict: "{{ xdg_base_dirs }}"
become: yes

0 comments on commit ba0280a

Please sign in to comment.