23 lines
442 B
PHP
Executable file
23 lines
442 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require __DIR__.'/base/block.php';
|
|
|
|
$format = $argv[1] ?? 'd/m/Y';
|
|
|
|
$fullText = pspan(emoji(0xf073).' '.date($format), color('date'), '#444').' ';
|
|
|
|
if (getenv('BLOCK_BUTTON') === '1') {
|
|
$command = 'export DISPLAY=:0; gnome-calendar';
|
|
pclose(popen($command, 'r'));
|
|
}
|
|
|
|
echo block(
|
|
'date',
|
|
[
|
|
'full_text' => $fullText,
|
|
'separator' => false,
|
|
'separator_block_width' => 0,
|
|
]
|
|
);
|