aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharlรจne <julianaito@posteo.jp>2019-12-02 21:14:39 +0100
committerCharlรจne <julianaito@posteo.jp>2019-12-02 21:14:39 +0100
commitff238ac5e5651f25da0d3d7622b9aaa412faae54 (patch)
tree59f79a9d44ec7541b6c5320380bef05e9346bfb4
parent293b8e222480c85b2e581a986e17a5aaf00956dd (diff)
downloaddotfiles-master.tar.gz
spectrwm: change markup according to the new versionHEADmaster
-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)
}