Archived
1
0
Fork 0
This repository has been archived on 2024-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/simpleDots/bin/lock-keyring.c
Joerg Elfring a26076b864 ALL NEW DOTFILES!
No more branches and no more Makefiles
2020-06-16 22:47:23 +02:00

16 lines
450 B
C

#include <stdio.h>
#include <gnome-keyring.h>
// To be compiled with:
// cc lock-keyring.c -o lock-keyring -Wall $(pkg-config gnome-keyring-1 --cflags --libs)
int main() {
GnomeKeyringResult lock_result = gnome_keyring_lock_all_sync();
if (lock_result == GNOME_KEYRING_RESULT_OK) {
printf("Successfully locked\n");
return 0;
} else {
printf("Error locking keyring: %d\n", lock_result);
return 1;
}
}