#include #include int main(int argc, char **argv) { Display *dpy = XOpenDisplay(NULL); int vol = 0; int path = 0; if(argc > 1) { path = atoi(argv[1]); } if(argc > 2) { vol = atoi(argv[2]); } if(path == 0) { printf("XBell(dpy, %d);\n", vol); XBell(dpy, vol); } else { printf("XkbBell(dpy, 0, %d, None);\n", vol); XkbBell(dpy, 0, vol, None); } XFlush(dpy); return 0; }