Skip to content

me-tiny/WayAFK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

WayAFK

Note: Fork for this plugin to work on the latest version of BetterDiscord

This is a simple plugin for BetterDiscord that fixes this longstanding bug with AFK detection on Wayland.

Normally, when running the Discord client under Wayland, the AFK detection will never fire. EVER. This means (among other things) that you won't receive mobile notifications while the client is open under Wayland, which is incredibly frustrating.

WayAFK fixes this by implementing its own form of AFK monitoring, then lying to Discord about your status once it's tripped.

  • On startup, WayAFK subscribes to the keydown and mousedown events. Whenever you press a key or use your mouse inside the Discord window, a timer will be reset.
  • Once a second, WayAFK checks to see if the time since your last "interaction" has exceeded the (user-configurable) timeout threshold.
    • If it has, WayAFK will send a "user is AFK" event, then start suppressing any events that say otherwise.
    • Once it detects another interaction, this behavior stops until the timeout is tripped again.

About

A BetterDiscord plugin that fixes AFK detection under Wayland display servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%