Add liberation host

This commit is contained in:
Adam Gausmann 2023-09-27 20:09:16 -05:00
parent 99806e6963
commit f3f5705097
4 changed files with 36 additions and 0 deletions

View file

@ -8,3 +8,5 @@ system-mono-font = "Fira Mono"
[[outputs]]
match = "*"
background = ["~/.local/share/backgrounds/sway-dark-1920x1080.png", "fill"]
inputs = []

12
hosts/liberation.toml Normal file
View file

@ -0,0 +1,12 @@
wireless = ["wlp170s0"]
#ethernet = ["enp2s0"]
temperature-path = "/sys/class/hwmon/hwmon4/temp1_input"
[[outputs]]
match = "eDP-1"
scale = 1.5
background = ["~/.local/share/backgrounds/sway-dark-1920x1080.png", "fill"]
[[inputs]]
match = "2362:628:PIXA3854:00_093A:0274_Touchpad"
tap = "enabled"

View file

@ -93,6 +93,20 @@ def main():
host_config['name'] = args.hostname
# Preprocess output configs for sway
for input in host_config['inputs']:
# Generate config lines for sway template
lines = []
for key in input:
if key == 'match':
continue
if isinstance(input[key], list):
val = ' '.join(repr(elem) for elem in input[key])
else:
val = repr(input[key])
lines.append(f'{key} {val}')
input['sway-lines'] = lines
for output in host_config['outputs']:
# Generate config lines for sway template
lines = []

View file

@ -45,6 +45,14 @@ output ${repr(output['match'])} {
}
% endfor
% for input in host.get('inputs', []):
input ${repr(input['match'])} {
% for line in input['sway-lines']:
${line}
% endfor
}
%endfor
gaps inner 8
input type:Mouse accel_profile flat