diff options
Diffstat (limited to 'dot_config/sway/executable_display-toggle.sh')
| -rwxr-xr-x | dot_config/sway/executable_display-toggle.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dot_config/sway/executable_display-toggle.sh b/dot_config/sway/executable_display-toggle.sh index 07fa59e..39e3367 100755 --- a/dot_config/sway/executable_display-toggle.sh +++ b/dot_config/sway/executable_display-toggle.sh @@ -15,14 +15,14 @@ STATE_FILE="${XDG_RUNTIME_DIR:-/tmp}/display-mode" OUTPUTS_CONF="${XDG_CONFIG_HOME:-$HOME/.config}/sway/outputs.conf" write_conf() { - # $1 = mode (laptop-off | side-by-side | laptop-only) - # remaining args are the sway `output ...` directives, one per arg. - { - printf '# Auto-generated by display-toggle.sh; do not edit.\n' - printf '# Current mode: %s\n' "$1" - shift - for line in "$@"; do printf '%s\n' "$line"; done - } >"$OUTPUTS_CONF" + # $1 = mode (laptop-off | side-by-side | laptop-only) + # remaining args are the sway `output ...` directives, one per arg. + { + printf '# Auto-generated by display-toggle.sh; do not edit.\n' + printf '# Current mode: %s\n' "$1" + shift + for line in "$@"; do printf '%s\n' "$line"; done + } >"$OUTPUTS_CONF" } OUTPUTS=$(swaymsg -t get_outputs -r) |
