Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
HarveyHunt committed Sep 29, 2014
2 parents a7d9b28 + 8f431cf commit 241979b
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 69 deletions.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,14 @@ before_install:
- sudo apt-get install -y libxcb-icccm4-dev
- sudo apt-get install -y libxcb-ewmh1-dev
- sudo apt-get install -y xcb-proto
script: make debug
before_script:
- wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl
- chmod +x checkpatch.pl
script: make debug && make check
notifications:
irc:
channels:
- "irc.freenode.org#howm"
template:
- "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}"
- "Build details : %{build_url}"
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ install:
@echo "Installing to $(DESTDIR)$(INSTALL_PREFIX)/bin"
@install -m 0755 $(BIN_PATH)/$(BIN_NAME) $(DESTDIR)$(INSTALL_PREFIX)/bin

.PHONY: check
check:
@echo "Using checkpatch.pl to check style."
@./checkpatch.pl --no-tree --ignore LONG_LINE,NEW_TYPEDEFS,UNNECESSARY_ELSE -f howm.c


# Removes all build files
.PHONY: clean
clean:
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Contents
=====
* [Contributing](CONTRIBUTING.md)
* [Configuration](#configuration)
* [Rules](#rules)
* [Scratchpad](#scratchpad)
* [Motions](#motions)
* [Counts](#counts)
* [Operators](#operators)
Expand Down Expand Up @@ -68,10 +70,10 @@ Each option is described in detail below:
#define FOCUS_MOUSE_CLICK false
```

* **FOLLOW_SPAWN**: When true, focus will change to a new window when it is spawned.
* **FOLLOW_MOVE**: When true, focus will change to a a different workspace when a client is sent there.

```
#define FOLLOW_SPAWN false
#define FOLLOW_MOVE false
```

* **GAP**: The size (in pixels) of the "useless gap" to place between windows.
Expand Down Expand Up @@ -196,6 +198,34 @@ Can be from 0 to 1.
#define DELETE_REGISTER_SIZE 5
```

* **SCRATCHPAD_WIDTH**: The width of the floating scratchpad window.

```
#define SCRATCHPAD_WIDTH 500
```

* **SCRATCHPAD_HEIGHT**: The height of the floating scratchpad window.
```
#define SCRATCHPAD_HEIGHT 500
```

##Rules

Rules can be used to tell howm to open certain applications on different workspaces and with certain properties set.

A rule is made up of the following sections:
* **Name**: This is string that can be used to identify a window. It treats name as a substring, so "dw" would still work for the client "dwb".
* **Workspace**: When set to 0, the client will be opened on the current workspace. Otherwise, the client will be opened on the specified workspace.
* **Follow**: Should howm focus on the new client when it is spawned?
* **Floating**: Should the client be floating when it is spawned?
* **Fullscreen**: Should the client be fullscreen when it is spawned?

##Scratchpad

The scratchpad is a location to store a single client out of view. When requesting a client back from the scratchpad, it will float in the center of the screen. This is useful for keeping a terminal handy or hiding your music player- only displaying it when it is really needed.

The size of the scratchpad's client is defined by SCRATCHPAD_WIDTH and SCRATCHPAD_HEIGHT.

##Motions

For a good primer on motions, vim's [documentation](http://vimdoc.sourceforge.net/htmldoc/motion.html) explains them well.
Expand Down
20 changes: 18 additions & 2 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
#define FOCUS_MOUSE false
/** Clicking a window will focus it. */
#define FOCUS_MOUSE_CLICK true
/** Upon spawning a new window, move the mouse to the new window? */
#define FOLLOW_SPAWN true
/** Upon moving a window to a different workspace, move the focus to the
* workspace? */
#define FOLLOW_MOVE true
/** The size (in pixels) of the useless gaps. */
#define GAP 2
/** Enable debugging output */
Expand Down Expand Up @@ -77,12 +78,23 @@
/** The amount of client lists that can be stored in the register before
* needing to be pasted back. */
#define DELETE_REGISTER_SIZE 5
/** The height of the floating scratchpad window. */
#define SCRATCHPAD_HEIGHT 500
/** The width of the floating scratchpad window. */
#define SCRATCHPAD_WIDTH 500

static const char * const term_cmd[] = {"urxvt", NULL};
static const char * const dmenu_cmd[] = {"dmenu_run", "-i", "-b",
"-nb", "#70898f", "-nf", "black",
"-sf", "#74718e", NULL};

/* Rules that are applied to clients as they are spawned. */
static const Rule rules[] = {
/* Class, WS, follow, float, fullscreen */
{"dwb", 3, false, false, false},
{"mpv", 5, false, false, false}
};

/** @brief The standard key map, feel free to change them.
*
* In the form:
Expand Down Expand Up @@ -111,6 +123,8 @@ static const Key keys[] = {
{ MODKEY, NORMAL, XK_b, toggle_bar, {NULL} },
{ MODKEY, NORMAL, XK_period, replay, {NULL} },
{ MODKEY, NORMAL, XK_p, paste, {NULL} },
{ MODKEY, NORMAL, XK_q, send_to_scratchpad, {NULL} },
{ MODKEY | ShiftMask, NORMAL, XK_q, get_from_scratchpad, {NULL} },

{ MODKEY | ShiftMask, FLOATING, XK_k, resize_float_height, {.i = -10} },
{ MODKEY | ShiftMask, FLOATING, XK_j, resize_float_height, {.i = 10} },
Expand Down Expand Up @@ -214,4 +228,6 @@ _Static_assert(BAR_HEIGHT >= 0, "BAR_HEIGHT can't be negative.");
_Static_assert(FLOAT_SPAWN_HEIGHT >= 0, "FLOAT_SPAWN_HEIGHT can't be negative.");
_Static_assert(FLOAT_SPAWN_WIDTH >= 0, "FLOAT_SPAWN_WIDTH can't be negative.");
_Static_assert(LENGTH(wss) == WORKSPACES + 1, "wss must contain one more workspace than WORKSPACES.");
_Static_assert(SCRATCHPAD_WIDTH >= 0, "SCRATCHPAD_WIDTH can't be negative.");
_Static_assert(SCRATCHPAD_HEIGHT >= 0, "SCRATCHPAD_HEIGHT can't be negative.");
#endif
Loading

0 comments on commit 241979b

Please sign in to comment.