Skip to content

Commit 704e33f

Browse files
committed
increase cross-platform safety
1 parent 421bf75 commit 704e33f

6 files changed

Lines changed: 21 additions & 9 deletions

File tree

roles/fonts/tasks/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
- name: Install FiraCode Nerd Font (Linux)
1515
when: not is_mac
1616
block:
17-
- name: Install unzip
17+
- name: Install unzip and fontconfig
1818
become: "{{ should_become }}"
1919
ansible.builtin.package:
20-
name: unzip
20+
name:
21+
- unzip
22+
- fontconfig
2123
state: present
2224

2325
- name: Create fonts directory

roles/gpg/tasks/main.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
dest: ~/.gnupg/gpg.conf
1212
mode: "0600"
1313

14+
- name: Detect pinentry program
15+
ansible.builtin.shell: command -v pinentry-mac 2>/dev/null || command -v pinentry 2>/dev/null || echo ""
16+
register: gpg_pinentry_path
17+
changed_when: false
18+
1419
- name: Template gpg-agent.conf
1520
ansible.builtin.template:
1621
src: gpg-agent.conf.j2
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
default-cache-ttl 3600
22
max-cache-ttl 7200
3-
{% if is_mac %}
4-
pinentry-program /opt/homebrew/bin/pinentry-mac
5-
{% else %}
6-
pinentry-program /usr/bin/pinentry
3+
{% if gpg_pinentry_path.stdout %}
4+
pinentry-program {{ gpg_pinentry_path.stdout }}
75
{% endif %}

roles/neovim/files/lua/config/keymaps.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
vim.keymap.set("n", "<C-f>", "<C-f>zz", { desc = "Page down" })
2-
vim.keymap.set("n", "<C-b>", "<C-b>zz", { desc = "Page up" })
31
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Half page down" })
42
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Half page up" })
53
vim.keymap.set("n", "<leader>s", "<C-w>s", { desc = "Split horizontal" })

roles/packages/defaults/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ packages_list:
1717
- pm_name: zoxide
1818
binary: zoxide
1919
cargo_crate: zoxide
20+
- pm_name: thefuck
21+
binary: thefuck

roles/zsh/templates/zshrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@ if command -v fzf >/dev/null 2>&1; then
6161
fi
6262

6363
# Initialize starship prompt
64-
eval "$(starship init zsh)"
64+
if command -v starship >/dev/null 2>&1; then
65+
eval "$(starship init zsh)"
66+
fi
67+
68+
# Initialize thefuck if available
69+
if command -v thefuck >/dev/null 2>&1; then
70+
eval "$(thefuck --alias)"
71+
fi
6572

6673
# Command wrappers - check availability on each call for graceful fallback
6774
cat() {

0 commit comments

Comments
 (0)