From 5314abc8374e9181141a43ecc5275cc39d96d64f Mon Sep 17 00:00:00 2001 From: Adam Gausmann Date: Sat, 13 Apr 2019 01:50:23 -0500 Subject: [PATCH] Flatten host configs --- hosts/ayypad.toml | 3 --- hosts/seraph.toml | 3 --- hosts/smolboi.toml | 3 --- templates/.config/i3status/config | 7 +++---- templates/.xinitrc | 3 +-- 5 files changed, 4 insertions(+), 15 deletions(-) diff --git a/hosts/ayypad.toml b/hosts/ayypad.toml index da3de56..a6ce5e3 100644 --- a/hosts/ayypad.toml +++ b/hosts/ayypad.toml @@ -1,9 +1,6 @@ -[i3status] wireless = ["wlp4s0"] ethernet = ["enp2s0"] disks = ["/", "/home", "/media/hdd"] - -[xinit] outputs = [ { name = "eDP", config = ["--auto", "--primary"] }, { name = "HDMI-A-0" }, diff --git a/hosts/seraph.toml b/hosts/seraph.toml index 3b9dc53..14b7a59 100644 --- a/hosts/seraph.toml +++ b/hosts/seraph.toml @@ -1,8 +1,5 @@ -[i3status] ethernet = ["enp5s0"] disks = ["/", "/home"] - -[xinit] outputs = [ { name = "HDMI-A-0", config = ["--auto", "--primary"] }, { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, diff --git a/hosts/smolboi.toml b/hosts/smolboi.toml index ef7526d..e2a0f2d 100644 --- a/hosts/smolboi.toml +++ b/hosts/smolboi.toml @@ -1,9 +1,6 @@ -[i3status] wireless = ["wlp36s0"] ethernet = ["enp37s0"] disks = ["/", "/home"] - -[xinit] outputs = [ { name = "HDMI-A-1", config = ["--auto", "--primary"] }, { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, diff --git a/templates/.config/i3status/config b/templates/.config/i3status/config index 4c5e3bd..6367a5b 100644 --- a/templates/.config/i3status/config +++ b/templates/.config/i3status/config @@ -1,10 +1,9 @@ -<% i3status = host.get('i3status', {}) %>\ general { colors = true interval = 5 } -% for iface in i3status.get('wireless', []): +% for iface in host.get('wireless', []): wireless ${iface} { format_up = "${iface} %ip %essid %quality" format_down = "${iface} down" @@ -12,7 +11,7 @@ wireless ${iface} { order += "wireless ${iface}" % endfor -% for iface in i3status.get('ethernet', []): +% for iface in host.get('ethernet', []): ethernet ${iface} { format_up = "${iface} %ip" format_down = "${iface} down" @@ -20,7 +19,7 @@ ethernet ${iface} { order += "ethernet ${iface}" % endfor -% for disk in i3status.get('disks', ['/']): +% for disk in host.get('disks', ['/']): disk "${disk}" { format = "${disk} %avail" } diff --git a/templates/.xinitrc b/templates/.xinitrc index a9e4e95..f0bbf7c 100644 --- a/templates/.xinitrc +++ b/templates/.xinitrc @@ -1,7 +1,6 @@ -<% xinit = host.get('xinit', {}) %>\ #!/bin/sh -% for output in xinit.get('outputs', []): +% for output in host.get('outputs', []): xrandr --output '${output['name']}' --set TearFree on \ % if output.get('config'): ${' '.join(output['config'])}\