ultrabug / py3status Goto Github PK
View Code? Open in Web Editor NEWpy3status is an extensible i3status wrapper written in python
Home Page: https://ultrabug.github.io/py3status/
License: BSD 3-Clause "New" or "Revised" License
py3status is an extensible i3status wrapper written in python
Home Page: https://ultrabug.github.io/py3status/
License: BSD 3-Clause "New" or "Revised" License
I wrote this code:
import subprocess
class Py3status:
def getNetSpeed(self, json, i3status_config):
interface = 'eth0'
response = {'full_text' : 's', 'name' : 'net_speed'}
net_interface = subprocess.check_output(['cat', '/proc/net/dev']).split()
interface_index = net_interface.index(interface + ':')
received_bytes = net_interface[interface_index + 1]
transmitted_bytes = net_interface[interface_index + 2]
response['full_text'] = "LAN: " % (received_bytes, transmitted_bytes)
return (0, response)
But py3status wouldn't show it in i3bar.If I comment out received_bytes
and transmitted_bytes
then I have the output! This module is just an example. There are a lot of situation that this thing will happen.
Is there anyway to get errors after running modules? It'll be very helpful.
My config file is the following:
order += "tztime local"
order += "tztime toronto"
tztime local {
format = "%Y-%m-%d %H:%M"
}
tztime toronto {
format = "%H:%M %Z"
timezone = "America/Toronto"
}
With this config file, i3status
displays:
2015-07-23 22:02 | 16:02 EDT
However, i3bar
configured with py3status
displays (in the status bar):
2015-07-23 22:02 | 22:02
Notice that:
%Z
in the format string).I would expect py3status
to match i3status
.
The JSON output of py3status
with this configuration file is:
{"click_events": true, "version": 1}
[
[{"name":"tztime","full_text":"2015-07-23 22:06"},{"name":"tztime","full_text":"16:06 EDT"}]
,[{"name": "tztime", "full_text": "2015-07-23 22:06"}, {"name": "tztime", "full_text": "22:06 "}]
My versions are:
py3status version 2.4 (python 2.7.10)
i3status 2.9 (2015-03-22) © 2008-2012 Michael Stapelberg and contributors
i3bar version 4.10.2 (2015-04-16, branch "4.10.2") © 2010-2014 Axel Wagner and contributors
When I was traying to run the pomodoro module i got the following error:
Placing timer_pomodoro = 25 * 60
after line 12 in module code fixed this. But maybe there is something else worth checking.
Anyway, thanks for interesting stuff.
So right now if you want to make your py3status modules configurable you have to handle everything in the module itself. I think it would be really nice if py3status would provide some kind of framework for that.
It could expose some default settings to each module (e.g. the title) and if the module needs more settings it might extend the configuration.
Maybe it could also be used to control which modules should actually be used instead of just loading everything in the py3status folder.
I think the format should be mirroring the format used for i3status.conf. It would probably make sense to place the config somewhere in either the .i3 or the py3status folder.
What are your thoughts on this?
Python's rrror log can be founded near socket file (on my arch - /var/run/user/XXXX/i3).
Please add this to documentation.
I start py3status (with --debug
).
I click on one of my modules -> Nothing happens. Nothing appears on the logs.
I click a second time either on the same or another module -> The event is received and the previous event is received.
I've tested this with both my own modules and the pomodoro example module, with py3status 8ce5204, i3bar version 4.6, python 3.3.3, on archlinux.
Doesn't work with python 3.3.
Works with python 2.7.
I haven't checked other versions.
When trying to run with python 3.3:
/py3status[4055]: user method netSpeed failed ('eth0:' is not in list)
/py3status[4055]: user method traffic failed ('eth0:' is not in list)
Version 1.4 of py3status.
After I updated py3status to version 2.0 I experience the adjust_time
error that appeared several times in the issue list for the first time:
Jan 09 15:17:14 sputnik3arch /py3status[451]: i3status adjust_time failed (time data '15:03 - 09.01.2015' does not match format '%Y-%m-%d %H:%M:%S')
on Arch Linux
$ locale
LANG=de_DE.UTF-8
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
before I never had it.
Any idea?
When running py3status with default settings (output_format = "i3bar" in /etc/i3status.conf, of course), the i3bar just displays the raw JSON output from py3status.
Hey there again.
When my system wakes up from suspension py3status won't update anymore.
Most notably the clock won't continue. I almost missed a date because of that,
as I thought I still had time (while it would still show the time from the day before) ^^
Sending a SIGUSR1 won't restart it. But reloading the i3 config will.
i3status itself does not have that problem.
First off, thank you for this wonderful program and all the work you've done on it.
I had a question. Py3status calls all the methods in the class Py3status in any script we write in the concerned directory. I'd like to control the order in which the output of the the methods from within one module are displayed. There is a way to control the order in which the output from a module is displayed (using "order+=" etc. in the config). Is there any way to control the order in which the output from each method within that module is displayed?
Hi there,
the latest version places the output of my class at the first position of the i3bar, no matter what number I specify in the returned tuple. Is this a bug or has the interface changed somehow? It did work before.
All the examples are placed at position 0, so those don't help to see how to do it correctly...
When trying to install the newest version of py3status with pip (or easy_install) the installation fails.
$ sudo pip install py3status -vvv
Downloading/unpacking py3status
Getting page https://pypi.python.org/simple/py3status/
URLs to search for versions for py3status:
* https://pypi.python.org/simple/py3status/
Analyzing links from page https://pypi.python.org/simple/py3status/
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.10.tar.gz#md5=4daa3248aecee3cd80de4c9f8a5ddfba (from https://pypi.python.org/simple/py3status/), version: 0.10
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.11.tar.gz#md5=7c178b35a87bc96b0609b4371a8b8b62 (from https://pypi.python.org/simple/py3status/), version: 0.11
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.12.tar.gz#md5=ef77da0ff0d3b227c8744491361efe42 (from https://pypi.python.org/simple/py3status/), version: 0.12
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.13.tar.gz#md5=53ddc77b1a4bef2ddea5972d3db5c4ff (from https://pypi.python.org/simple/py3status/), version: 0.13
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.1.tar.gz#md5=8f31ee01331f4e15d283e00a14f307d8 (from https://pypi.python.org/simple/py3status/), version: 0.9.1
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.tar.gz#md5=bc68353e8d86028f607445d3983d46c6 (from https://pypi.python.org/simple/py3status/), version: 0.9
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.0.tar.gz#md5=ee668f42fc49bafc2825f403d09b2c10 (from https://pypi.python.org/simple/py3status/), version: 1.0
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.2.tar.gz#md5=6012cde50c0e2fe6a86acd708c8497dc (from https://pypi.python.org/simple/py3status/), version: 1.2
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.3.tar.gz#md5=60455b1344d948894a4cb71f9d2fe751 (from https://pypi.python.org/simple/py3status/), version: 1.3
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.4.tar.gz#md5=a2984efad6e6a05bb5cc7d387e743c25 (from https://pypi.python.org/simple/py3status/), version: 1.4
Using version 1.4 (newest of versions: 1.4, 1.3, 1.2, 1.0, 0.13, 0.12, 0.11, 0.10, 0.9.1, 0.9)
Downloading py3status-1.4.tar.gz
Downloading from URL https://pypi.python.org/packages/source/p/py3status/py3status-1.4.tar.gz#md5=a2984efad6e6a05bb5cc7d387e743c25 (from https://pypi.python.org/simple/py3status/)
Running setup.py (path:/tmp/pip_build_root/py3status/setup.py) egg_info for package py3status
Running command python setup.py egg_info
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/py3status/setup.py", line 22, in <module>
long_description=read('README.md'),
File "/tmp/pip_build_root/py3status/setup.py", line 14, in read
return open(os.path.join(os.path.dirname(__file__), fname)).read()
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_root/py3status/README.md'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/py3status/setup.py", line 22, in <module>
long_description=read('README.md'),
File "/tmp/pip_build_root/py3status/setup.py", line 14, in read
return open(os.path.join(os.path.dirname(__file__), fname)).read()
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_root/py3status/README.md'
----------------------------------------
Cleaning up...
Removing temporary dir /tmp/pip_build_root...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/py3status
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/py3status
Storing debug log for failure in /home/marvin/.pip/pip.log
However installing v1.3 succeeds:
$ sudo pip install py3status==1.3 -vvv
Downloading/unpacking py3status==1.3
Getting page https://pypi.python.org/simple/py3status/
URLs to search for versions for py3status==1.3:
* https://pypi.python.org/simple/py3status/1.3
* https://pypi.python.org/simple/py3status/
Getting page https://pypi.python.org/simple/py3status/1.3
Could not fetch URL https://pypi.python.org/simple/py3status/1.3: 404 Client Error: Not Found
Will skip URL https://pypi.python.org/simple/py3status/1.3 when looking for download links for py3status==1.3
Analyzing links from page https://pypi.python.org/simple/py3status/
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.10.tar.gz#md5=4daa3248aecee3cd80de4c9f8a5ddfba (from https://pypi.python.org/simple/py3status/), version: 0.10
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.11.tar.gz#md5=7c178b35a87bc96b0609b4371a8b8b62 (from https://pypi.python.org/simple/py3status/), version: 0.11
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.12.tar.gz#md5=ef77da0ff0d3b227c8744491361efe42 (from https://pypi.python.org/simple/py3status/), version: 0.12
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.13.tar.gz#md5=53ddc77b1a4bef2ddea5972d3db5c4ff (from https://pypi.python.org/simple/py3status/), version: 0.13
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.1.tar.gz#md5=8f31ee01331f4e15d283e00a14f307d8 (from https://pypi.python.org/simple/py3status/), version: 0.9.1
Found link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.tar.gz#md5=bc68353e8d86028f607445d3983d46c6 (from https://pypi.python.org/simple/py3status/), version: 0.9
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.0.tar.gz#md5=ee668f42fc49bafc2825f403d09b2c10 (from https://pypi.python.org/simple/py3status/), version: 1.0
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.2.tar.gz#md5=6012cde50c0e2fe6a86acd708c8497dc (from https://pypi.python.org/simple/py3status/), version: 1.2
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.3.tar.gz#md5=60455b1344d948894a4cb71f9d2fe751 (from https://pypi.python.org/simple/py3status/), version: 1.3
Found link https://pypi.python.org/packages/source/p/py3status/py3status-1.4.tar.gz#md5=a2984efad6e6a05bb5cc7d387e743c25 (from https://pypi.python.org/simple/py3status/), version: 1.4
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.10.tar.gz#md5=4daa3248aecee3cd80de4c9f8a5ddfba (from https://pypi.python.org/simple/py3status/), version 0.10 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.11.tar.gz#md5=7c178b35a87bc96b0609b4371a8b8b62 (from https://pypi.python.org/simple/py3status/), version 0.11 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.12.tar.gz#md5=ef77da0ff0d3b227c8744491361efe42 (from https://pypi.python.org/simple/py3status/), version 0.12 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.13.tar.gz#md5=53ddc77b1a4bef2ddea5972d3db5c4ff (from https://pypi.python.org/simple/py3status/), version 0.13 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.1.tar.gz#md5=8f31ee01331f4e15d283e00a14f307d8 (from https://pypi.python.org/simple/py3status/), version 0.9.1 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-0.9.tar.gz#md5=bc68353e8d86028f607445d3983d46c6 (from https://pypi.python.org/simple/py3status/), version 0.9 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-1.0.tar.gz#md5=ee668f42fc49bafc2825f403d09b2c10 (from https://pypi.python.org/simple/py3status/), version 1.0 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-1.2.tar.gz#md5=6012cde50c0e2fe6a86acd708c8497dc (from https://pypi.python.org/simple/py3status/), version 1.2 doesn't match ==1.3
Ignoring link https://pypi.python.org/packages/source/p/py3status/py3status-1.4.tar.gz#md5=a2984efad6e6a05bb5cc7d387e743c25 (from https://pypi.python.org/simple/py3status/), version 1.4 doesn't match ==1.3
Downloading py3status-1.3.tar.gz
Downloading from URL https://pypi.python.org/packages/source/p/py3status/py3status-1.3.tar.gz#md5=60455b1344d948894a4cb71f9d2fe751 (from https://pypi.python.org/simple/py3status/)
Running setup.py (path:/tmp/pip_build_root/py3status/setup.py) egg_info for package py3status
Running command python setup.py egg_info
running egg_info
creating pip-egg-info/py3status.egg-info
writing pip-egg-info/py3status.egg-info/PKG-INFO
writing top-level names to pip-egg-info/py3status.egg-info/top_level.txt
writing dependency_links to pip-egg-info/py3status.egg-info/dependency_links.txt
writing entry points to pip-egg-info/py3status.egg-info/entry_points.txt
writing manifest file 'pip-egg-info/py3status.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/py3status.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/py3status.egg-info/SOURCES.txt'
Source in ./pip_build_root/py3status has version 1.3, which satisfies requirement py3status==1.3
Installing collected packages: py3status
Running setup.py install for py3status
Running command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/py3status/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-DOImFQ-record/install-record.txt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/py3status
copying py3status/__init__.py -> build/lib.linux-x86_64-2.7/py3status
running egg_info
writing py3status.egg-info/PKG-INFO
writing top-level names to py3status.egg-info/top_level.txt
writing dependency_links to py3status.egg-info/dependency_links.txt
writing entry points to py3status.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'py3status.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'py3status.egg-info/SOURCES.txt'
running install_lib
creating /usr/local/lib/python2.7/dist-packages/py3status
copying build/lib.linux-x86_64-2.7/py3status/__init__.py -> /usr/local/lib/python2.7/dist-packages/py3status
byte-compiling /usr/local/lib/python2.7/dist-packages/py3status/__init__.py to __init__.pyc
running install_egg_info
Copying py3status.egg-info to /usr/local/lib/python2.7/dist-packages/py3status-1.3.egg-info
running install_scripts
Installing py3status script to /usr/local/bin
writing list of installed files to '/tmp/pip-DOImFQ-record/install-record.txt'
Successfully installed py3status
Cleaning up...
Removing temporary dir /tmp/pip_build_root...
$ pip -V
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
I'm using the keyboard_layout
module and I'm wondering why there is a lag of over five seconds when I change the keyboard layout.
I know that five seconds doesn't sound like a lot but my goal in using this module is to always know what keyboard layout I'm using. One of the reasons for this is because my i3 keybindings only work in one keyboard =(
Hey, im trying to make a simple script, but cant make it work:
script - http://pastebin.com/F3ejvTK1
The script is in ~/.i3/modules/
So i run py3status -c ~/.i3status.conf -i ~/.i3/modules/ --debug
And everything i already had appears, except my script output.
Sorry if its too obvious.
I bet I am missing something but when I type in:
python battery_level.py
There is no output whatsoever.
Whereas if I put in:
python bitcoin_price.py
I get:
{'full_text': 'btce: 246.90$, btcde: 223.50€', 'cached_until': 1425135433.2139943}
Could someone please point me in the right direction.
I am running Arch Linux.
I get this error with python3 (works fine with python2)
Traceback (most recent call last):
File "py3status/modules/battery_level.py", line 120, in <module>
print(x.battery_level([], {}))
File "py3status/modules/battery_level.py", line 50, in battery_level
acpi_clean = acpi_raw.translate(None, ',')
TypeError: expected bytes, bytearray or buffer compatible object
Apologies if I'm wrong, but AFAICT there isn't a way to have multiple instances of py3status modules, like for example the stock i3status disk module:
order += "disk /"
order += "disk /home"
disk "/" {
format = "%used/%total"
}
disk "/home" {
format = "%used/%total"
}
I have tried configuring multiple instances of my own module, a mumble server monitor:
order += "mumble c"
mumble "c"{
display_name = "foo"
host = "bar.org.uk"
}
But this just results in the module not loading and the error py3status: loading mumble c failed (No module named 'py3status.modules.mumble')
This ability would be nice, as it encourages reusable, modular, erm, modules.
Hi,
I am using ubuntu 12.04, and pip seems to work fine, as i successfully installed other packages, but when I try yours:
pip install py3status
Downloading/unpacking py3status
Could not find any downloads that satisfy the requirement py3status
No distributions at all found for py3status
Hi,
I've got some problems installing the newest version of py3status. I don't think its related to the new version, more some issues with my system, but maybe you can help me. I'm on Debian testing.
I installed py3status (v2.1) about 9 days ago via pip:
sudo pip install py3status
Used sudo because pip wanted to write it to /usr/local/bin
. Everything worked fine.
Today I wanted to adjust the output of the battery_level module. Nothing changed and I tried to upgrade to the newest version. Here is where I'm getting problems.
I upgraded using pip:
sudo pip install --upgrade py3status
It upgraded well. After that the permission of file /usr/local/bin/py3status
was set to 700. Which prevented i3 to load it. I changed it to 755
in hope to change the problems. But when I try to check the version as a normal user I get the following stacktrace:
Traceback (most recent call last):
File "/usr/local/bin/py3status", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2876, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 449, in _build_master
ws.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 745, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 639, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: py3status==2.2
After some googling I found out that this might mean that there are multiple versions installed, but neither pip freeze
nor sudo pip freeze
list multiple versions.
$ sudo pip freeze
argparse==1.2.1
cffi==0.8.6
chardet==2.3.0
colorama==0.3.2
cryptography==0.6.1
html5lib==0.999
ndg-httpsclient==0.3.2
numpy==1.8.2
ply==3.4
py3status==2.2
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
pygobject==3.14.0
requests==2.4.3
six==1.8.0
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2
$ pip freeze
argparse==1.2.1
cffi==0.8.6
chardet==2.3.0
colorama==0.3.2
cryptography==0.6.1
html5lib==0.999
ndg-httpsclient==0.3.2
numpy==1.8.2
ply==3.4
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
pygobject==3.14.0
requests==2.4.3
six==1.8.0
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2
I tried to install version 2.1 with pip, but that didn't change anything and I removed it. I hope you can give me any hint on how to solve this. I'm already missing using py3status ;)
xbklayout
function should be xkblayout
, i.e. "kb" instead of "bk". This typo appears 3 times in total.
The rest of the code uses "kb" so I assumed what I found was a typo and decided to report it since it already caught my eye.
Currently, sending a SIGUSR1 to py3status will not update the output until the next refresh cycle. Is this intended behaviour, or should it behave like i3status (sending SIGUSR1 causes an immediate refresh)?
As I have my refresh interval set to 5 seconds, this isn't really optimal in some situations (eg. When displaying song info, I would rather it update immediately when changing songs).
Many thanks for Ultrabug's warmly help. This issue was lighted by Ultrabug.
When "workspace_button" is set to no, the on_click function will not be triggered.
Why not keep click events when this option is enabled? Someone like me may need this feature.
Thanks.
Settings that (I think) are relevant:
LANG=pl_PL.UTF-8
.i3status.conf:
tztime local {
format = "%a %Y-%m-%d %H:%M:%S"
}
Date is shown correctly, and looks like that:
śro 2014-02-19 10:25:00
From journal:
py3status[31352]: i3status adjust_time failed ('ascii' codec can't encode character u'\u015b' in position 0: ordinal not in range(128))
After removing '%a' part of configuration and restarting i3, there are no longer 'errors' in journal.
Steps to reproduce:
tztime local {
format = "śro"
}
py3status version 1.2 installed from Gentoo ebuild.
If more informations that I could provide are needed, contact me.
Please fix it.
A few days ago I took the liberty of adding a PKGBUILD for the arch users out there to the Arch User Repository. It can be found here: https://aur.archlinux.org/packages/py3status-git/?setlang=de .
I think it would be a great help for arch users.
Extremely simple module solving problems with not finished formatting of output of modules and multicoloring output. :-)
Is it correct that Nic is hardcoded? Because I'm getting a lots of error logs
Aug 02 12:33:07 localhost /py3status[5542]: user method net_traffic
failed ('wlp2s0:' is not in list)
Aug 02 12:33:08 localhost /py3status[5542]: user method net_speed failed
('wlp2s0:' is not in list)
Aug 02 12:33:08 localhost /py3status[5542]: user method net_traffic
failed ('wlp2s0:' is not in list)
Aug 02 12:33:09 localhost /py3status[5542]: user method net_speed failed
('wlp2s0:' is not in list)
Aug 02 12:33:09 localhost /py3status[5542]: user method net_traffic
failed ('wlp2s0:' is not in list)
Aug 02 12:33:10 localhost /py3status[5542]: user method net_speed failed
('wlp2s0:' is not in list)
Aug 02 12:33:10 localhost /py3status[5542]: user method net_traffic
failed ('wlp2s0:' is not in list)
Aug 02 12:33:11 localhost /py3status[5542]: user method net_speed failed
('wlp2s0:' is not in list)
Aug 02 12:33:11 localhost /py3status[5542]: user method net_traffic
failed ('wlp2s0:' is not in list)
I don't even have this interface.
// EDIT
Sorry for filing up this issue, i don't read the wiki carefully enough.
netdata Display network speed and bandwidth usage.
Configuration parameters:
- cache_timeout : 0 by default, you usually want continuous monitoring
- low_* / med_* : coloration thresholds
- nic : the network interface to monitor (defaults to eth0)
@author Shahin Azad <ishahinism at Gmail>
So thats bug then, its a wrong description, should be
nic : the network interface to monitor (defaults to wlp2s0)
@ultrabug , @enkore: What is the relationship of https://github.com/ultrabug/py3status to https://github.com/enkore/i3pystatus?
What are the goals of each project? How are they different?
I'm trying to define net_rate format using the following config segment:
net_rate {
interfaces = "eth0"
format = "{interface}: ⇑{up} ⇓{down}"
}
However, the format string seems to be interpreted as ”"{interface” by py3status parser. I traced the parsing back to line 207 of __init__.py
, which seems to cause this:
if section_name and '=' in line:
line = line.split('}')[0].strip()
Am I using an incorrect syntax for the format definition or is this a bug in py3status?
Sleep on line 313 causes (at least on my machine) the time on i3status to drift behind. Also, if the interval is set e.g. to 5 seconds, the time advances only one second in one refresh, thus drifting the time behind 4 seconds per one refresh interval.
I installed py3status using dnf (fedora) and the "py3status modules" commands are just not working for me.
I belive, that line #124 should be "print(x.example_method([], config))". Am I allowed just to clone py3 status and commit repaired file?
Currently if a daylight savings time change occurs, py3status doesn't pick it up and the bar shows an incorrect time.
Originally reported by Gamonics on i3 FAQ : https://faq.i3wm.org/question/5590/time-keeping-problem-i3status-or-py3status/
Is there any way to manually trigger a refresh of py3status? For example when I click on my volume module it mutes the sound. There is a slight delay until the widget actually shows that the sound has been muted (with a refreshrate of 1 second).
Hello,
I wrote a small pomodoro plugin to display the timer in i3bar. It starts with startx, and stops with a log out. I would like to enhance my plugin by mapping 2 keys to start/stop the pomodoro at will. Any idea how to proceed ?
Also, would you like me to do a pull request for my plugin in your examples/ directory ?
Thanks for your help
Cordially
Doing killall updates py3status output pretty fast when running it inside a terminal. But there is a noticeable delay (about 1-2 seconds) when the output is hosted in i3bar. Too much seems to be happening between py3status handling USR1 and py3status sending USR1 to the underlying i3status. This renders py3status useless for tasks like interactively changing the volume, i.e. tasks which require fast feedback to the user.
Hi,
I need some help for config I don't understand how it's works.
I have create this folder: ~/.i3/py3status/ and inside I put the file whoami.py
In my .i3/config: (2 bars one in top with py3status and one on bottom).
bar1 {
position top
status_command py3status -c ~/.i3topbar.conf
tray_output primary
}
In my .i3topbar.conf:
general {
output_format = "i3bar"
}
order += "whoami"
Without "order":
py3status: setup error (i3status died and said: Your 'order' array is empty. Please fix your config.). please try to fix this and reload i3wm.
Thank you.
It would be handy to have some user-contributed py3status modules collected in one place. If not directly as part of the py3status/contrib
repository, maybe someplace that would be linked from the documentation.
Greating from the middle east! I want to say thanks for your awesome project, and please keep up it :)
So as you can see in this , the used ram is being shown as 0.00, I tried to check the model's code, since I have a little experience in coding myself, I wasn't able to see what's wrong, the model is using the "free" command, and return the used, free, and percentage, everything seems to be working fine to me.
Here's my i3status.conf file just in case.
Hello,
The nagbar is showing up for me when py3status receives two consecurive (very close time-wise) SIGUSR1-s.
For example, when I run:
killall -s SIGUSR1 py3status && killall -s SIGUSR1 py3status
the nagbar appears, with the text: "py3status: SIGUSR1 (received USR1, forcing refresh), please try to fix this and reload i3wm".
Could this be happening due to self.clear_modules_cache() raising an exception when it's called concurrently? The problem doesn't seem to happen if I comment out that line.
I have written a new module. Do you want to add it to yours?
https://gist.github.com/frimdo/804b7d8737a0fe2ffcaa
Hey all,
this is my first post here on github, so please be patient with me.
I use the following config I found here on github: https://github.com/viggee/configi3/tree/master/home/config/i3
But when I enable the bar my cpu goes to the roof. Like 30-40% usage. When I disable py3status the cpu usage goes down to 1-2%.
I installed py3status-git from here: https://aur.archlinux.org/packages/py3status-git/
I have no idea why and I am also very new to linux and arch linux. Do you need some more information?
Thanks in advance!
Commit 875acde broke something. Custom classes are not being displayed. If I understand correctly, the API didn't change and my old classes should work. Please check.
I'm trying to read the code, but I'm not familiar with the program so it's taking me a while. I have tested until eabade5 and it works.
EDIT: Some more info: I'm on archlinux and I'm running py3status with python 3.3.2
It would be handy to have py3status resolve the config file in exactly the same way that i3status does, namely (according to i3status manpage):
Additionally, if you don't have a user-specific one, and /etc/i3status.conf isn't configured for i3bar output, I think the output is a bit confusing - specifically telling the user to modify /etc/i3status.conf when a per-user config is (usually) a better choice.
And finally: Why does py3status even care that the output_format be i3bar? Why not just always have py3status assume that's the case? I'm not sure this check is even necessary or what would break if this wasn't the case.
Looking at the current modules, I found that the option allowing users
to define a custom output format is not consistent or not present. One
thing that made me like i3status was the idea that no matter the module,
it is the format
option that is used to customize its output. I
think it would be nice to uniformize existant modules around this idea
and to document this as the way to go for future modules.
Beside the uniformization, it offers more flexibility for users : take
for example a simple module like
whoami.
It actually only offers the possibility to display the username of the
user running py3status. No formatting of the output is possible.
Wouldn't it be nice if it defined a format = "{username}"
in the
configuration ? It would allow the following :
{username}
and making it available to the user,format.format(username = username)
as response and it's done andDetails for existing modules (OK means it does it the way I described as
ideal; KO means the output is absolutely not configurable atm; links are
on the concerned lines) :
format
option but with unamed parameters, which is probablyformat_offline
and format_online
format_online
named format
would be moreformat
optionformat
for people who want to add a prefix such as an UTF8 music{}
will be replaced for, but%H
instead of strings formatted with {x}
is probably a limitationI took the time to write such a enhancement suggestion because it
involves changing parameter names for several modules, which would not
be compatible with existing configurations. I guess it needs discussion,
and will depend on what @ultrabug wants for this project :)
Sorry for noticing this only now, but it appears that in the init function of the Py3status class the values from i3status.conf are not available yet. So when you want to set up some things, just when the module is loaded for the first time, you won't be able to use the config values.
Sorry, I don't specified, that XXXX on /var/user/run/XXXX/ is you'r uid (envvar $UID), not user login.
I have this module and I want it to open a web-page in a web-browser when I click it. So of course, I tried this:
import webbrowser
def on_click(self, json, i3status_config, event):
if event['button'] == 1:
self.webbrowser.open('http://github.com')
Unfortunately, there's a problem with this. When webbrowser.open()
is called, it outputs a string like this START /usr/lib/firefox/firefox "http://github.com"
to stdout. This string end's up in the output of py3status breaking the json structure and causing the status on i3bar to freeze.
I've searched quite a bit and haven't found any simple way to (reliably) suppress or redirect the output. I'm aware that this might not be directly related to py3status, but I thought I'd ask anyway.
I have
tztime local {
format = "%a %d %b %H:%M:%S"
}
in my i3status.conf
and get spammed with:
transformation failed (time data 'sön 10 nov 18:51:55' does not match format '%a %d %b %H:%M:%S')
in my syslog.
Using Arch Linux and latest py3status from AUR. Seems to work with this format: %Y-%m-%d %H:%M:%S %Z
which is the example from the i3status site.
EDIT: %a
seems to be the culprit for me. Using sv_SE.UTF8
locale. Also sometimes the month is capitalized and sometimes not. Like so: 10 Nov ...
and then a few seconds later 10 nov ...
Any chance to resolve this problem?
The arch package doesn't pull this requirement by default but it needs to be installed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.