swayblocks
swayblocks copied to clipboard
wifi script won't work with LC_NUMERIC="ru_RU.UTF-8"
I am running swayblocks on:
Arch linux AUR version of swayblocks
~λ sway -v
sway version 1.4
Description of issue/expected behaviour:
in Russia standard decimal delimiter is comma, not period so this
~λ printf "%.f" 57.0
bash: printf: 57.0: недопустимое число
57
gives error while this is OK
~λ printf "%.f" 57,0
57
and check
~λ cat /proc/net/wirelessInter-| sta-| Quality | Discarded packets | Missed | WE
face | tus | link level noise | nwid crypt frag retry misc | beacon | 22
wlp1s0: 0000 59. -51. -256 0 0 0 131 4888 0
Relevant logs:
replace this text with relevant logs
Actual output:
replace this text with actual output
maybe
~λ echo $(echo "${SIGNAL_STR%.*}")
60
~λ acpi -b | head -n 1 | sed -rn 's/^.*, (.*?)%, ((.*?):[0-9]{2} )?(.*)$/\1 \3 \4/p'
gives empty string
but
~λ acpi -b
Battery 0: Full, 100%
it won't work anyway and ps_mem shows 1Gb RAM!
588.6 MiB + 597.3 MiB = 1.2 GiB beam.smp (26)
Oh wow!
Admittedly I've only tested all the scripts on my own machine a long time ago so they aren't very comprehensive. They're mainly there for example so you can add/modify/remove as you want.
Possible fix for your battery acpi -b | head -n 1 | sed -rn 's/^.*, (.*?)%$/\1/p'
but since I don't know all the possible outputs I don't know if it works for all cases.
I've never come across the high memory usage issue but it might be worth looking into why there are 26 processes running. I think there should be 3 or 4 at most for this - main process, one for handling input, and scheduler if I remember correctly. It could be some other things using beam or it's running multiple times somehow.
Also I stopped running Arch Linux a while back so I haven't used this program in a while.