summaryrefslogtreecommitdiff
path: root/cfg.def.h
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-05-10 13:36:24 -0700
committerBen Sima <ben@bsima.me>2019-05-12 14:06:43 -0700
commit26308ade6d4ba9eac49c527e2afc3c13d053e192 (patch)
treec6558f61dfbe4b4f07bdc5409c002e9f521b36e8 /cfg.def.h
parente87b87c264ca95fe5405fd8c06f3f4a69e5db1ff (diff)
remove cmdtree submodule, just replace the cfg file instead
Diffstat (limited to 'cfg.def.h')
-rw-r--r--cfg.def.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/cfg.def.h b/cfg.def.h
new file mode 100644
index 0000000..643c907
--- /dev/null
+++ b/cfg.def.h
@@ -0,0 +1,83 @@
+/*
+
+cmdtree <git.sr.ht/~jb55/cmdtree> configuration file
+
+This gets applied a compile time.
+
+ */
+
+enum position {
+ POSITION_TOP,
+ POSITION_LEFT,
+ POSITION_RIGHT,
+ POSITION_BOTTOM
+};
+
+static int xpad = 6;
+static int ypad = 2;
+
+static enum position position = POSITION_TOP;
+
+static const char *separator = " → ";
+
+/* -fn option overrides fonts[0]; default X11 font or font set */
+static const char *fonts[] = {
+ "monospace:size=12"
+};
+
+#define scheme_bg "#222222"
+
+static struct scheme schemes[SchemeLast] = {
+ [SchemeNorm] = { .bg = scheme_bg,
+ .bind = "#D19A66",
+ .arrow = "#888",
+ .prefix = "",
+ .name = "#bbbbbb"
+ },
+
+ [SchemePrefix] = { .bg = scheme_bg,
+ .bind = "#eeeeee",
+ .arrow = "#888",
+ .prefix = "",
+ .name = "#c678dd"
+ },
+};
+
+struct command volume_commands[] = {
+ DEFCMD("k", "up" , "amixer -q sset Master 2%+")
+ DEFCMD("j", "down", "amixer -q sset Master 2%-")
+ DEFCMD("m", "mute", "amixer -q sset Master toggle")
+};
+
+static struct command system_commands[] = {
+ // DEFPREFIX("c", "copy/sync", sync_commands)
+ DEFCMD("R", "reboot", "reboot")
+ DEFCMD("S", "suspend", "systemctl suspend")
+ DEFCMD("h", "h-m switch", "home-manager switch")
+ DEFCMD("w", "fresh wall", "n wal")
+ DEFCMD("x", "restart xbindkeys", "pkill xbindkeys && xbindkeys")
+
+ DEFCMD("l", "light theme", "xtheme light")
+ DEFCMD("d", "dark theme", "xtheme dark")
+};
+
+static struct command apps[] = {
+ DEFCMD("c", "chromium", "chromium")
+ DEFCMD("d", "dolphin", "dolphin")
+ DEFCMD("f", "firefox", "firefox")
+ DEFCMD("r", "ranger", "xterm ranger")
+ DEFCMD("t", "telegram", "telegram-desktop")
+ DEFCMD("q", "qutebrowser", "qutebrowser")
+};
+
+static struct command commands[] = {
+ DEFPREFIX ("a", "apps" , apps)
+ DEFCMD ("e", "emacs" , "emacsclient -c")
+ DEFCMD ("f", "flameshot" , "flameshot gui")
+ DEFCMD ("m", "mail" , "notmuch new")
+ DEFPREFIX ("s", "system" , system_commands)
+ DEFCMD ("r", "run" , "rofi -sidebar-mode -show run")
+ DEFPREFIX ("v", "volume" , volume_commands)
+ DEFCMD ("w", "windows" , "rofi -sidebar-mode -show window")
+ DEFCMD ("z", "seeme" , "seeme")
+};