21 lines
389 B
PHP
21 lines
389 B
PHP
|
#!/usr/bin/php
|
||
|
<?php
|
||
|
|
||
|
require __DIR__.'/base/block.php';
|
||
|
|
||
|
$volume = shell_exec('amixer get Master | grep Mono:');
|
||
|
|
||
|
if ($volume) {
|
||
|
preg_match('/\[([0-9%]+)\]/', $volume, $mach);
|
||
|
|
||
|
if (isset($mach[1])) {
|
||
|
echo block(
|
||
|
'volume',
|
||
|
[
|
||
|
'full_text' => $mach[1].' ♪',
|
||
|
'color' => color('music'),
|
||
|
]
|
||
|
);
|
||
|
}
|
||
|
}
|