From 76a4051d09573f36bd9cbd299cced6c29ee6bc11 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Sun, 29 Nov 2015 13:06:21 +0100 Subject: [PATCH] Show hostname on statusbar --- config/i3/config | 2 +- config/i3status/status.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 config/i3status/status.sh diff --git a/config/i3/config b/config/i3/config index c840506..fd3a3e5 100644 --- a/config/i3/config +++ b/config/i3/config @@ -295,7 +295,7 @@ mode "$mode_screen_HDMI1" { # Start i3bar to display a workspace bar (plus the system information i3status if available) bar { mode hide - status_command i3status + status_command ~/.config/i3status/status.sh # wheel_up_cmd nop # wheel_down_cmd nop font pango:DejaVu Sans Mono 9 diff --git a/config/i3status/status.sh b/config/i3status/status.sh new file mode 100755 index 0000000..1344755 --- /dev/null +++ b/config/i3status/status.sh @@ -0,0 +1,7 @@ +i3status | (read line && echo $line && read line && echo $line && while : +do +read line + dat=$(cat /etc/hostname) + dat="[{ \"full_text\": \"${dat}\" }," + echo "${line/[/$dat}" || exit 1 +done)