File euclid-wm.c changed (mode: 100644) (index 66cb79c..8d40d51) |
... |
... |
char *tempnam(char *,char*); |
101 |
101 |
#define ARRAY_LEN(x) (sizeof(x)/sizeof((x)[0])) |
#define ARRAY_LEN(x) (sizeof(x)/sizeof((x)[0])) |
102 |
102 |
|
|
103 |
103 |
//number of builtin commands |
//number of builtin commands |
104 |
|
#define BCMDS 55 |
|
|
104 |
|
#define BCMDS 56 |
105 |
105 |
//maximum number of supported custom commands |
//maximum number of supported custom commands |
106 |
106 |
#define CCMDS 99 |
#define CCMDS 99 |
107 |
107 |
//total maximum number of commands |
//total maximum number of commands |
|
... |
... |
struct timeval last_redraw; //we use this to keep track of whether events are |
229 |
229 |
bool default_orientation = true; //which way do we initialize views with their tracks running? |
bool default_orientation = true; //which way do we initialize views with their tracks running? |
230 |
230 |
bool autobalance = false; //is smart layout balancing enabled? |
bool autobalance = false; //is smart layout balancing enabled? |
231 |
231 |
bool win_menu = false; //if false use dmenu for to search windows, if true use euclid-menu, eventually we may phase dmenu out altogether |
bool win_menu = false; //if false use dmenu for to search windows, if true use euclid-menu, eventually we may phase dmenu out altogether |
|
232 |
|
int last_view_idx = 1; //index of the last seen view |
232 |
233 |
|
|
233 |
234 |
//records the keycode in appropriate array |
//records the keycode in appropriate array |
234 |
235 |
void bind_key(char s[12], unsigned int *m, struct binding *b) { |
void bind_key(char s[12], unsigned int *m, struct binding *b) { |
|
... |
... |
void load_defaults() { |
337 |
338 |
//bind search |
//bind search |
338 |
339 |
bind_key("slash",&mods, &bindings[54]); |
bind_key("slash",&mods, &bindings[54]); |
339 |
340 |
|
|
|
341 |
|
//go to previous view |
|
342 |
|
bind_key("backslash",&mod, &bindings[55]); |
|
343 |
|
|
340 |
344 |
// user defined |
// user defined |
341 |
345 |
} |
} |
342 |
346 |
|
|
|
... |
... |
void load_conf( bool first_call) { |
620 |
624 |
bindx = 53; |
bindx = 53; |
621 |
625 |
}else if (strcmp(key,"bind_search") == 0) { |
}else if (strcmp(key,"bind_search") == 0) { |
622 |
626 |
bindx = 54; |
bindx = 54; |
|
627 |
|
} else if (strcmp(key,"bind_move_to_last_view") == 0) { |
|
628 |
|
bindx = 55; |
623 |
629 |
} else if (strncmp(key,"bind_custom_", 12) == 0) { |
} else if (strncmp(key,"bind_custom_", 12) == 0) { |
624 |
630 |
const int ccmd_index = atoi(&key[12]) - 1; |
const int ccmd_index = atoi(&key[12]) - 1; |
625 |
631 |
if (ccmd_index >= 0 && ccmd_index < ARRAY_LEN(ccmds)) { |
if (ccmd_index >= 0 && ccmd_index < ARRAY_LEN(ccmds)) { |
|
... |
... |
void goto_view(struct view *v) { |
1774 |
1780 |
s = s->next; |
s = s->next; |
1775 |
1781 |
}; |
}; |
1776 |
1782 |
|
|
|
1783 |
|
last_view_idx = cs->v->idx; |
|
1784 |
|
|
1777 |
1785 |
struct track *t; |
struct track *t; |
1778 |
1786 |
struct cont *c; |
struct cont *c; |
1779 |
1787 |
|
|
|
... |
... |
int event_loop() { |
2691 |
2699 |
}; |
}; |
2692 |
2700 |
break; |
break; |
2693 |
2701 |
case 54: |
case 54: |
2694 |
|
search_wins(); |
|
|
2702 |
|
search_wins(); |
|
2703 |
|
redraw = true; |
|
2704 |
|
break; |
|
2705 |
|
case 55: |
|
2706 |
|
goto_view(find_view(last_view_idx)); |
2695 |
2707 |
redraw = true; |
redraw = true; |
2696 |
|
|
|
2697 |
|
|
|
2698 |
2708 |
break; |
break; |
2699 |
2709 |
|
|
2700 |
2710 |
default: |
default: |
File euclid-wm.conf.sample changed (mode: 100644) (index be766dd..7eedc92) |
... |
... |
bind_goto_next_screen = M Next |
138 |
138 |
#search for a window via dmenu |
#search for a window via dmenu |
139 |
139 |
bind_search = MS slash |
bind_search = MS slash |
140 |
140 |
|
|
|
141 |
|
#switch to last view |
|
142 |
|
bind_move_to_last_view = M backslash |
|
143 |
|
|
141 |
144 |
#CUSTOM HOTKEYS |
#CUSTOM HOTKEYS |
142 |
145 |
#euclid supports up to 99 hotkeys, bound to external commands |
#euclid supports up to 99 hotkeys, bound to external commands |
143 |
146 |
#the format for the binding is: bind_custom_[01-99] = [M | MS | N] [keyname] (just like normal bindings) |
#the format for the binding is: bind_custom_[01-99] = [M | MS | N] [keyname] (just like normal bindings) |