summaryrefslogtreecommitdiff
path: root/lib/cfg.def.h
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-08-27 14:34:49 -0700
committerBen Sima <ben@bsima.me>2019-08-27 14:34:49 -0700
commitf3b91d75d2d3153e9fa4d7414929dcc531779727 (patch)
treec49dc426b64cec2d47dc594a1a5398244ccc4dd0 /lib/cfg.def.h
parent8c810428d6d93ba718df7e8388615ad7fa3d092c (diff)
reorganize, and some small fixes
Diffstat (limited to 'lib/cfg.def.h')
-rw-r--r--lib/cfg.def.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/lib/cfg.def.h b/lib/cfg.def.h
new file mode 100644
index 0000000..7a024b2
--- /dev/null
+++ b/lib/cfg.def.h
@@ -0,0 +1,98 @@
+/*
+
+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("h", "xterm htop", "xterm htop")
+ DEFCMD("k", "keybase", "keybase-gui")
+ DEFCMD("r", "ranger", "xterm ranger")
+ DEFCMD("t", "telegram", "telegram-desktop")
+ DEFCMD("q", "qutebrowser", "qutebrowser")
+};
+
+static struct command mail_commands[] = {
+ DEFCMD("a", "all", "eml all")
+ DEFCMD("i", "in", "n eml in")
+ DEFCMD("n", "new", "n eml new")
+ DEFCMD("o", "out", "n eml out")
+ DEFCMD("t", "tag", "n eml tag")
+};
+
+static struct command play_commands[] = {
+ DEFCMD("m", "morning brew", "mplayer /mnt/lake/ben/youtube/morning/morning-brew-MvlIb8EPq3Y.mp3")
+};
+
+static struct command commands[] = {
+ DEFPREFIX ("a", "apps" , apps)
+ DEFCMD ("e", "emacs" , "emacsclient -c")
+ DEFCMD ("f", "flameshot" , "flameshot gui")
+ DEFPREFIX ("m", "mail" , mail_commands)
+ DEFPREFIX ("p", "play" , play_commands)
+ 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")
+};