Skip to content

Instantly share code, notes, and snippets.

@johnpoth
Created November 25, 2016 14:06
Show Gist options
  • Save johnpoth/1e4972b041c316cd6a152ea9d840ce55 to your computer and use it in GitHub Desktop.
Save johnpoth/1e4972b041c316cd6a152ea9d840ce55 to your computer and use it in GitHub Desktop.
decset: decset.c
gcc `pkg-config --cflags --libs glib-2.0` -c decset.c
decset.c file:
#include <string.h>
#include <glib.h>
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
#include <signal.h>
#include <fcntl.h>
#define _VTE_CAP_ESC "\033" /* Escape */
#define _VTE_CAP_CSI _VTE_CAP_ESC "[" /* Control Sequence Introducer */
static int tracking_mode = 0;
static gboolean tracking_focus_mode = FALSE;
int main(void)
{
}
static void
decset(int mode, gboolean value)
{
fprintf(stdout, _VTE_CAP_CSI "?%d%c", mode, value ? 'h' : 'l');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment