2021-03-03 21:31:06 +01:00
|
|
|
#!/usr/bin/env php
|
2017-06-19 16:36:59 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require __DIR__.'/base/block.php';
|
|
|
|
|
|
|
|
$format = $argv[1] ?? 'H:i:s';
|
|
|
|
|
2020-01-14 11:35:27 +01:00
|
|
|
$fullText = ' '.date($format);
|
2017-06-19 16:36:59 +02:00
|
|
|
|
2017-12-04 19:41:16 +01:00
|
|
|
if (getenv('BLOCK_BUTTON') === '1') {
|
2020-01-14 11:35:27 +01:00
|
|
|
$command = 'export DISPLAY=:0; gnome-calendar';
|
|
|
|
pclose(popen($command, 'r'));
|
2017-12-04 19:41:16 +01:00
|
|
|
}
|
|
|
|
|
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');
|
|
|
|
}
|
|
|
|
|
2020-01-14 11:35:27 +01:00
|
|
|
$fullText = pspan(emoji(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
|
|
|
]
|
|
|
|
);
|