remove dual-config: awesomerc is now preprocessed and compiled in awesome

This commit is contained in:
Julien Danjou 2007-12-13 11:16:43 +01:00
parent ecf6f6ebbb
commit 425f89bada
5 changed files with 29 additions and 694 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ awesome
awesome-client awesome-client
doc doc
*.swp *.swp
defconfig.h

View File

@ -37,13 +37,20 @@ awesome-client: ${OBJCLIENT}
@echo -e "\t(CC) ${OBJCLIENT} -o $@" @echo -e "\t(CC) ${OBJCLIENT} -o $@"
@${CC} -o $@ ${OBJCLIENT} ${CLIENTLDFLAGS} @${CC} -o $@ ${OBJCLIENT} ${CLIENTLDFLAGS}
awesome: ${OBJ} defconfig.h: awesomerc
@echo generating defconfig.h from awesomerc
@echo "#define AWESOME_DEFAULT_CONFIG \\" > defconfig.h
@echo -n "\"" >> defconfig.h
@sed 's/$$/ \\/;s/"/\\"/g' awesomerc >> defconfig.h
@echo "\"" >> defconfig.h
awesome: defconfig.h ${OBJ}
@echo -e "\t(CC) ${OBJ} -o $@" @echo -e "\t(CC) ${OBJ} -o $@"
@${CC} -o $@ ${OBJ} ${LDFLAGS} @${CC} -o $@ ${OBJ} ${LDFLAGS}
clean: clean:
@echo cleaning @echo cleaning
@rm -f awesome awesome-client ${DOCS:.txt=} ${DOCS:.txt=.xml} ${OBJCLIENT} ${OBJ} awesome-${VERSION}.tar.gz @rm -f awesome awesome-client defconfig.h ${DOCS:.txt=} ${DOCS:.txt=.xml} ${OBJCLIENT} ${OBJ} awesome-${VERSION}.tar.gz
@rm -rf doc @rm -rf doc
dist: clean dist: clean

153
awesomerc
View File

@ -1,153 +1,36 @@
# Configuration file for awesome # Minimal configuration file for awesome
# First physical screen # First physical screen
screen 0 screen 0
{ {
general
{
# Windows border size in pixel
border = 1
# Pixels number before collapsing window border and screen border
snap = 8
# Respect windows minimal geometry
resize_hints = true
# Opacity for unfocused windows (with xcompmgr)
opacity_unfocused = 100
# Should focus switching move pointer
focus_move_pointer = false
# Allow floating windows to be below others
allow_lower_floats = false
# Status bar font (Xft)
font = "fixed-12"
}
colors
{
# Normal border color
normal_border = "#111111"
# Normal background color (statusbar)
normal_bg = "#111111"
# Normal foreground color (statusbar)
normal_fg = "#eeeeee"
# Focused border color
focus_border = "#6666ff"
# Focused background color (statusbar)
focus_bg = "#6666ff"
# Focused foreground color (statusbar)
focus_fg = "#ffffff"
}
# Optional screen padding
#padding
#{
# left = 10
# right = 0
# top = 0
# bottom = 10
#}
statusbar
{
# Statusbar position
# top, bottom, left, right, off
position = "top"
}
tags tags
{ {
# Tag name # Tag name
tag one tag one { }
{ tag two { }
# Tag default layout tag three { }
# tile, tileleft, max, floating tag four { }
layout = "tile" tag five { }
} tag six { }
tag two tag seven { }
{ tag eight { }
# Number of master windows on this tag tag nine { }
nmaster = 2
layout = "tile"
}
tag three
{
ncol = 2
layout = "tile"
}
tag four
{
layout = "tile"
}
tag five
{
layout = "tile"
}
tag six
{
layout = "tile"
}
tag seven
{
layout = "tile"
}
tag eight
{
# Master width factor
# 0 < mwfact < 1
mwfact = 0.3
layout = "tile"
}
tag nine
{
layout = "floating"
}
} }
layouts layouts
{ {
# Available layout layout tile { symbol = "[]=" }
layout tile layout tileleft { symbol = "=[]" }
{ layout max { symbol = "[ ]" }
# Symbol drawn in statusbar for this layout layout floating { symbol = "><>" }
symbol = "[]="
}
layout tileleft
{
symbol = "=[]"
}
layout max
{
symbol = "[ ]"
}
layout floating
{
symbol = "><>"
}
} }
} }
rules rules
{ {
rule rule
{ { name = "Gimp" float = true }
# Programe name (regexp) rule { name = "MPlayer" float = true }
name = "Gimp" rule { name = "Acroread" float = true }
# Program tags (regexp) rule { name = "pinentry" float = true }
tags = "nine"
# Should we set this program to floating mode?
float = true
# Physical screen to map this windows to
screen = 0
}
rule
{
name = "MPlayer"
float = true
}
rule
{
name = "Acroread"
float = true
}
rule
{
name = "pinentry"
float = true
}
} }
# Mouse buttons bindings # Mouse buttons bindings

