From b327fc0b25134e35b4d790248477c3641f024132 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Mon, 14 May 2018 17:18:32 -0400 Subject: [PATCH] sorted service list --- files/.local/bin/motd | 4 +++- files/.profile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files/.local/bin/motd b/files/.local/bin/motd index d69f6b3..c4d665c 100755 --- a/files/.local/bin/motd +++ b/files/.local/bin/motd @@ -82,7 +82,9 @@ def print_hostname(): def print_services(): if 'MOTD_SERVICES' in os.environ: print('Services:') - for service in set(os.environ['MOTD_SERVICES'].split()): + services = list(set(os.environ['MOTD_SERVICES'].split())) + services.sort() + for service in services: Termutils.print_padded('{:<15.15}'.format(service), end='') try: check_call(['systemctl', 'is-active', service], stdout=DEVNULL, stderr=DEVNULL) diff --git a/files/.profile b/files/.profile index ad10f71..4b657ef 100644 --- a/files/.profile +++ b/files/.profile @@ -9,7 +9,7 @@ export EDITOR=vim export PAGER=less # motd -export MOTD_SERVICES="docker.socket $MOTD_SERVICES" +export MOTD_SERVICES="$MOTD_SERVICES docker.socket libvirtd" # firefox export MOZ_USE_XINPUT2=1