]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Manage termite dotfiles
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 Jun 2019 13:00:11 +0000 (14:00 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 4 Jun 2019 13:00:11 +0000 (14:00 +0100)
states/dotfiles.sls
states/termite/files/config [new file with mode: 0644]
states/termite/gentoo.sls [new file with mode: 0644]
states/termite/init.sls [new file with mode: 0644]

index 4770519e803d840970735f1dd6ee9792354c7194..6613eb2ddf673495abcacc6ede42476f83519a6c 100644 (file)
@@ -4,3 +4,4 @@ include:
   - sway
   - vim
   - mail
+  - termite
diff --git a/states/termite/files/config b/states/termite/files/config
new file mode 100644 (file)
index 0000000..7f65f91
--- /dev/null
@@ -0,0 +1,93 @@
+{% if grains['host'] == 'magnesium' %}
+       {% set font_size = 12 %}
+{% else %}
+       {% set font_size = 11 %}
+{% endif %}
+
+[options]
+#allow_bold = true
+#audible_bell = false
+#clickable_url = true
+#dynamic_title = true
+font = Source Code Pro for Powerline {{ font_size }} 
+#fullscreen = true
+#geometry = 640x480
+#icon_name = terminal
+#mouse_autohide = false
+#scroll_on_output = false
+#scroll_on_keystroke = true
+# Length of the scrollback buffer, 0 disabled the scrollback buffer
+# and setting it to a negative value means "infinite scrollback"
+scrollback_lines = 10000
+#search_wrap = true
+#urgent_on_bell = true
+#hyperlinks = false
+
+# $BROWSER is used by default if set, with xdg-open as a fallback
+#browser = xdg-open
+
+# "system", "on" or "off"
+#cursor_blink = system
+
+# "block", "underline" or "ibeam"
+#cursor_shape = block
+
+# Hide links that are no longer valid in url select overlay mode
+#filter_unmatched_urls = true
+
+# Emit escape sequences for extra modified keys
+#modify_other_keys = false
+
+# set size hints for the window
+#size_hints = false
+
+# "off", "left" or "right"
+#scrollbar = off
+
+[colors]
+# If both of these are unset, cursor falls back to the foreground color,
+# and cursor_foreground falls back to the background color.
+#cursor = #dcdccc
+#cursor_foreground = #dcdccc
+
+#foreground = #dcdccc
+#foreground_bold = #ffffff
+#background = #3f3f3f
+
+# 20% background transparency (requires a compositor)
+background = rgba(27, 28, 22, 0.8)
+
+# If unset, will reverse foreground and background
+highlight = #2f2f2f
+
+foreground =#f8f8f3
+background = rgba(27, 28, 22, 0.8)
+color0 =#000000
+color8 = #555555
+color1 = #f92672
+color9 = #dd4278
+color2 = #74e22e
+color10 = #9dc54b
+color3 = #e6db74
+color11 = #d1ca89
+color4 = #66d9ef
+color12 = #7accda
+color5 = #ae81ff
+color13 = #b392ef
+color6 = #00d9d9
+color14 = #c8f0f0
+color7 = #f5deb3
+color15 = #ffffff
+
+[hints]
+#font = Monospace 12
+#foreground = #dcdccc
+#background = #3f3f3f
+#active_foreground = #e68080
+#active_background = #3f3f3f
+#padding = 2
+#border = #3f3f3f
+#border_width = 0.5
+#roundness = 2.0
+
+# vim: ft=dosini cms=#%s
diff --git a/states/termite/gentoo.sls b/states/termite/gentoo.sls
new file mode 100644 (file)
index 0000000..d9a21d6
--- /dev/null
@@ -0,0 +1,21 @@
+enable gig repo:
+  cmd.run:
+    - name: eselect repository enable gig
+    - unless: eselect repository list -i | grep gig -q
+    - runas: root
+    - shell: /bin/sh
+
+sync gig repo:
+  cmd.run:
+    - name: emerge --sync gig
+    - runass: root
+    - shell: /bin/sh
+    - onchanges:
+      - cmd: enable gig repo
+
+install termite:
+  pkg.installed:
+    - name: x11-terms/termite
+    - require:
+      - cmd: enable gig repo
+      - cmd: sync gig repo
diff --git a/states/termite/init.sls b/states/termite/init.sls
new file mode 100644 (file)
index 0000000..907f19f
--- /dev/null
@@ -0,0 +1,21 @@
+include:
+  - termite.{{ grains['os'] | lower}}
+
+termite conf dir:
+  file.directory:
+    - name: {{ grains['homedir'] }}/.config/termite
+    - dir_mode: 750
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - makedirs: True
+
+termite configuration:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.config/termite/config
+    - source: salt://termite/files/config
+    - template: jinja
+    - mode: 640
+    - user: {{ grains['user'] }}
+    - group: {{ grains['user'] }}
+    - require:
+      - file: termite conf dir