mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-08-04 06:01:58 -07:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6b8a169b9d | ||
|
f201a467ea | ||
|
7821aac0d2 | ||
|
a1c80d9b23 | ||
|
0df345e1da | ||
|
b5087acaac |
4
Makefile
4
Makefile
@@ -9,8 +9,8 @@ all: config.h sowm
|
|||||||
config.h:
|
config.h:
|
||||||
cp config.def.h config.h
|
cp config.def.h config.h
|
||||||
|
|
||||||
sowm: sowm.o
|
sowm:
|
||||||
$(CC) $(LDFLAGS) -O3 -o sowm sowm.c -lX11
|
$(CC) -O3 $(CFLAGS) -o sowm sowm.c -lX11 $(LDFLAGS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm
|
install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm
|
||||||
|
@@ -9,7 +9,8 @@ An itsy bitsy floating window manager (*220~ sloc / 24kb compiled!*).
|
|||||||
- Window centering.
|
- Window centering.
|
||||||
- Mix of mouse and keyboard workflow.
|
- Mix of mouse and keyboard workflow.
|
||||||
- Focus with cursor.
|
- Focus with cursor.
|
||||||
- Rounded corners (*[through patch](https://github.com/dylanaraps/sowm-patches)*)
|
- Rounded corners (*[through patch](https://github.com/dylanaraps/sowm/pull/58)*)
|
||||||
|
- Titlebars (*[through patch](https://github.com/dylanaraps/sowm/pull/57)*)
|
||||||
|
|
||||||
<a href="https://user-images.githubusercontent.com/6799467/66687814-8cd9f800-ec73-11e9-97b8-6ae77876bd1b.jpg"><img src="https://user-images.githubusercontent.com/6799467/66687814-8cd9f800-ec73-11e9-97b8-6ae77876bd1b.jpg" width="43%" align="right"></a>
|
<a href="https://user-images.githubusercontent.com/6799467/66687814-8cd9f800-ec73-11e9-97b8-6ae77876bd1b.jpg"><img src="https://user-images.githubusercontent.com/6799467/66687814-8cd9f800-ec73-11e9-97b8-6ae77876bd1b.jpg" width="43%" align="right"></a>
|
||||||
|
|
||||||
@@ -23,7 +24,7 @@ An itsy bitsy floating window manager (*220~ sloc / 24kb compiled!*).
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
Patches available here: https://github.com/dylanaraps/sowm-patches
|
Patches available here: https://github.com/dylanaraps/sowm/pulls
|
||||||
|
|
||||||
## Default Keybindings
|
## Default Keybindings
|
||||||
|
|
||||||
|
15
sowm.c
15
sowm.c
@@ -255,6 +255,20 @@ void input_grab(Window root) {
|
|||||||
XFreeModifiermap(modmap);
|
XFreeModifiermap(modmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void win_init(void) {
|
||||||
|
Window *child;
|
||||||
|
unsigned int i, n_child;
|
||||||
|
|
||||||
|
XQueryTree(d, RootWindow(d, DefaultScreen(d)),
|
||||||
|
&(Window){0}, &(Window){0}, &child, &n_child);
|
||||||
|
|
||||||
|
for (i = 0; i < n_child; i++) {
|
||||||
|
XSelectInput(d, child[i], StructureNotifyMask|EnterWindowMask);
|
||||||
|
XMapWindow(d, child[i]);
|
||||||
|
win_add(child[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
@@ -271,6 +285,7 @@ int main(void) {
|
|||||||
XSelectInput(d, root, SubstructureRedirectMask);
|
XSelectInput(d, root, SubstructureRedirectMask);
|
||||||
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
XDefineCursor(d, root, XCreateFontCursor(d, 68));
|
||||||
input_grab(root);
|
input_grab(root);
|
||||||
|
win_init();
|
||||||
|
|
||||||
while (1 && !XNextEvent(d, &ev))
|
while (1 && !XNextEvent(d, &ev))
|
||||||
if (events[ev.type]) events[ev.type](&ev);
|
if (events[ev.type]) events[ev.type](&ev);
|
||||||
|
4
sowm.h
4
sowm.h
@@ -51,6 +51,8 @@ void win_focus(client *c);
|
|||||||
void win_kill(const Arg arg);
|
void win_kill(const Arg arg);
|
||||||
void win_prev(const Arg arg);
|
void win_prev(const Arg arg);
|
||||||
void win_next(const Arg arg);
|
void win_next(const Arg arg);
|
||||||
|
void win_init(void);
|
||||||
void win_to_ws(const Arg arg);
|
void win_to_ws(const Arg arg);
|
||||||
void ws_go(const Arg arg);
|
void ws_go(const Arg arg);
|
||||||
int xerror() { return 0; }
|
|
||||||
|
static int xerror() { return 0; }
|
||||||
|
Reference in New Issue
Block a user