i3blocks: move win title to separate script
This commit is contained in:
parent
75c5b20eb7
commit
7e2f254204
2 changed files with 9 additions and 1 deletions
|
@ -3,7 +3,7 @@ separator_block_width=40
|
||||||
|
|
||||||
[window]
|
[window]
|
||||||
align=left
|
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
|
interval=persist
|
||||||
background=#000000cc
|
background=#000000cc
|
||||||
|
|
||||||
|
|
8
.config/i3blocks/win-title
Executable file
8
.config/i3blocks/win-title
Executable file
|
@ -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
|
Loading…
Reference in a new issue