conf: Fix default wmfs keybinds.

This commit is contained in:
Martin Duquesnoy 2009-02-21 22:44:56 +01:00
parent 8b021f008e
commit 56a2c10bbe
9 changed files with 83 additions and 44 deletions

View File

@ -54,7 +54,7 @@ add_executable(wmfs ${wmfs_src})
add_executable(wmfs-shell ${wmfs-shell_src})
# Set the version - NOT USED AT THE MOMENT
set(VERSION "0.1rc3 (Empty Spaces)")
set(VERSION "0.1rc4 (On The Run)")
# FLAGS
set(CFLAGS "-g -Wall")

View File

@ -284,18 +284,19 @@ main(int argc, char *argv[])
char *input, *p;
int c;
char opt;
const char *optstring = "hc";
static struct option shell_opts[] =
{
{"help", 0, NULL, 'h'},
{"cmd", 1, NULL, 'c'},
{0,0,0,0}
{"help", 0, NULL, 'h'},
{"cmd", 1, NULL, 'c'},
{0}
};
/* Initialisation */
init();
/* get args from argv */
while(EOF != (opt = (char)getopt_long(argc, argv, optstring, shell_opts, NULL)))
while(EOF != (opt = (char)getopt_long(argc, argv, "hc", shell_opts, NULL)))
{
/* Just print help */
@ -317,8 +318,6 @@ main(int argc, char *argv[])
}
for(;;)
{
printf(PROMPT);
@ -338,7 +337,5 @@ main(int argc, char *argv[])
free(input);
}
return 0;
}

View File

@ -54,6 +54,7 @@
tag_set(<tag number>) Change the current tag\n\
statustext(text) Print text in the wmfs bar.\n\
spawn(<command>) Execute a system command.\n\n"
#define UICBLIST \
"Here is a list of all wmfs's uicb functions that are usable with the exec function: \n\
spawn Exec a system command. \n\
@ -81,7 +82,6 @@
screen_prev Select the previous screen. \n\
reload Reload the WMFS configuration. \n\n"
/* Xlib util macro */
#define ROOT RootWindow(dpy, SCREEN)
#define ATOM(a) XInternAtom(dpy, a, False)

View File

