diff --git a/hosts/default.toml b/hosts/default.toml index 958166a..cd37fc4 100644 --- a/hosts/default.toml +++ b/hosts/default.toml @@ -1,12 +1,18 @@ is-virtual = false base16-scheme = "seti" +wireless = [] +ethernet = [] disks = ["/"] system-font = "Fira Sans" system-mono-font = "Fira Mono" #temperature-path = "" +terminal = "alacritty" +lock-cmd = "swaylock -c 000000" +display-on-cmd = "swaymsg \"output * dpms on\"" +display-off-cmd = "swaymsg \"output * dpms off\"" + +inputs = [] [[outputs]] match = "*" background = ["~/.local/share/backgrounds/sway-dark-1920x1080.png", "fill"] - -inputs = [] diff --git a/templates/.config/alacritty/alacritty.toml b/templates/.config/alacritty/alacritty.toml index 8732903..d8ebcd9 100644 --- a/templates/.config/alacritty/alacritty.toml +++ b/templates/.config/alacritty/alacritty.toml @@ -1,5 +1,5 @@ [font] -% if host.get('is-virtual', False): +% if host['is-virtual']: size = 10 % else: size = 12 diff --git a/templates/.config/i3status/config b/templates/.config/i3status/config index 93ac096..6bbf804 100644 --- a/templates/.config/i3status/config +++ b/templates/.config/i3status/config @@ -5,7 +5,7 @@ general { ${get_base16('i3status')} -% for iface in host.get('wireless', []): +% for iface in host['wireless']: wireless ${iface} { format_up = "${iface} %ip %essid %quality" format_down = "${iface} down" @@ -13,7 +13,7 @@ wireless ${iface} { order += "wireless ${iface}" % endfor -% for iface in host.get('ethernet', []): +% for iface in host['ethernet']: ethernet ${iface} { format_up = "${iface} %ip" format_down = "${iface} down" @@ -38,7 +38,7 @@ battery all { } order += "battery all" -% for disk in host.get('disks', ['/']): +% for disk in host['disks']: disk "${disk}" { format = "${disk} %avail" } diff --git a/templates/.config/sway/config b/templates/.config/sway/config index 14c9cfc..8763a40 100644 --- a/templates/.config/sway/config +++ b/templates/.config/sway/config @@ -37,7 +37,7 @@ client.urgent $base08 $base08 $base00 $base08 $base08 client.placeholder $base01 $base01 $base05 $base01 $base01 client.background $base07 -% for output in host.get('outputs', []): +% for output in host['outputs']: output ${repr(output['match'])} { % for line in output['sway-lines']: ${line} @@ -45,7 +45,7 @@ output ${repr(output['match'])} { } % endfor -% for input in host.get('inputs', []): +% for input in host['inputs']: input ${repr(input['match'])} { % for line in input['sway-lines']: ${line} @@ -86,14 +86,14 @@ bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+q kill -bindsym $mod+Shift+p exec ${host.get('lock-cmd', 'swaylock -c 000000')} +bindsym $mod+Shift+p exec ${host['lock-cmd']} # Blank individual displays bindsym $mod+o output - dpms off # Unblank all displays bindsym $mod+Shift+o output * dpms on -bindsym $mod+Return exec ${host.get('terminal', 'alacritty')} +bindsym $mod+Return exec ${host['terminal']} bindsym $mod+d exec wofi --show drun bindsym $mod+Shift+d exec wofi --show run bindsym $mod+p exec wofi-pass diff --git a/templates/.config/swayidle/config b/templates/.config/swayidle/config index e66b25a..f681388 100644 --- a/templates/.config/swayidle/config +++ b/templates/.config/swayidle/config @@ -1,2 +1 @@ -timeout 10 'pgrep swaylock && ${host.get('display-off-cmd', 'swaymsg "output * dpms off"')}' \ -resume 'pgrep swaylock && ${host.get('display-on-cmd', 'swaymsg "output * dpms on"')}' +timeout 10 'pgrep swaylock && ${host['display-off-cmd']}' resume 'pgrep swaylock && ${host['display-on-cmd']}'