Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

133 lines (122 sloc) 6.919 kb
/* config.h for dminiwm.c [ 0.3.6 ]
*
* Started from catwm 31/12/10
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef CONFIG_H
#define CONFIG_H
#define CLEANMASK(mask) (mask & ~(numlockmask | LockMask))
/* Mod (Mod1 == alt) (Mod4 == Super/windows) */
#define MOD1 Mod1Mask
#define MOD4 Mod4Mask
#define MASTER_SIZE 0.52
#define TOP_PANEL 0 /* 1=Don't 0=Have the panel at the top instead of the bottom */
#define PANEL_HEIGHT 18 /* 0 for no space for a panel */
#define SHOW_BAR 0 /* 1=Don't 0=Have the bar shown with a window open */
#define BORDER_WIDTH 2
#define ATTACH_ASIDE 1 /* 0=TRUE, 1=New window is master */
#define TOP_STACK 0 /* 0=TRUE, 1=New window added to bottom of stack when using ATTACH_ASIDE */
#define DEFAULT_MODE 0 /* 0=Vertical, 1=Fullscreen 2=Horizontal 3=grid*/
#define FOLLOW_MOUSE 0 /* 1=Don't 0=Focus the window the mouse just entered */
#define CLICK_TO_FOCUS 1 /* 1=Don't 0=Focus an unfocused window when clicked */
#define DESKTOPS 6 /* Must edit DESKTOPCHANGE keys to suit */
// Colors
#define FOCUS "#664422" // dkorange
#define UNFOCUS "#004050" // blueish
// Applications to a specific desktop
static const Convenience convenience[] = { \
/* class desktop follow */
{ "Thunar", 2, 1 },
//{ "Leafpad", 2, 1 },
{ "Firefox", 3, 0 },
{ "Links", 3, 1 },
{ "MPlayer", 4, 1 },
{ "Thunderbird", 5, 0 },
{ "Pysol", 6, 1 },
};
const char* dmenucmd[] = {"dmenu_run","-i","-nb","#666622","-nf","white",NULL};
const char* urxvtcmd[] = {"urxvtc",NULL};
const char* terminalcmd[] = {"Terminal",NULL};
const char* thunarcmd[] = {"thunar",NULL};
const char* firefoxcmd[] = {"firefox",NULL};
const char* webcmd[] = {"links","-g",NULL};
const char* luakitcmd[] = {"/home/pnewm/.bin/launchbrowser",NULL};
const char* mailcmd[] = {"thunderbird",NULL };
const char* voldowncmd[] = {"/home/pnewm/.bin/voldown",NULL};
const char* volupcmd[] = {"/home/pnewm/.bin/volup",NULL};
const char* prevoldowncmd[] = {"/home/pnewm/.bin/prevoldown",NULL};
const char* prevolupcmd[] = {"/home/pnewm/.bin/prevolup",NULL};
const char* vols_what[] = {"/home/pnewm/.bin/volumes_what",NULL};
// for reboot and shutdown
const char* rebootcmd[] = {"sudo","reboot",NULL};
const char* shutdowncmd[] = {"sudo","shutdown","-h","now",NULL};
// Avoid multiple paste
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, follow_client_to_desktop, {.i = N}}, \
{ MOD4|ShiftMask, K, client_to_desktop, {.i = N}},
// Shortcuts
static key keys[] = {
// MOD KEY FUNCTION ARGS
{ MOD1, XK_h, resize_master, {.i = 10}},
{ MOD1, XK_l, resize_master, {.i = -10}},
{ MOD1, XK_c, kill_client, {NULL}},
{ MOD1, XK_j, next_win, {NULL}},
{ MOD1, XK_k, prev_win, {NULL}},
{ MOD1, XK_v, spawn, {.com = dmenucmd}},
{ MOD1, XK_p, resize_stack, {.i = 10}},
{ MOD1, XK_o, resize_stack, {.i = -10}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_b, toggle_panel, {NULL}},
{ MOD1, XK_Return, spawn, {.com = urxvtcmd}},
{ MOD1, XK_Up, spawn, {.com = volupcmd}},
{ MOD1, XK_Down, spawn, {.com = voldowncmd}},
// alt + shift + shortcut
{ MOD1|ShiftMask, XK_j, move_up, {NULL}},
{ MOD1|ShiftMask, XK_k, move_down, {NULL}},
{ MOD1|ShiftMask, XK_Return, swap_master, {NULL}},
{ MOD1|ShiftMask, XK_g, switch_mode, {.i = 3}}, // grid
{ MOD1|ShiftMask, XK_h, switch_mode, {.i = 2}}, // horizontal
{ MOD1|ShiftMask, XK_f, switch_mode, {.i = 1}}, // fullscreen
{ MOD1|ShiftMask, XK_v, switch_mode, {.i = 0}}, // vertical
// Control + alt + shortcut
{ MOD1|ControlMask, XK_q, quit, {NULL}},
{ MOD1|ControlMask, XK_r, spawn, {.com = rebootcmd}},
{ MOD1|ControlMask, XK_s, spawn, {.com = shutdowncmd}},
// Window key + shortcut
{ MOD4, XK_Right, rotate_desktop, {.i = 1}},
{ MOD4, XK_Left, rotate_desktop, {.i = -1}},
{ MOD4, XK_e, spawn, {.com = mailcmd}},
{ MOD4, XK_f, spawn, {.com = firefoxcmd}},
{ MOD4, XK_w, spawn, {.com = webcmd}},
{ MOD4, XK_l, spawn, {.com = luakitcmd}},
{ MOD4, XK_h, spawn, {.com = thunarcmd}},
{ MOD4, XK_t, spawn, {.com = terminalcmd}},
{ MOD4, XK_v, spawn, {.com = vols_what}},
{ MOD4, XK_Up, spawn, {.com = prevolupcmd}},
{ MOD4, XK_Down, spawn, {.com = prevoldowncmd}},
DESKTOPCHANGE( XK_1, 0)
DESKTOPCHANGE( XK_2, 1)
DESKTOPCHANGE( XK_3, 2)
DESKTOPCHANGE( XK_4, 3)
DESKTOPCHANGE( XK_5, 4)
DESKTOPCHANGE( XK_6, 5)
};
#endif
Jump to Line
Something went wrong with that request. Please try again.