Coder Social home page Coder Social logo

cyrinux / waybar-eyes Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.57 MB

waybar toy to help you blinking eyes and move, take a break ๐Ÿ‘€

License: ISC License

Makefile 27.73% Go 70.02% CSS 2.25%
eyes face-detection gocv linux waybar sway wayland hyprland linux-desktop

waybar-eyes's Introduction

waybar-eyes

Go

This is a waybar applet to help you keeping your eyes.

This will try to detect your face and indicate you in waybar if you are stuck to your screen since too long time. This add a new eye in the bar every 15 minutes if a face is detected. This eyes number in the bar will decrease if you take a pause.

Requirements

  • golang >= 1.18
  • opencv4
  • qt5-base

Build

make

Config and run

Default value should be nice one. But if you want to configure it, you can run waybar-eyes -h to see the params, and maybe use a systemd unit override.

Waybar config

...
"modules-right": [
  "custom/eyes",
],
...
"custom/eyes": {
    "exec": "cat ~/.cache/waybar-eyes.json",
    "interval": 5,
    "return-type": "json",
    "on-click": "pkill -f -SIGUSR1 waybar-eyes",
},
...

Debug

DEBUG=1 waybar-eyes

Resources

You can test differents detection models from here

waybar-eyes's People

Contributors

cyrinux avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

waybar-eyes's Issues

Can't open file: 'haarcascade_frontalface_default.xml' in read mode

Hi there!
I installed from aur. Something went wrong. Faces = 0, when me is on camera.

DEBUG=1 waybar-eyes

[ WARN:[email protected]] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:[email protected]] global persistence.cpp:505 open Can't open file: 'haarcascade_frontalface_default.xml' in read mode
Error reading cascade file: haarcascade_frontalface_default.xml
{"text":"","tooltip":"","class":"ok","count":0,"faces":0}
[ WARN:[email protected]] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:[email protected]] global persistence.cpp:505 open Can't open file: 'haarcascade_frontalface_default.xml' in read mode
Error reading cascade file: haarcascade_frontalface_default.xml
{"text":"","tooltip":"","class":"ok","count":0,"faces":0}
[ WARN:[email protected]] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:[email protected]] global persistence.cpp:505 open Can't open file: 'haarcascade_frontalface_default.xml' in read mode
Error reading cascade file: haarcascade_frontalface_default.xml
{"text":"","tooltip":"","class":"ok","count":0,"faces":0}
[ WARN:[email protected]] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:[email protected]] global persistence.cpp:505 open Can't open file: 'haarcascade_frontalface_default.xml' in read mode
Error reading cascade file: haarcascade_frontalface_default.xml
{"text":"","tooltip":"","class":"ok","count":0,"faces":0}
[ WARN:[email protected]] global cap_gstreamer.cpp:1728 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
[ERROR:[email protected]] global persistence.cpp:505 open Can't open file: 'haarcascade_frontalface_default.xml' in read mode
Error reading cascade file: haarcascade_frontalface_default.xml
{"text":"","tooltip":"","class":"ok","count":0,"faces":0}

Looking at this log, seems file haarcascade_frontalface_default.xml is missing.

Anyways, i can see this file contents with cat on this path:

cat /usr/share/waybar-eyes/models/haarcascade_frontalface_default.xml

Env

Arch, Hyprland

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.