feat: allow absent dotfiles

Some files had a small impact such as Xft.dpi definition, thus removed.
Files with bigger impact were moved to root directories such as /etc or
were specified with full path such as ~/.local/bin.

In case the dotfiles configuration does extra things, such as verifying
merge commits, it was changed to code or comment when appropriate.

For: https://github.com/ben-grande/dotfiles/pull/1
This commit is contained in:
Ben Grande 2025-02-14 15:19:18 +01:00
parent 8609815f4e
commit 0e72ff8716
No known key found for this signature in database
GPG key ID: 00C64E14F51F9E56
6 changed files with 13 additions and 34 deletions

View file

@ -1,5 +1,5 @@
{#
SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-FileCopyrightText: 2024 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -36,13 +36,4 @@ include:
- name: electrum --offline setconfig show_notes_tab true
- runas: user
"{{ slsdotpath }}-xprofile-to-increase-dpi":
file.managed:
- name: /home/user/.config/x11/xprofile.d/electrum.sh
- source: salt://{{ slsdotpath }}/files/client/xprofile.d/electrum.sh
- mode: '0755'
- user: user
- group: user
- makedirs: True
{% endif -%}

View file

@ -1,12 +0,0 @@
#!/bin/sh
## SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
##
## SPDX-License-Identifier: AGPL-3.0-or-later
current_dpi="$(xrdb -get Xft.dpi)"
wanted_dpi="144"
if test -z "${current_dpi}" || test "${current_dpi}" -lt "${wanted_dpi}"
then
printf '%s\n' "Xft.dpi: ${wanted_dpi}" | xrdb -override -
fi