Flatten host configs
This commit is contained in:
		
							parent
							
								
									e776796788
								
							
						
					
					
						commit
						5314abc837
					
				
					 5 changed files with 4 additions and 15 deletions
				
			
		|  | @ -1,9 +1,6 @@ | ||||||
| [i3status] |  | ||||||
| wireless = ["wlp4s0"] | wireless = ["wlp4s0"] | ||||||
| ethernet = ["enp2s0"] | ethernet = ["enp2s0"] | ||||||
| disks = ["/", "/home", "/media/hdd"] | disks = ["/", "/home", "/media/hdd"] | ||||||
| 
 |  | ||||||
| [xinit] |  | ||||||
| outputs = [ | outputs = [ | ||||||
|     { name = "eDP", config = ["--auto", "--primary"] }, |     { name = "eDP", config = ["--auto", "--primary"] }, | ||||||
|     { name = "HDMI-A-0" }, |     { name = "HDMI-A-0" }, | ||||||
|  |  | ||||||
|  | @ -1,8 +1,5 @@ | ||||||
| [i3status] |  | ||||||
| ethernet = ["enp5s0"] | ethernet = ["enp5s0"] | ||||||
| disks = ["/", "/home"] | disks = ["/", "/home"] | ||||||
| 
 |  | ||||||
| [xinit] |  | ||||||
| outputs = [ | outputs = [ | ||||||
|     { name = "HDMI-A-0", config = ["--auto", "--primary"] }, |     { name = "HDMI-A-0", config = ["--auto", "--primary"] }, | ||||||
|     { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, |     { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, | ||||||
|  |  | ||||||
|  | @ -1,9 +1,6 @@ | ||||||
| [i3status] |  | ||||||
| wireless = ["wlp36s0"] | wireless = ["wlp36s0"] | ||||||
| ethernet = ["enp37s0"] | ethernet = ["enp37s0"] | ||||||
| disks = ["/", "/home"] | disks = ["/", "/home"] | ||||||
| 
 |  | ||||||
| [xinit] |  | ||||||
| outputs = [ | outputs = [ | ||||||
|     { name = "HDMI-A-1", config = ["--auto", "--primary"] }, |     { name = "HDMI-A-1", config = ["--auto", "--primary"] }, | ||||||
|     { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, |     { name = "DVI-D-0", config = ["--auto", "--left-of", "HDMI-A-0"] }, | ||||||
|  |  | ||||||
|  | @ -1,10 +1,9 @@ | ||||||
| <% i3status = host.get('i3status', {}) %>\ |  | ||||||
| general { | general { | ||||||
|     colors = true |     colors = true | ||||||
|     interval = 5 |     interval = 5 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| % for iface in i3status.get('wireless', []): | % for iface in host.get('wireless', []): | ||||||
| wireless ${iface} { | wireless ${iface} { | ||||||
|     format_up = "${iface} %ip %essid %quality" |     format_up = "${iface} %ip %essid %quality" | ||||||
|     format_down = "${iface} down" |     format_down = "${iface} down" | ||||||
|  | @ -12,7 +11,7 @@ wireless ${iface} { | ||||||
| order += "wireless ${iface}" | order += "wireless ${iface}" | ||||||
| 
 | 
 | ||||||
| % endfor | % endfor | ||||||
| % for iface in i3status.get('ethernet', []): | % for iface in host.get('ethernet', []): | ||||||
| ethernet ${iface} { | ethernet ${iface} { | ||||||
|     format_up = "${iface} %ip" |     format_up = "${iface} %ip" | ||||||
|     format_down = "${iface} down" |     format_down = "${iface} down" | ||||||
|  | @ -20,7 +19,7 @@ ethernet ${iface} { | ||||||
| order += "ethernet ${iface}" | order += "ethernet ${iface}" | ||||||
| 
 | 
 | ||||||
| % endfor | % endfor | ||||||
| % for disk in i3status.get('disks', ['/']): | % for disk in host.get('disks', ['/']): | ||||||
| disk "${disk}" { | disk "${disk}" { | ||||||
|     format = "${disk} %avail" |     format = "${disk} %avail" | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,7 +1,6 @@ | ||||||
| <% xinit = host.get('xinit', {}) %>\ |  | ||||||
| #!/bin/sh | #!/bin/sh | ||||||
| 
 | 
 | ||||||
| % for output in xinit.get('outputs', []): | % for output in host.get('outputs', []): | ||||||
| xrandr --output '${output['name']}' --set TearFree on \ | xrandr --output '${output['name']}' --set TearFree on \ | ||||||
| % if output.get('config'): | % if output.get('config'): | ||||||
| ${' '.join(output['config'])}\ | ${' '.join(output['config'])}\ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue