From 10d1990f0d3dda1cfb0ed861c0c9cdcaea1ce39d Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 15 Jan 2024 01:25:11 +0300 Subject: [PATCH] update --- .gitignore | 1 + .openbox.metadata | 1 + SOURCES/setlayout.c | 52 --------------------------------------------- 3 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 SOURCES/setlayout.c diff --git a/.gitignore b/.gitignore index 1712ebe..d774a22 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ SOURCES/openbox-3.6.1.tar.xz +SOURCES/setlayout.c diff --git a/.openbox.metadata b/.openbox.metadata index 7e61841..420761b 100644 --- a/.openbox.metadata +++ b/.openbox.metadata @@ -1 +1,2 @@ a1f148aedda01f772ce26496dd950e52b57ef62d SOURCES/openbox-3.6.1.tar.xz +8e401351248eb5542cf0f471f41793fd385adead SOURCES/setlayout.c diff --git a/SOURCES/setlayout.c b/SOURCES/setlayout.c deleted file mode 100644 index 1ad0f9b..0000000 --- a/SOURCES/setlayout.c +++ /dev/null @@ -1,52 +0,0 @@ -/* To compile this program, run - * gcc -o setlayout setlayout.c -lX11 - */ -#include -#include -#include -#include -#include - -/* orientation of pager */ -#define _NET_WM_ORIENTATION_HORZ 0 -#define _NET_WM_ORIENTATION_VERT 1 - -/* starting corner for counting spaces */ -#define _NET_WM_TOPLEFT 0 -#define _NET_WM_TOPRIGHT 1 -#define _NET_WM_BOTTOMRIGHT 2 -#define _NET_WM_BOTTOMLEFT 3 - -int main(int argc, char *argv[]) { - unsigned long data[4]; - Display *display; - int screen; - Window root; - - if (argc < 4) { - printf("pls, you need to give 4 numbers to me.\n" - "The first is layout, 0 is horizontal and 1 is vertical.\n" - "Second and third is number of desks horizontally and vertically.\n" - "The last is starting corner, 0 = topleft, 1 = topright,\n" - " 2 = bottomright, 3 = bottomleft.\n"); - return 1; - } - - data[0] = atoi(argv[1]); //_NET_WM_ORIENTATION_HORZ; - data[1] = atoi(argv[2]); - data[2] = atoi(argv[3]); - data[3] = atoi(argv[4]); //_NET_WM_TOPLEFT; - - display = XOpenDisplay(NULL); - screen = DefaultScreen(display); - root = RootWindow(display, screen); - - XChangeProperty(display, root, - XInternAtom(display, "_NET_DESKTOP_LAYOUT", False), - XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&data, 4); - - XFlush(display); - XCloseDisplay(display); - - return 0; -}