/usr/share/doc/herbstluftwm/examples/loadstate.sh is in herbstluftwm 0.7.0-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env bash
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
# loads layouts for each tag coming from stdin
# the format is the one created by savestate.sh
# a common usage is:
# savestate.sh > mystate
# and sometime later:
# loadstate.sh < mystate
while read line ; do
tag="${line%%: *}"
tree="${line#*: }"
hc add "$tag"
hc load "$tag" "$tree"
done
|