0
Commit Graph

18 Commits

Author SHA1 Message Date
eleksir
5977c933a7 Import missing function 2022-04-30 01:32:15 +03:00
eleksir
d0f7426003 A bit more careful about substr 2022-04-30 01:24:23 +03:00
eleksir
d9719b1ddd Import only what we require 2022-04-30 01:07:15 +03:00
eleksir
2a588e5ae9 Fix 100% cpu usage when spawn nonexisting program 2022-04-30 01:04:19 +03:00
eleksir
2a33b7a4f3 Add .gitignore and make use of English 2021-10-31 21:04:53 +03:00
Sergei Fedosov
1f4e242253 Fix vpn status color when vpn not yet change status 2021-07-26 15:30:36 +03:00
Sergei Fedosov
91cf117ee8 Do not call AnyEvent->now_update every 2 minutes, as it looks useless in this script
We reload all event hendlers if time skew in script own counter more
than 60 seconds as per ab68a26e84, no
other timekeeping issues are reported, so considering
AnyEvent->now_update useless for this particular usecase.
2021-07-20 12:07:48 +03:00
Sergei Fedosov
371dc68667 Revert "Read all supplied lines from STDIN, not just first one."
This reverts commit 08bf20d43a. Do not
read whole STDIN as it somehow breaks whidow tracking feature.
2021-07-20 12:04:19 +03:00
Sergei Fedosov
08bf20d43a Read all supplied lines from STDIN, not just first one. 2021-07-20 01:58:15 +03:00
eleksir
24b7a97372 Fix assorted typos. 2021-07-19 23:16:25 +03:00
Sergei Fedosov
c634ca1f40 Use "xset q" as fallback for detecting capslock status if hardware keyboard is missing 2021-07-19 21:26:04 +03:00
Sergei Fedosov
fba1d3dc5d Use pictogram from config for simple-volume-pa plugin 2021-07-19 18:40:45 +03:00
Sergei Fedosov
f63dba554c use AnyEvent::Timer::Cron only if cron enabled in config 2021-07-19 17:26:43 +03:00
Sergei Fedosov
ab68a26e84 Sync AnyEvent timer (brutal way) if timeskew more than 60 seconds.
AnyEvent does not sync its timers with system time, so cron jobs that
scheduled for particular time, shoots with time skew after wakeup from
hibernate or suspend. And AnyEvent have no mechanism to sync its timers
with local system time. The only way to "sync" timers is to remove and
re-add watchers, so timers begin count time from beginning.

To workaround timekeeping issue for AnyEvent::Timer::Cron let's add
another time-based call back that will send SIGHUP to script if local
system time differs from time counter more than 60 seconds. SIGHUP
should trigger signal handler that remove all event watchers, re-read
config and re-add event watchers effectively reloads config and re-launch
timers for AnyEvent.
2021-07-19 14:42:30 +03:00
Sergei Fedosov
b801bf0a76 Color up upower battery status and vpn status 2021-07-19 14:07:50 +03:00
eleksir
9851c59f48 Add perlcritic, generate json output only on update
* Use perlcritic to lint script, add .perlcriticrc config
* Do not generate json on every output iteration, use $UPDATE variable
  to detect if updates are ready.
2021-07-18 18:59:58 +03:00
eleksir
f118f9e0b2 Добавлено немного документации 2021-04-11 13:09:16 +03:00
Eleksir
c5ce3773ad Initial commit 2021-04-09 16:19:56 +03:00