View File

@ -35,6 +35,7 @@
#include "layouts/tile.h" #include "layouts/tile.h"
#include "layouts/floating.h" #include "layouts/floating.h"
#include "layouts/max.h" #include "layouts/max.h"
#include "defconfig.h"
#define AWESOME_CONFIG_FILE ".awesomerc" #define AWESOME_CONFIG_FILE ".awesomerc"

557
config.h
View File

@ -235,563 +235,6 @@ struct awesome_config
char *configpath; char *configpath;
}; };
#define AWESOME_DEFAULT_CONFIG \
"screen 0 \
{ \
tags \
{ \
tag one { } \
tag two { } \
tag three { } \
tag four { } \
tag five { } \
tag six { } \
tag seven { } \
tag eight { } \
tag nine { } \
} \
layouts \
{ \
layout tile { symbol = \"[]=\" } \
layout tileleft { symbol = \"=[]\" } \
layout max { symbol = \"[ ]\" } \
layout floating { symbol = \"><>\" } \
} \
} \
\
mouse \
{ \
tag \
{ \
button = \"1\" \
command = \"tag_view\" \
} \
tag \
{ \
button = \"1\" \
modkey = {\"Mod4\"} \
command = \"client_tag\" \
} \
tag \
{ \
button = \"3\" \
command = \"tag_toggleview\" \
} \
tag \
{ \
button = \"3\" \
modkey = {\"Mod4\"} \
command = \"client_toggletag\" \
} \
tag \
{ \
button = \"4\" \
command = \"tag_viewnext\" \
} \
tag \
{ \
button = \"5\" \
command = \"tag_viewprev\" \
} \
layout \
{ \
button = \"1\" \
command = \"tag_setlayout\" \
arg = \"+1\" \
} \
layout \
{ \
button = \"4\" \
command = \"tag_setlayout\" \
arg = \"+1\" \
} \
layout \
{ \
button = \"3\" \
command = \"tag_setlayout\" \
arg = \"-1\" \
} \
layout \
{ \
button = \"5\" \
command = \"tag_setlayout\" \
arg = \"-1\" \
} \
root \
{ \
button = \"3\" \
command = \"spawn\" \
arg = \"exec xterm\" \
} \
root \
{ \
button = \"4\" \
command = \"tag_viewnext\" \
} \
root \
{ \
button = \"5\" \
command = \"tag_viewprev\" \
} \
client \
{ \
modkey = {\"Mod4\"} \
button = \"1\" \
command = \"client_movemouse\" \
} \
client \
{ \
modkey = {\"Mod4\"} \
button = \"2\" \
command = \"client_zoom\" \
} \
client \
{ \
modkey = {\"Mod4\"} \
button = \"3\" \
command = \"client_resizemouse\" \
} \
} \
\
keys \
{ \
key \
{ \
modkey = {\"Mod4\"} \
key = \"Return\" \
command = \"spawn\" \
arg = \"exec xterm\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"space\" \
command = \"tag_setlayout\" \
arg = \"+1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"space\" \
command = \"tag_setlayout\" \
arg = \"-1\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"b\" \
command = \"togglebar\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"j\" \
command = \"client_focusnext\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"k\" \
command = \"client_focusprev\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"j\" \
command = \"client_swapnext\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"k\" \
command = \"client_swapprev\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"j\" \
command = \"screen_focusnext\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"k\" \
command = \"screen_focusprev\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"h\" \
command = \"tag_setmwfact\" \
arg = \"-0.05\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"l\" \
command = \"tag_setmwfact\" \
arg = \"+0.05\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"h\" \
command = \"tag_setnmaster\" \
arg = \"+1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"l\" \
command = \"tag_setnmaster\" \
arg = \"-1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"h\" \
command = \"tag_setncol\" \
arg = \"+1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"l\" \
command = \"tag_setncol\" \
arg = \"-1\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"Escape\" \
command = \"tag_viewprev_selected\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"Left\" \
command = \"tag_viewprev\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"Right\" \
command = \"tag_viewnext\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"m\" \
command = \"client_togglemax\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"Return\" \
command = \"client_zoom\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"space\" \
command = \"client_togglefloating\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"c\" \
command = \"client_kill\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"q\" \
command = \"quit\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"r\" \
command = \"reloadconfig\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"0\" \
command = \"tag_view\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"1\" \
command = \"tag_view\" \
arg = \"1\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"2\" \
command = \"tag_view\" \
arg = \"2\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"3\" \
command = \"tag_view\" \
arg = \"3\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"4\" \
command = \"tag_view\" \
arg = \"4\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"5\" \
command = \"tag_view\" \
arg = \"5\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"6\" \
command = \"tag_view\" \
arg = \"6\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"7\" \
command = \"tag_view\" \
arg = \"7\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"8\" \
command = \"tag_view\" \
arg = \"8\" \
} \
key \
{ \
modkey = {\"Mod4\"} \
key = \"9\" \
command = \"tag_view\" \
arg = \"9\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"0\" \
command = \"tag_toggleview\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"1\" \
command = \"tag_toggleview\" \
arg = \"1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"2\" \
command = \"tag_toggleview\" \
arg = \"2\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"3\" \
command = \"tag_toggleview\" \
arg = \"3\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"4\" \
command = \"tag_toggleview\" \
arg = \"4\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"5\" \
command = \"tag_toggleview\" \
arg = \"5\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"6\" \
command = \"tag_toggleview\" \
arg = \"6\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"7\" \
command = \"tag_toggleview\" \
arg = \"7\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"8\" \
command = \"tag_toggleview\" \
arg = \"8\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Control\"} \
key = \"9\" \
command = \"tag_toggleview\" \
arg = \"9\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"0\" \
command = \"client_tag\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"1\" \
command = \"client_tag\" \
arg = \"1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"2\" \
command = \"client_tag\" \
arg = \"2\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"3\" \
command = \"client_tag\" \
arg = \"3\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"4\" \
command = \"client_tag\" \
arg = \"4\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"5\" \
command = \"client_tag\" \
arg = \"5\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"6\" \
command = \"client_tag\" \
arg = \"6\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"7\" \
command = \"client_tag\" \
arg = \"7\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"8\" \
command = \"client_tag\" \
arg = \"8\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\"} \
key = \"9\" \
command = \"client_tag\" \
arg = \"9\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"0\" \
command = \"client_toggletag\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"1\" \
command = \"client_toggletag\" \
arg = \"1\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"2\" \
command = \"client_toggletag\" \
arg = \"2\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"3\" \
command = \"client_toggletag\" \
arg = \"3\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"4\" \
command = \"client_toggletag\" \
arg = \"4\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"5\" \
command = \"client_toggletag\" \
arg = \"5\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"6\" \
command = \"client_toggletag\" \
arg = \"6\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"7\" \
command = \"client_toggletag\" \
arg = \"7\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"8\" \
command = \"client_toggletag\" \
arg = \"8\" \
} \
key \
{ \
modkey = {\"Mod4\", \"Shift\", \"Control\"} \
key = \"9\" \
command = \"client_toggletag\" \
arg = \"9\" \
} \
}"
void parse_config(const char *, awesome_config *); void parse_config(const char *, awesome_config *);
void uicb_reloadconfig(awesome_config *, const char *); void uicb_reloadconfig(awesome_config *, const char *);