29 lines
600 B
PHP
Executable file
29 lines
600 B
PHP
Executable file
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require __DIR__.'/base/block.php';
|
|
|
|
$format = $argv[1] ?? 'H:i:s';
|
|
|
|
$fullText = ' '.date($format);
|
|
|
|
if (getenv('BLOCK_BUTTON') === '1') {
|
|
$command = 'export DISPLAY=:0; gnome-calendar';
|
|
pclose(popen($command, 'r'));
|
|
}
|
|
|
|
if (date('H:i:s') === '13:37:00') {
|
|
shell_exec('notify-send "1337" "Powaaaa" --icon=/home/simon/Images/if_geek_zombie_60815.png');
|
|
}
|
|
|
|
$fullText = pspan(emoji(0xf073).$fullText, color('date'), '#444');
|
|
|
|
echo block(
|
|
'time',
|
|
[
|
|
'full_text' => $fullText,
|
|
'separator' => false,
|
|
'separator_block_width' => 0,
|
|
]
|
|
);
|