https://github.com/shouya/vigilare
X11 idle/sleep inhibition daemon
https://github.com/shouya/vigilare
desktop-utilities eww-widgets logind status-bar-indicator xscreensaver
Last synced: 27 days ago
JSON representation
X11 idle/sleep inhibition daemon
- Host: GitHub
- URL: https://github.com/shouya/vigilare
- Owner: shouya
- License: gpl-3.0
- Created: 2024-04-03T02:49:55.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-26T11:45:40.000Z (about 2 months ago)
- Last Synced: 2025-03-25T02:54:29.276Z (about 1 month ago)
- Topics: desktop-utilities, eww-widgets, logind, status-bar-indicator, xscreensaver
- Language: Rust
- Homepage:
- Size: 83 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* Vigilare
Vigilare is a DBus based service to inhibit system sleep for desktop users. I wrote this program because I need a status bar widget that allows me:
- to quickly adjust sleep inhibition time via mouse scroll
- see the accurate remaining time in the status bar
- has different ways to inhibit sleep** Main features
- inhibit sleep modes:
+ xscreensaver
+ logind
+ xfce4 power manager
+ xfce4 screensaver
+ simulated mouse activity
- increase/decrease duration of inhibition
- set duration of inhibition
- monitor for real-time remaining inhibition time in json
- asynchronous, efficient, light on system resources** Installation
#+begin_src bash
cargo build --release
cp target/release/vigilare ~/.local/bin
#+end_src** Usage
Here's a sample eww widget just for reference:
#+begin_src lisp
(deflisten vigilare :initial
'{"active":false,"mode":null,"remaining_seconds":null,"message":""}'
`vigilare monitor`)(defwidget vigilare-toggle []
(tooltip
(vigilare-toggle-tooltip)
(eventbox
:cursor "hand"
:onclick "(notify-send 'Display off in 2 secs'; sleep 2; xset dpms force off) &"
:onrightclick "(notify-send 'Suspending in 2 secs'; sleep 2; systemctl suspend) &"
:onscroll "test {} = up && vigilare msg +15m || vigilare msg -15m"
:class { vigilare.active ? "toggle-enabled" : "toggle-disabled" }
(box :space-evenly false
(label :visible {vigilare.mode!="null"} :text "${vigilare.mode}")
(label :visible {vigilare.message!=""} :text "/${vigilare.message}")))))(defwidget vigilare-toggle-tooltip []
(box
:orientation "v"
:space-evenly false
(label :xalign 0 :text "Left-click: screen-off")
(label :xalign 0 :text "Right-click: suspend")
(label :xalign 0 :text "Scroll: adjust duration")))
#+end_srcYou must start the dbus service with =vigilare daemon= for the widget to function. I recommend starting it in your X session startup script or systemd user service. An example systemd user service is provided in the repository.
Run =vigilare --help= for detailed usage information.