Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
retoor12029252d@jestdotty this is what mine says:
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/scrnsaver.h>
int main() {
Display *display;
Window root;
XScreenSaverInfo *info;
unsigned int delay;
// Open the display
display = XOpenDisplay(NULL);
if (!display) {
fprintf(stderr, "Unable to open display\n");
return 1;
}
root = DefaultRootWindow(display);
info = XScreenSaverAllocInfo();
while (1) {
XScreenSaverQueryInfo(display, root, info);
delay = info->idle;
printf("Idle time: %u seconds\n", delay);
// Add your screensaver logic here
// For example, draw something on the screen
XFree(info);
// Sleep for a while
sleep(1);
}
// Close the display
XCloseDisplay(display);
return 0;
}
Seems legit and...
xscreensaver-command -activate
Or
gnome-screensaver-command --activate
sudo cp screensaver /usr/local/bin -
retoor12029252dAnd it recommends sdl for graphics. But sdl is hard.
What will your Screensaver do? -
thebiochemic3019252di usually just used komorebi, and get some video background (or even rendered it myself via blender) with a bunch of layers n shit. works like a charm.
currently i stopped using that in favor of a dual screen wallpaper via hydrapaper
but to be fair, that's wallpaper, not screensaver 😅
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
ok I give up trying to make a screensaver for Linux
I don't even have anything to rant about
just everything I tried didn't work and nothing makes sense
I'm gonna find somewhere to bury my woes
this is so stupid, too. because I can just query the system if it's idle, run my app, and then ask my app to exit if there's any user input. but instead I'm trying to integrate it with the existing screensaver software. which evidently never runs my application for God knows what reason. and I'm tired of reading 100 pages hunting for the answer. where's my arch wiki page for how to make a screensaver =[
rant
screensaver
linux