Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
michael105 committed Oct 15, 2024
1 parent ded3706 commit 54c4717
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
8 changes: 4 additions & 4 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int fontspacing = 0;
int borderperc = 40;

/*
* What program is execed by st depends of these precedence rules:
* What program is execed by slterm depends of these precedence rules:
* 1: program passed with -e
* 2: utmp option
* 3: SHELL environment variable
Expand Down Expand Up @@ -63,7 +63,7 @@ static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;

/* frames per second st should at maximum draw to the screen */
/* frames per second slterm should at maximum draw to the screen */
/* set to log(framerate) -> log(128) = 7; log(64) = 6; log(32) = 5 */
#define xfps_shift 7
#define actionfps_shift 5
Expand All @@ -86,14 +86,14 @@ static unsigned int cursorthickness = 2;
static int bellvolume = 50;

/* default TERM value */
char *termname = "st-256color";
char *termname = "slterm-256color";

/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the slterm.info and appropriately install the slterm.info in the environment where
* you use this st version.
* you use this slterm version.
*
* it#$tabspaces,
*
Expand Down
7 changes: 7 additions & 0 deletions src/globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ Term *p_alt=0;
int borderpx;
int enterlessmode;


XWindow xw;
TermWindow win;




// in selection.c
//Selection sel;
//XSelection xsel;
Expand Down
5 changes: 3 additions & 2 deletions src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// number of saved scroll marks, set with enter.
// needs to be a power of 2.
// memory usage is RETMARKCOUNT*4 bytes,
// and the is scanned linear when browsing to the marks.
// and the array is scanned linear when browsing to the marks.
#define RETMARKCOUNT 512


Expand Down Expand Up @@ -93,7 +93,7 @@ typedef struct {
extern DC dc;


/* Purely graphic info */
/* Display info of the text window */
typedef struct {
int tw, th; /* tty width and height */
int w, h; /* window width and height */
Expand All @@ -107,6 +107,7 @@ typedef struct {

extern TermWindow win;

// The xwindow data
typedef struct {
Display *dpy;
Colormap cmap;
Expand Down
13 changes: 1 addition & 12 deletions src/x.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ typedef struct {
#undef IS_SET
#endif
#define IS_SET(flag) ((win.mode & (flag)) != 0)
#define TRUERED(x) (((x)&0xff0000) >> 8)
#define TRUEGREEN(x) (((x)&0xff00))
#define TRUEBLUE(x) (((x)&0xff) << 8)

int xgeommasktogravity(int);
void ximopen(Display *);
Expand All @@ -50,14 +47,6 @@ void xresize(int, int);
void xsetenv(void);
void xseturgency(int);

void usage(void);


/* Globals */
XWindow xw;
TermWindow win;



void resettitle(void) { xsettitle(NULL); }

Expand Down Expand Up @@ -100,7 +89,7 @@ void xresize(int col, int row) {

void xhints(void) {
#ifdef XRESOURCES
XClassHint class = {opt_name ? opt_name : "st", opt_class ? opt_class : "St"};
XClassHint class = {opt_name ? opt_name : "slterm", opt_class ? opt_class : "Slterm"};
#else
XClassHint class = {opt_name ? opt_name : termname,
opt_class ? opt_class : termname};
Expand Down

0 comments on commit 54c4717

Please sign in to comment.