This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* /\___/\ | |
* ) ( Conway's Game of life | |
* =\ /= | |
* ) ( | |
* / \ by xorg62 <xorg62@gmail.com> | |
* ( ) | |
* / \ | |
* \ / This software is under BSD license. | |
* \__ _/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* hftirc2 by Martin Duquesnoy <xorg62@gmail.com> | |
* For license, see COPYING | |
*/ | |
#ifndef HFTIRC_H | |
#define HFTIRC_H | |
#define_XOPEN_SOURCE_EXTENDED 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* hftirc2 by Martin Duquesnoy <xorg62@gmail.com> | |
* For license, see COPYING | |
*/ | |
#ifndef HFTIRC_H | |
#define HFTIRC_H | |
#define_XOPEN_SOURCE_EXTENDED 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* status.c for WMFS² | |
* xorg62 | |
* cc status.c -lX11 -lmpdclient -o status | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Get client with x/y position on root window */ | |
Client* | |
get_client_with_pos(int x, int y) | |
{ | |
Client *c; | |
Window w; | |
int d, dx, dy, basex, basey; | |
if(x < 1 || x > sgeo[selscreen].width | |
|| y < 1 || y > sgeo[selscreen].height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
tile_factor_set(Client *c, Position p, int fac) | |
{ | |
Client *gc = NULL; | |
int x, y; | |
XRectangle cgeo, scgeo; | |
char scanfac[4][3] = | |
{ | |
{ 1, 0 }, { -1, 0 }, /* Right, Left */ | |
{ 0, -1 }, { 0, 1 } /* Top, Bottom */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void | |
tile_factor_set(Client *c, Position p, int fac) | |
{ | |
Client gc = NULL; | |
int cpos, i, x, y; | |
char scanfac[4][2] = | |
{ | |
{ 1, 0 }, { -1, 0 }, /* Right, Left */ | |
{ 0, -1 }, { 0, 1 } /* Top, Bottom */ | |
}; |