Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

#define MOD Mod4Mask

//bar stuff:
/*
#define GAP_SIZE bar_height
const char* barname = "bar" // for lemonbar
*/

const char* menu[] = {"dmenu_run", 0};
const char* term[] = {"st", 0};
const char* scrot[] = {"scr", 0};
Expand Down
18 changes: 14 additions & 4 deletions sowm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <string.h>

#include "sowm.h"

Expand Down Expand Up @@ -138,8 +139,7 @@ void win_fs(const Arg arg) {

if ((cur->f = cur->f ? 0 : 1)) {
win_size(cur->w, &cur->wx, &cur->wy, &cur->ww, &cur->wh);
XMoveResizeWindow(d, cur->w, 0, 0, sw, sh);

XMoveResizeWindow(d, cur->w, 0, GAP_SIZE, sw, sh - GAP_SIZE);
} else {
XMoveResizeWindow(d, cur->w, cur->wx, cur->wy, cur->ww, cur->wh);
}
Expand Down Expand Up @@ -188,7 +188,17 @@ void ws_go(const Arg arg) {

ws_sel(tmp);

for win XUnmapWindow(d, c->w);
for win {
char* winame = NULL;
if (!XFetchName(d, c->w, &winame) || winame == NULL) {
XUnmapWindow(d, c->w);
} else {
if (strncmp(winame, barname, strlen(barname))) {
XUnmapWindow(d, c->w);
}
XFree(winame);
}
}

ws_sel(arg.i);

Expand Down Expand Up @@ -279,7 +289,7 @@ int main(void) {
root = RootWindow(d, s);
sw = XDisplayWidth(d, s);
sh = XDisplayHeight(d, s);

XSelectInput(d, root, SubstructureRedirectMask);
XDefineCursor(d, root, XCreateFontCursor(d, 68));
input_grab(root);
Expand Down