1diff --git a/config/aerc.conf b/config/aerc.conf
2index 7d33b43..4315f0e 100644
3--- a/config/aerc.conf
4+++ b/config/aerc.conf
5@@ -202,8 +202,7 @@
6 #
7 # ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
8 # ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
9-# /usr/local/share/aerc/stylesets
10-# /usr/share/aerc/stylesets
11+# @out@/share/aerc/stylesets
12 #
13 #stylesets-dirs=
14
15@@ -547,8 +546,7 @@ message/rfc822=colorize
16 #
17 # ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
18 # ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
19-# /usr/local/share/aerc/templates
20-# /usr/share/aerc/templates
21+# @out@/share/aerc/templates
22 #
23 #template-dirs=
24
25diff --git a/config/config.go b/config/config.go
26index d70bcfe..c19e59a 100644
27--- a/config/config.go
28+++ b/config/config.go
29@@ -54,10 +54,8 @@ func buildDefaultDirs() []string {
30 }
31
32 // Add fixed fallback locations
33- defaultDirs = append(defaultDirs, "/usr/local/libexec/aerc")
34- defaultDirs = append(defaultDirs, "/usr/local/share/aerc")
35- defaultDirs = append(defaultDirs, "/usr/libexec/aerc")
36- defaultDirs = append(defaultDirs, "/usr/share/aerc")
37+ defaultDirs = append(defaultDirs, "@out@/libexec/aerc")
38+ defaultDirs = append(defaultDirs, "@out@/share/aerc")
39
40 return defaultDirs
41 }
42diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
43index 9e1f8a3..694abbc 100644
44--- a/doc/aerc-config.5.scd
45+++ b/doc/aerc-config.5.scd
46@@ -300,8 +300,7 @@ These options are configured in the *[ui]* section of _aerc.conf_.
47 ```
48 ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
49 ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
50- /usr/local/share/aerc/stylesets
51- /usr/share/aerc/stylesets
52+ @out@/share/aerc/stylesets
53 ```
54
55 *styleset-name* = _<string>_
56@@ -900,8 +899,7 @@ These options are configured in the *[templates]* section of _aerc.conf_.
57 ```
58 ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
59 ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
60- /usr/local/share/aerc/templates
61- /usr/share/aerc/templates
62+ @out@/share/aerc/templates
63 ```
64
65 *new-message* = _<template_name>_
66diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd
67index ae9bc6d..5f42b14 100644
68--- a/doc/aerc-templates.7.scd
69+++ b/doc/aerc-templates.7.scd
70@@ -319,7 +319,7 @@ aerc provides the following additional functions:
71 Execute external command, provide the second argument to its stdin.
72
73 ```
74- {{exec `/usr/libexec/aerc/filters/html` .OriginalText}}
75+ {{exec `@out@/libexec/aerc/filters/html` .OriginalText}}
76 ```
77
78 *.Local*
79@@ -425,7 +425,7 @@ aerc provides the following additional functions:
80
81 ```
82 {{if eq .OriginalMIMEType "text/html"}}
83- {{exec `/usr/libexec/aerc/filters/html` .OriginalText | wrap 72 | quote}}
84+ {{exec `@out@/libexec/aerc/filters/html` .OriginalText | wrap 72 | quote}}
85 {{else}}
86 {{wrap 72 .OriginalText | trimSignature | quote}}
87 {{end}}