File: layout.sh

package info (click to toggle)
herbstluftwm 0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 684 kB
  • sloc: ansic: 6,168; sh: 399; makefile: 117
file content (18 lines) | stat: -rwxr-xr-x 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

# print layout of all tags, and colorizes all window ids
# it's useful to get a overview over the list of all windows

hc=${herbstclient_command:-herbstclient}

$hc complete 1 use |
while read tag ; do
    echo -n "$tag "
    indent=$(echo -n "$tag "|sed 's/./ /g')
    # prepend indent, except in first line
    $hc layout "$tag" \
        | sed "2,\$ s/^/$indent/" \
        | sed "s/\(0x[0-9a-f]\{1,\}\)/$(tput setaf 3)\1$(tput sgr0)/g"
done