X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=src%2Fawk%2Fexe%2Factuate_status_bar_to_xsetroot_name.awk;h=38287716aa9e676c10f39a50f956fe28986ae8bd;hb=03b7d2469c4f96d304ee710aec18d3941d7deae9;hp=60966c32e95962ccec48f8766d977894b8fa8fcd;hpb=03c229bffd594c1facb72e0d042a88c0505c8dbc;p=khatus.git diff --git a/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk b/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk old mode 100755 new mode 100644 index 60966c3..3828771 --- a/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk +++ b/src/awk/exe/actuate_status_bar_to_xsetroot_name.awk @@ -1,13 +1,11 @@ -$1 == "OK" && \ -$2 == "khatus_bar" && \ -$3 == "status_bar" { - # Not just using $4 for val - because val might contain a character - # identical to FS - len_line = length($0) - len_head = length($1 FS $2 FS $3 FS) - len_val = len_line - len_head - val = substr($0, len_head + 1, len_val) +{ + delete msg + msg_parse(msg, $0) +} - system("xsetroot -name \"" val "\"") +msg["node"] == Node && \ +msg["module"] == "khatus_bar" && \ +msg["type"] == "status_bar" { + system("xsetroot -name \"" msg["status_bar"] "\"") next }