diff --git a/states/kitty/config.sls b/states/kitty/config.sls index 1ca423b..d28fe7f 100644 --- a/states/kitty/config.sls +++ b/states/kitty/config.sls @@ -1,24 +1,12 @@ --- -{%- from "kitty/map.jinja" import users with context %} -{%- for name, user in users.items() %} -{%- if user.enabled %} -kitty-config-dir-{{ name }}: - file.directory: - - name: {{ user.home }}/.config/kitty - - user: {{ name }} - - group: {{ user.gid }} - - mode: 0755 - -kitty-user-{{ name }}: +{%- from "kitty/map.jinja" import kitty with context %} +kitty-config: file.managed: - - name: {{ user.home }}/.config/kitty/kitty.conf + - name: {{ kitty.config_file }} - source: salt://kitty/templates/kitty.conf.j2 - - user: {{ name }} - - group: {{ user.gid }} + - user: root + - group: root - mode: 0644 - template: jinja - require: - pkg: kitty-pkg - - file: kitty-config-dir-{{ name }} -{%- endif %} -{%- endfor %} diff --git a/states/kitty/defaults.yaml b/states/kitty/defaults.yaml index e14dc4b..5d7cd6b 100644 --- a/states/kitty/defaults.yaml +++ b/states/kitty/defaults.yaml @@ -1,7 +1,9 @@ --- kitty: + config_file: /etc/xdg/kitty/kitty.conf config: term: "xterm-256color" foreground: "#55ee55" detect_urls: "no" mouse_map: "left click ungrabbed no_op" + map ctrl+shift+w: "no_op" diff --git a/states/kitty/init.sls b/states/kitty/init.sls index 5bacd97..d507940 100644 --- a/states/kitty/init.sls +++ b/states/kitty/init.sls @@ -1,5 +1,4 @@ --- include: - - users - .install - .config diff --git a/states/kitty/map.jinja b/states/kitty/map.jinja index 9abe778..0548147 100644 --- a/states/kitty/map.jinja +++ b/states/kitty/map.jinja @@ -1,4 +1,3 @@ {%- import_yaml "kitty/defaults.yaml" as defaults -%} {%- set kitty = salt['pillar.get']('kitty', default=defaults.kitty, merge=True) -%} -{%- set users = salt['pillar.get']('users') -%}