From 7db0ae8e10a7f9b089d73126c0bfbdb33c3dc620 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Fri, 14 Oct 2022 12:52:35 +0200 Subject: [PATCH] fish: Clean up duplicate init code --- tree/.config/fish/config.fish.tpl | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tree/.config/fish/config.fish.tpl b/tree/.config/fish/config.fish.tpl index ee9fe3b..8d3d620 100644 --- a/tree/.config/fish/config.fish.tpl +++ b/tree/.config/fish/config.fish.tpl @@ -10,6 +10,7 @@ set -x QT_STYLE_OVERRIDE Oxygen {% if hostname == "buran" %} set -x QT_QPA_PLATFORMTHEME qt5ct +set -x DEFMT_LOG info # default logging level for defmt {% end %} {% if username == "u0_a213" %} @@ -54,20 +55,11 @@ zoxide init fish | source starship init fish | source -{% if hostname == "sputnik" %} +{% if hostname != "vostok" %} # start sway if logging in on tty 1 if status is-login - if test $XDG_SESSION_TYPE = "tty" -a $XDG_VTNR = "1" - exec sway - end -end -{% elif hostname == "buran" %} -set -x DEFMT_LOG info # default logging level for defmt - -# start sway if logging in on tty 1 -if status is-login - if test $XDG_SESSION_TYPE = "tty" -a $XDG_VTNR = "1" - exec sway - end +and set -q XDG_SESSION_TYPE XDG_VTNR +and test $XDG_SESSION_TYPE = "tty" -a $XDG_VTNR = "1" + exec sway end {% end %}