refresh = 1
# [exec]
# program = python3
# separator = 10
# parser = i3
# _color = blue
# stdin
# import time
#
# i = 0
# while True:
# i += 1
# print('[{"full_text":"PYTHON '+str(i)+'", "short_text":"P", "color":"#00FFFF", "background":"red", "border":"blue", "border_top":3, "min_width":"AHOJ PYTHON", "align":"center", "urgent":true, "separator": false, "separator_block_width":30, "markup":"pango"}]', flush=True)
# time.sleep(3)
# [osdd_last]
# type = _pipe
# path = $XDG_RUNTIME_DIR/osdd_to_i3csstatus
# [pipe]
# path = a
# show_old = 5
# max_old = 10
# no_data_handler
# [constant]
# text = AHOJ
# [api_time]
# _type=http
# url = http://worldtimeapi.org/api/timezone/Europe/Prague
# period = 30
# max_old = 20
# show_old = 10
[osdd_last]
_type = file
path = ~/.osdd_last
_exec = terminal -e bash -i -c "tail -n500 ~/.osdd_log;read"
[offlineimap_status]
_type = file
path = ~/.offlineimap.log
[checkmail_status]
_type = file
path = ~/.cm
_exec = i3-workspace goto-workspace --workspace MAIL
[wireless_channel]
_type = exec
parser = i3
program = python3
arguments = -u
delay = 1
separator = 10
stdin
import sys
import time
import subprocess
i = 0
while True:
try:
process = subprocess.Popen(["iwlist", "channel"], stdout=subprocess.PIPE)
ch = int(process.communicate()[0].decode().split("\n")[-3].split()[4][:-1])
print(f'[{{"full_text":"{ch}"}}]', flush=True)
except Exception as e:
print(e, file=sys.stderr)
print("[]", flush=True)
time.sleep(10);
[wireless]
_type=i3status
name = wireless _first_
config<