I want to write a Gnome-Shell extension that can tell how long a session has not received any user input. I know that calling XScreenSaverQueryInfo will give me that information, but I can't find a way to call it from my gjs extension. What do I need to do to get this to work?
Using C libraries from a Gnome-Shell extension
753 Views Asked by Dan At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in GNOME
- In fedora Linux, Waydroid opens in fullscreen mode, but in gnome the top panel is not hidden
- Do Qt based applications run better on KDE Plasma than on Gnome with Qt installed as a dependency?
- Callback function doesn't modify widget
- ValueError: Namespace Xdp not available
- Simple Example of AdwViewSwitcher from libadwaita
- How I can send Ctrl-l key input to the GNOME file chooser dialog with at-spi2?
- How to configure XRDP to work with Gnome on Ubuntu 22.04?
- gnome-search custom provider for a specific user
- Is there any difference between actions in GTK and using signals directly?
- libxml2: Fixed/default attributes in XSD
- Not able to build gnome-calendar on builder
- How to intercept clipboard operations on Linux Wayland/Mutter/GNOME
- Position Selenium Firefox driver
- Python 3: How do I assert that the value of a gobject.GParamSpec is of a particular type?
- Change border color of GtkButton when focused
Related Questions in GNOME-SHELL
- How to intercept clipboard operations on Linux Wayland/Mutter/GNOME
- How to find CPU usage in a specific part in a single application on linux?
- How to apply gsetting timeout settings only for a specific gnome shell rather than in the entire system?
- App icon from deb package not showing on Gnome
- How to maintain a gnome-extension collaboratively?
- gnome-shell span_command_line_sync command is giving numerical values instead of text
- How to deiconify and raise Tk window when using GNOME as desktop environment
- gnome-shell extension crashes repeatedly with GLib-ERROR: Creating pipes for GWakeup: too many open files
- Can I create my dashboard as a "Taskbar" or "Status Area"?
- How does one GNOME extension know whether another GNOME extension is installed or not
- Simplest way to prompt for user input using gjs for a gnome extension
- Gnome 3 Classic Icon Placement
- Could not find Meta, Shell & St in Python's GTK bindings which gnome extension documentaion has
- Suspend after screen lock in GNOME on Xorg
- Gnome extensions not working after upgrading to gnome-shell 44.2
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Probably the easiest way to do this is to use D-Bus to call the
org.gnome.Mutter.IdleMonitor.GetIdletimemethod on the/org/gnome/Mutter/IdleMonitor/Corepath oforg.gnome.Shell. That will give you the time in milliseconds that the shell has not seen any user input for.You can test this on the command line using:
You can use GIO’s D-Bus support from GJS to call the method from your extension. There’s an example here.