summarylogtreecommitdiffstats
path: root/config.h
blob: b794ef8726906cd98bed8efd8a5d58ad660d067c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/* See LICENSE file for copyright and license details. */

#ifndef BSPWMBAR_CONFIG_H_
#define BSPWMBAR_CONFIG_H_

#include "bspwmbar.h"

/* intel */
#define THERMAL_PATH "/sys/class/thermal/thermal_zone0/temp"
/* k10temp */
/* #define THERMAL_PATH "/sys/class/hwmon/hwmon1/temp1_input" */

/* max length of monitor output name and bspwm desktop name */
#define NAME_MAXSZ  32
/* max length of active window title */
#define TITLE_MAXSZ 50
/* set window height */
#define BAR_HEIGHT  24

/* set font pattern for find fonts, see fonts-conf(5) */
const char *fontname = "sans-serif:size=10";

/*
 * color settings by index of color map
 */
/* bspwmbar fg color */
#define FGCOLOR    "#e5e5e5"
/* bspwmbar bg color */
#define BGCOLOR    "#222222"
/* inactive fg color */
#define ALTFGCOLOR "#7f7f7f"
/* graph bg color */
#define ALTBGCOLOR "#555555"

/*
 * Module definition
 */

/* modules on the left */
module_t left_modules[] = {
	{ /* Arch logo */
		.text = {
			.func = text,
			.label = "",
			.fg = "#1793d1",
		},
	},
	{ /* bspwm desktop state */
		.desk = {
			.func = desktops,
			.focused = "",
			.unfocused = "",
			.fg_free = ALTFGCOLOR,
		},
	},
	{ /* active window title */
		.title = {
			.func = windowtitle,
			.maxlen   = TITLE_MAXSZ,
			.ellipsis = "…",
		},
	},
};

/* modules on the right */
module_t right_modules[] = {
	{ /* system tray */
		.tray = {
			.func = systray,
			.iconsize = 16,
		},
	},
	{ /* cpu usage */
		.cpu = {
			.func = cpugraph,
			.prefix = "cpu: "
		},
	},
	{ /* memory usage */
		.mem = {
			.func = memgraph,
			.prefix = "mem: "
		},
	},
	{ /* master playback volume */
		.vol = {
			.func = volume,
			.handler = volume_ev,
			.suffix = "%",
			.muted = "婢",
			.unmuted = "墳",
		},
	},
	{ /* used space of root file system */
		.fs = {
			.func = filesystem,
			.mountpoint = "/",
			.prefix = " ",
			.suffix = "%",
		},
	},
	{ /* cpu temperature */
		.thermal = {
			.func = thermal,
			.sensor = THERMAL_PATH,
			.prefix = " ",
			.suffix = "℃",
		},
	},
	{ /* clock */
		.date = {
			.func = datetime,
			.prefix = " ",
			.format = "%H:%M",
		},
	},
};

#endif