@ -240,6 +240,7 @@ client_get_name(Client *c)
int rf;
ulong ir, il;
/* This one instead XFetchName for utf8 name support */
if(XGetWindowProperty(dpy, c->win, net_atom[net_wm_name], 0, 4096,
False, net_atom[utf8_string], &rt, &rf, &ir, &il, (uchar**)&c->title) != Success)
XGetWindowProperty(dpy, c->win, ATOM("WM_NAME"), 0, 4096,

View File

@ -39,7 +39,7 @@ void
buttonpress(XButtonEvent *ev)
{
Client *c;
int i;
int i, x, y;
screen_get_sel();
@ -86,8 +86,8 @@ buttonpress(XButtonEvent *ev)
{
if(conf.layout_system && (ev->button == Button1 || ev->button == Button3)) /* True -> menu */
{
int y = infobar[selscreen].layout_button->geo.y + INFOBARH;
int x = infobar[selscreen].layout_button->geo.x + (sgeo[selscreen].x - BORDH);
y = infobar[selscreen].layout_button->geo.y + INFOBARH;
x = infobar[selscreen].layout_button->geo.x + (sgeo[selscreen].x - BORDH);
if(infobar[selscreen].geo.y != sgeo[selscreen].y - (INFOBARH + TBARH))
y = infobar[selscreen].geo.y - (INFOBARH * menulayout.nitem) - SHADH;

View File

@ -191,11 +191,11 @@ frame_update(Client *c)
XClearWindow(dpy, c->bottom);
if(TBARH && (TBARH + BORDH + 1) > font->height)
{
barwin_draw_text(c->titlebar, (c->frame_geo.width / 2) - (textw(c->title) / 2),
barwin_draw_text(c->titlebar,
(c->frame_geo.width / 2) - (textw(c->title) / 2),
(font->height - (font->descent)) + (((TBARH + BORDH) - font->height) / 2),
c->title);
}
return;
}

View File

@ -78,6 +78,7 @@ launcher_execute(Launcher launcher)
++pos;
break;
}
barwin_refresh_color(infobar[selscreen].bar);
barwin_draw_text(infobar[selscreen].bar, x, font->height, launcher.prompt);
barwin_draw_text(infobar[selscreen].bar, x + textw(launcher.prompt) + textw(" "), font->height, buf);

View File

@ -86,7 +86,6 @@
#define LEN(x) (sizeof(x) / sizeof((x)[0]))
#define deb(p) fprintf(stderr, "debug: %d\n", (p))
#define PAD (14)
#define LPROMPT "Exec: "
/* barwin.c */
BarWindow *barwin_create(Window parent,

93
wmfsrc
View File

@ -24,11 +24,12 @@ layouts
{
fg = "#191919"
bg = "#7E89A2"
# Border around the layout button
border = true
system = "menu" # menu or switch
# menu or switch
system = "menu"
# Tiling layouts
layout { type = "tile_right" symbol = "RIGHT" }
@ -45,9 +46,10 @@ layouts
tags
{
tag_round = false
occupied_bg = "#003366"
occupied_bg = "#003366"
sel_fg = "#191919"
sel_bg = "#7E89A2"
# Border around the tag buttons
border = true
@ -64,6 +66,7 @@ tags
root
{
# Command you can execute for set the Wallpaper
background_command = "xsetroot -solid black"
mouse { button = "4" func = "tag_next" }
@ -106,8 +109,8 @@ menu
{
name = "rootmenu"
#place_at_mouse = false
#x = 40 y = 50
# place_at_mouse = false
# x = 40 y = 50
fg_focus = "#000000" bg_focus = "#ffffff"
fg_normal = "#ffffff" bg_normal = "#000000"
@ -137,29 +140,66 @@ launcher
keys
{
# general keybind
key { mod = {"Alt"} key = "r" func = "reload" }
# Reload the configuration of wmfs
key { mod = {"Alt", "Control"} key = "r" func = "reload" }
# Open a terminal
key { mod = {"Control"} key = "Return" func = "spawn" cmd = term }
# Kill the selected client
key { mod = {"Alt"} key = "q" func = "client_kill" }
# Quit wmfs :(
key { mod = {"Control", "Alt", "Shift"} key = "q" func = "quit" }
key { mod = {"Control"} key = "m" func = "toggle_max" }
key { mod = {"Control"} key = "f" func = "toggle_free" }
key { mod = {"Control"} key = "b" func = "toggle_infobar_position" }
# Toggle maximum the selected client
key { mod = {"Alt"} key = "m" func = "toggle_max" }
# Toggle free the selected client
key { mod = {"Alt"} key = "f" func = "toggle_free" }
# Toggle the position of the infobar
key { mod = {"Alt"} key = "b" func = "toggle_infobar_position" }
# Select the next client
key { mod = {"Alt"} key = "Tab" func = "client_next" }
key { mod = {"Alt","Shift"} key = "Tab" func = "client_prev" }
# Select the previous client
key { mod = {"Alt","Shift"} key = "Tab" func = "client_prev" }#
# Select the next tag
key { mod = {"Control"} key = "Right" func = "tag_next" }
# Select the previous tag
key { mod = {"Control"} key = "Left" func = "tag_prev" }
key { mod = {"Control"} key = "Up" func = "layout_next" }
key { mod = {"Control"} key = "Down" func = "layout_prev" }
key { mod = {"Alt"} key = "l" func = "set_mwfact" cmd = "+0.025" }
key { mod = {"Alt"} key = "h" func = "set_mwfact" cmd = "-0.025" }
key { mod = {"Alt", "Shift"} key = "l" func = "set_nmaster" cmd = "+1" }
key { mod = {"Alt", "Shift"} key = "h" func = "set_nmaster" cmd = "-1" }
# Set the next layout
key { mod = {"Alt"} key = "space" func = "layout_next" }
# Set the previous layout
key { mod = {"Alt", "Shift"} key = "space" func = "layout_prev" }
# Increase mwfact
key { mod = {"Alt", "Shift"} key = "l" func = "set_mwfact" cmd = "+0.025" }
# Decrease mwfact
key { mod = {"Alt", "Shift"} key = "h" func = "set_mwfact" cmd = "-0.025" }
# Increase nmaster
key { mod = {"Alt"} key = "d" func = "set_nmaster" cmd = "+1" }
# Decease nmaster
key { mod = {"Alt", "Shift"} key = "d" func = "set_nmaster" cmd = "-1" }
# Launchers
key { mod = { "Alt" } key = "p" func = "launcher" cmd = "launcher_exec" }
key { mod = { "Alt", "Control" } key = "p" func = "launcher" cmd = "launcher_ssh" }
key { mod = { "Alt", "Shift" } key = "p" func = "launcher" cmd = "launcher_ssh" }
# tag manipulation keybind
# Set the tag x
key { mod = {"Alt"} key = "F1" func = "tag" cmd = "1" }
key { mod = {"Alt"} key = "F2" func = "tag" cmd = "2" }
key { mod = {"Alt"} key = "F3" func = "tag" cmd = "3" }
@ -170,13 +210,14 @@ keys
key { mod = {"Alt"} key = "F8" func = "tag" cmd = "8" }
key { mod = {"Alt"} key = "F9" func = "tag" cmd = "9" }
key { mod = {"Control", "Shift"} key = "F1" func = "tag_transfert" cmd ="1" }
key { mod = {"Control", "Shift"} key = "F2" func = "tag_transfert" cmd ="2" }
key { mod = {"Control", "Shift"} key = "F3" func = "tag_transfert" cmd ="3" }
key { mod = {"Control", "Shift"} key = "F4" func = "tag_transfert" cmd ="4" }
key { mod = {"Control", "Shift"} key = "F5" func = "tag_transfert" cmd ="5" }
key { mod = {"Control", "Shift"} key = "F6" func = "tag_transfert" cmd ="6" }
key { mod = {"Control", "Shift"} key = "F7" func = "tag_transfert" cmd ="7" }
key { mod = {"Control", "Shift"} key = "F8" func = "tag_transfert" cmd ="8" }
key { mod = {"Control", "Shift"} key = "F9" func = "tag_transfert" cmd ="9" }
# Transfert selected client to x
key { mod = {"Alt", "Shift"} key = "F1" func = "tag_transfert" cmd ="1" }
key { mod = {"Alt", "Shift"} key = "F2" func = "tag_transfert" cmd ="2" }
key { mod = {"Alt", "Shift"} key = "F3" func = "tag_transfert" cmd ="3" }
key { mod = {"Alt", "Shift"} key = "F4" func = "tag_transfert" cmd ="4" }
key { mod = {"Alt", "Shift"} key = "F5" func = "tag_transfert" cmd ="5" }
key { mod = {"Alt", "Shift"} key = "F6" func = "tag_transfert" cmd ="6" }
key { mod = {"Alt", "Shift"} key = "F7" func = "tag_transfert" cmd ="7" }
key { mod = {"Alt", "Shift"} key = "F8" func = "tag_transfert" cmd ="8" }
key { mod = {"Alt", "Shift"} key = "F9" func = "tag_transfert" cmd ="9" }
}