diff options
Diffstat (limited to '')
-rwxr-xr-x | .i3/scripts/conkystatus.sh | 13 | ||||
-rw-r--r-- | .i3/scripts/json_escape.lua | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/.i3/scripts/conkystatus.sh b/.i3/scripts/conkystatus.sh new file mode 100755 index 0000000..bb1bb8e --- /dev/null +++ b/.i3/scripts/conkystatus.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Send the header so that i3bar knows we want to use JSON: +echo '{"version":1}' + +# Begin the endless array. +echo '[' + +# We send an empty first array of blocks to make the loop simpler: +echo '[],' + +# Now send blocks with information forever: +exec conky -c $HOME/.i3/conkyrc diff --git a/.i3/scripts/json_escape.lua b/.i3/scripts/json_escape.lua new file mode 100644 index 0000000..03860b7 --- /dev/null +++ b/.i3/scripts/json_escape.lua @@ -0,0 +1,3 @@ +function conky_json(str) + return string.gsub(conky_parse(str), '[\\"]', '\\%1') +end |