From 7e2f254204df2790a8e2b4000e3a934dff5e7126 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sun, 8 Mar 2020 19:51:45 +0100 Subject: [PATCH] i3blocks: move win title to separate script --- .config/i3blocks/config | 2 +- .config/i3blocks/win-title | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 .config/i3blocks/win-title diff --git a/.config/i3blocks/config b/.config/i3blocks/config index a2565d2..6159730 100644 --- a/.config/i3blocks/config +++ b/.config/i3blocks/config @@ -3,7 +3,7 @@ separator_block_width=40 [window] align=left -command=swaymsg -t subscribe -m '["window"]' | stdbuf -oL jq --unbuffered -M -r '.container.name // empty' | stdbuf -oL cut -c -80 | stdbuf -oL sed -e 's/ *$//' +command=~/.config/i3blocks/win-title interval=persist background=#000000cc diff --git a/.config/i3blocks/win-title b/.config/i3blocks/win-title new file mode 100755 index 0000000..3fe0e73 --- /dev/null +++ b/.config/i3blocks/win-title @@ -0,0 +1,8 @@ +#!/bin/sh +set -o pipefail +while true; do + swaymsg -t subscribe -m '["window"]' \ + | stdbuf -oL jq --unbuffered -M -r '.container.name // empty' \ + | stdbuf -oL cut -c -80 \ + | stdbuf -oL sed -e 's/ *$//' +done