aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.spectrwm.conf7
-rwxr-xr-xbin/genmon12
2 files changed, 10 insertions, 9 deletions
diff --git a/.spectrwm.conf b/.spectrwm.conf
index 63bd3e6..ecdf0bd 100644
--- a/.spectrwm.conf
+++ b/.spectrwm.conf
@@ -14,6 +14,7 @@ tile_gap = 0
disable_border = 1
#
## Bar Settings
+bar_action_expand = 1
bar_enabled = 1
bar_border_width = 0
bar_color = rgb:15/01/14,lightpink
@@ -22,8 +23,8 @@ bar_font_color = lightpink,rgb:15/01/14
bar_font_color_selected = rgb:15/01/14
bar_font = Terminus,Noto,Noto Emoji
bar_action = /home/charlene/bin/genmon
-bar_justify = right
-bar_format = +|T+L +|3C +@bg1+@fg1 +_120_W +@bg0+@fg0 +|T +A
+bar_justify = center
+bar_format = +|C+L +|3C +@bg=1;+@fg=1; +_120_W +@bg=0;+@fg=0; +|C +A
workspace_indicator = listall, printnames, markcurrent, markurgent
maximize_hide_bar = 0
window_class_enabled = 0
@@ -60,7 +61,7 @@ program[screenshot] = screenshot
bind[lock] = MOD+Shift+Delete
bind[term] = MOD+Shift+Return
bind[menu] = MOD+p
-bind[screenshot] = Mod+Menu
+bind[screenshot] = Mod+Escape
#
## Optional default programs that will only be validated if you override:
#
diff --git a/bin/genmon b/bin/genmon
index 10f0daa..3270ee8 100755
--- a/bin/genmon
+++ b/bin/genmon
@@ -12,7 +12,7 @@ _netstats() {
# USB tethering status
urndis="📱"
ifconfig urndis0 2> /dev/null | grep inet > /dev/null || urndis="📵"
- printf "+@fn2${urndis}+@fn0"
+ printf "+@fn=2;${urndis}+@fn=0;"
# WiFi status
ifconfig iwn0 | awk -F": " '
@@ -31,14 +31,14 @@ _netstats() {
}
END {
status = status == "active" ? "📶" : "✈️"
- printf("+@fn1%s+@fn0%s%s ", status, nwid, strength)
+ printf("+@fn=1;%s+@fn=0;%s%s ", status, nwid, strength)
}
' 2> /dev/null || return
}
_genmon() {
sysctl | awk -F= \
- -v date="$(date +"+@fn2📆+@fn0%a. %d/%m +@fn2🕐+@fn0%R")" \
+ -v date="$(date +"+@fn=2;📆+@fn=0;%a. %d/%m +@fn=2;🕐+@fn=0;%R")" \
-v ramused="$(vmstat | awk 'END{sub(/M/, "", $3); print $3}')" \
-v netstat="$(_netstats)" \
'
@@ -55,13 +55,13 @@ _genmon() {
if (batful[1] > 0) { # we need a battery to display stats
batsts = batstat[1] == 1 ? "🔋" : "🔌"
batlvl = int(batcur[1] * 100 / batful[1])
- bat = sprintf("+@fn2%s+@fn0%s%%", batsts, batlvl)
+ bat = sprintf("+@fn=2;%s+@fn=0;%s%%", batsts, batlvl)
}
ldsts = loadavg[1] >= 1 ? "🐣" : "🐥"
- ldavg = sprintf("+@fn2%s+@fn0%s", ldsts, loadavg[1])
+ ldavg = sprintf("+@fn=2;%s+@fn=0;%s", ldsts, loadavg[1])
rampct = int(ramused * 100 * 1024**2 / ramtotal[1])
- ram = sprintf("+@fn1▩+@fn0%s%%", rampct)
+ ram = sprintf("+@fn=1;▩+@fn=0;%s%%", rampct)
print(netstat, ram, ldavg, bat, date)
}