doti3/bar/src/time.php

28 lines
559 B
PHP
Raw Normal View History

2019-01-28 11:13:11 +01:00
#!/usr/bin/php7.1
2017-06-19 16:36:59 +02:00
<?php
require __DIR__.'/base/block.php';
$format = $argv[1] ?? 'H:i:s';
$fullText = date($format);
2017-12-04 19:41:16 +01:00
if (getenv('BLOCK_BUTTON') === '1') {
shell_exec('i3-msg \'workspace "3. MAIL"\'');
}
2018-01-03 13:53:49 +01:00
if (date('H:i:s') === '13:37:00') {
shell_exec('notify-send "1337" "Powaaaa" --icon=/home/simon/Images/if_geek_zombie_60815.png');
}
2019-01-28 11:13:11 +01:00
$fullText = span(pemoji(0xf073).$fullText, color('date'), '#444');
2019-01-21 16:20:04 +01:00
2017-06-19 16:36:59 +02:00
echo block(
2017-12-04 19:41:16 +01:00
'time',
2017-06-19 16:36:59 +02:00
[
'full_text' => $fullText,
2019-01-21 16:20:04 +01:00
'separator' => false,
'separator_block_width' => 0,
2017-06-19 16:36:59 +02:00
]
);