improve connection check in dwmbar, improve keybinds
This commit is contained in:
parent
80a2cec7a2
commit
2321635eed
20
config.h
20
config.h
|
@ -1,13 +1,11 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
static const int swallowfloating = 1;
|
||||||
|
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||||
/* appearance */
|
static const unsigned int gappx = 0; /* gaps between windows */
|
||||||
static const unsigned int borderpx = 4; /* border pixel of windows */
|
|
||||||
static const unsigned int gappx = 8; /* gaps between windows */
|
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "SourceCodePro:size=20" };
|
static const char *fonts[] = { "monospace:size=10" };
|
||||||
static const char dmenufont[] = "SourceCodePro:size=10";
|
static const char dmenufont[] = "monospace:size=10";
|
||||||
static const char col_gray1[] = "#222222";
|
static const char col_gray1[] = "#222222";
|
||||||
//static const char col_gray1[] = "#890a01";
|
//static const char col_gray1[] = "#890a01";
|
||||||
static const char col_gray2[] = "#333333";
|
static const char col_gray2[] = "#333333";
|
||||||
|
@ -82,12 +80,12 @@ static Key keys[] = {
|
||||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
{ MODKEY, XK_k, focusstack, {.i = +1 } },
|
||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
{ MODKEY, XK_l, focusstack, {.i = -1 } },
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_j, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
{ MODKEY, XK_semicolon, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY, XK_q, killclient, {0} },
|
{ MODKEY, XK_q, killclient, {0} },
|
||||||
|
|
4
dwmbar
4
dwmbar
|
@ -36,7 +36,7 @@ battery() {
|
||||||
}
|
}
|
||||||
|
|
||||||
internetp() {
|
internetp() {
|
||||||
if ping archlinux.org -c 1 > /dev/null; then
|
if ip a | grep "inet " | grep -v 127 > /dev/null; then
|
||||||
printf "NET connected"
|
printf "NET connected"
|
||||||
else
|
else
|
||||||
printf "NET disconnected"
|
printf "NET disconnected"
|
||||||
|
@ -53,8 +53,6 @@ while true; do
|
||||||
dispstr=""
|
dispstr=""
|
||||||
dispstr="$dispstr$(keyboard)"
|
dispstr="$dispstr$(keyboard)"
|
||||||
dispstr="$dispstr$(alsa)"
|
dispstr="$dispstr$(alsa)"
|
||||||
dispstr="$dispstr$(chargingp)"
|
|
||||||
dispstr="$dispstr$(battery)"
|
|
||||||
dispstr="$dispstr$(internetp)"
|
dispstr="$dispstr$(internetp)"
|
||||||
dispstr="$dispstr$(current_time)"
|
dispstr="$dispstr$(current_time)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue