Giter Club home page Giter Club logo

py3status's Introduction

image

py3status

CI

py3status is an extensible i3status wrapper written in Python.

Using py3status, you can take control of your i3bar easily by:

  • using one of the available modules shipped with py3status
  • grouping multiple modules and automatically or manually cycle their display
  • writing your own modules and have their output displayed on your bar
  • handling click events on your i3bar and play with them in no time
  • seeing your clock tick every second whatever your i3status interval

No extra configuration file needed, just install & enjoy!

About

You will love py3status if you're using i3wm (or sway) and are frustrated by the i3status limitations on your i3bar such as:

  • you cannot hack into it easily
  • you want more than the built-in modules and their limited configuration
  • you cannot pipe the result of one of more scripts or commands in your bar easily

Philosophy

  • no added configuration file, use the standard i3status.conf
  • rely on i3status' strengths and its existing configuration as much as possible
  • be extensible, it must be easy for users to add their own stuff/output by writing a simple python class which will be loaded and executed dynamically
  • easily allow interactivity with the i3bar
  • add some built-in enhancement/transformation of basic i3status modules output

We apply the Zen of py3status to improve this project and encourage everyone to read it!

Documentation

Up-to-date documentation:

Get help or share your ideas on IRC:

  • channel #py3status on OFTC

Installation

See the up to date and complete installation instructions for your favorite distribution.

Usage

In your i3 config file, simply switch from i3status to py3status in your status_command:

status_command py3status

Usually you have your own i3status configuration, just point to it:

status_command py3status -c ~/.i3/i3status.conf

Options

You can see the help of py3status by issuing `py3status -h`:

usage: py3status [-h] [-b] [-c FILE] [-d] [-g] [-i PATH] [-l FILE] [-s]
                 [-t INT] [-m] [-u PATH] [-v] [--wm WINDOW_MANAGER]

The agile, python-powered, i3status wrapper

optional arguments:
  -h, --help            show this help message and exit
  -b, --dbus-notify     send notifications via dbus instead of i3-nagbar
                        (default: False)
  -c, --config FILE     load config (default: /home/alexys/.i3/i3status.conf)
  -d, --debug           enable debug logging in syslog and --log-file
                        (default: False)
  -i, --include PATH    append additional user-defined module paths (default:
                        None)
  -l, --log-file FILE   enable logging to FILE (default: None)
  -s, --standalone      run py3status without i3status (default: False)
  -t, --timeout INT     default module cache timeout in seconds (default: 60)
  -m, --disable-click-events
                        disable all click events (default: False)
  -u, --i3status PATH   specify i3status path (default: /usr/bin/i3status)
  -v, --version         show py3status version and exit (default: False)
  --wm WINDOW_MANAGER   specify window manager i3 or sway (default: i3)

Available modules

All modules shipped with py3status are configurable directly from your current i3status.conf!

Check them out to see all the configuration options.

Control from CLI

Just like i3status, you can force an update of your i3bar by sending a SIGUSR1 signal to py3status. Note that this will also send a SIGUSR1 signal to i3status:

killall -USR1 py3status

To refresh individual modules, the py3-cmd utility can be used, e.g:

py3-cmd refresh wifi

py3status's People

Contributors

alexoneill avatar andrwe avatar anon1234 avatar beetleman avatar cypher1 avatar cyrinux avatar dosera avatar eumiro avatar federicoceratto avatar girst avatar guiniol avatar horatiozedu avatar horgix avatar igorgrebenkov avatar jmdana avatar lasers avatar markrileybot avatar markus00000 avatar maximbaz avatar mrt-prodz avatar pferate avatar pydsigner avatar randomguy avatar ricci avatar ritze avatar rixx avatar spirotot avatar tobes avatar ultrabug avatar valdur55 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py3status's Issues

Q: Opening a web-browser from module click event?

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.

Transformation failed on custom time format

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?

"py3status modules list" and example_module

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?

Problems installing 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 ;)

wish list

  • add some -v parameter to see the version (done in v1.5)

Module netdata doesn't work with python 3.3

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.

Install fail - could not find any downloads...

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

Use same order to resolve i3status configuration and don't require exact output_format

It would be handy to have py3status resolve the config file in exactly the same way that i3status does, namely (according to i3status manpage):

  1. ~/.i3status.conf
  2. ~/.config/i3status/config (or $XDG_CONFIG_HOME/i3status/config if set)
  3. /etc/i3status.conf
  4. /etc/xdg/i3status/config (or $XDG_CONFIG_DIRS/i3status/config if set)

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.

config values not available on init

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.

timezone option in tztime ignored

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:

  1. The time is in the wrong timezone (22:02 instead of 16:02).
  2. The timezone identifier (EDT) is missing (yet it is supposed to be there due to the %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

py3status action by pressing a key

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

Uniformize and standardize 'format' option

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 :

  • Still the same default behavior
  • Definable by users in i3status.conf, to add simple things sur as
    prefix or suffix (which are definitely handy and pretty when used with
    UTF8 icons)
  • By using directly {username} and making it available to the user,
    there isn't more parsing to do on the module side. Just return
    format.format(username = username) as response and it's done and
    working for both default value and possible user custom values

Details 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) :

  • aws_bill
    : KO; no output customization available
  • battery_level
    has a format option but with unamed parameters, which is probably
    not intuitive for users that would want to redefine it themselves
  • bitcoin_price
    KO; doesn't have any output configuration
  • bluetooth
    OK
  • clementine
    KO; offers absolutely no output costomization, would probably greatly
    benefit from it and would be easily adaptable
  • dpms
    : KO; no customization, easy to add
  • glpi
    KO; would benefit from it
  • imap
    OK
  • keyboard_layout
    KO; has no output config
  • mpd_status
    OK
  • net_rate
    OK
  • netdata
    doesn't have a configurable output but already uses .format strings
  • ns_checker
    KO; satisfies itself by only displaying a defined output with "NOK" or
    "OK", and would benefit from this uniformization
  • nvidia_temp
    offers customization of prefix and units (suffix) : would benefit from
    this standardization
  • online_status
    allows output customization with format_offline and format_online
    as options. Having the format_online named format would be more
    intuitive and consistent
  • pingdom
    KO; doesn't allow any output customization and would benefit from a
    format option
  • player_control
    already have customizable icons, but would probably be improved by a
    format for people who want to add a prefix such as an UTF8 music
    note or that kind of stuff
  • pomodoro
    looks a bit tricky to adapt to this suggestion
  • rate_counter
    KO; has a completely hardcoded output
  • scratchpad_counter
    uses a .format string and document what {} will be replaced for, but
    a named argument would make it uniformized with the other modules
  • screenshot
    KO but seems to have a really variable output depending on clicks,
    maybe not adaptable
  • spaceapi
    has a partially customizable output, but would need a renaming. The
    %H instead of strings formatted with {x} is probably a limitation
    imposed by datetime
  • spotify
    OK; does everything right
  • sysdata
    KO
  • vnstat
    OK : does it exactly as suggested
  • weather_yahoo
    KO
  • whatismyip
    looks OK
  • whoami
    doesn't offer any way to customize the output
  • window_title
    KO; but seems tricky to adapt
  • xrandr
    KO

I 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 :)

New version does not seem to place output at correct position in i3bar

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...

Hard coded wifi interface causes lots of error logs

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)

"i3status adjust_time failed" since update to 2.0

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?

Setting order in which methods are called from Py3status class

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?

battery_level.py module doesn't run under python3

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

collection of py3status modules

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.

Update debug info

Sorry, I don't specified, that XXXX on /var/user/run/XXXX/ is you'r uid (envvar $UID), not user login.

Defining net_rate format doesn't work

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?

Multiple module instances

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.

Nagbar appearing when receiving SIGUSR1

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.

No output from: battery_level.py.

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.

Sometimes modules will not be shown

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.

Invoke refresh of py3status after click event

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).

Sysdata model is not displaying ram usage correctly

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 screenshot, 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.

Raw JSON output

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.

doesn't receive click events until the second event

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.

py3status spams in journal

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:

  • Put in .i3status.conf:
tztime local {
        format = "śro"
}
  • Restart i3.
  • Watch spam in journal.

py3status version 1.2 installed from Gentoo ebuild.

If more informations that I could provide are needed, contact me.

Please fix it.

Missing attribute in pomodoro module

When I was traying to run the pomodoro module i got the following error:

pomodoro_issue

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.

High cpu usage when using py3status

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!

Installing py3status 1.4 fails with pip

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)

py3status hangs when system wakes up from suspension

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.

[RFC] Configuration handling for modules

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?

Cant make it work

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.

Very noticeable delay between py3status update and i3status update (USR1)

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.

doesn't call custom classes after 875acde

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

Lag on keyboard_layout

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 =(

Typo in the keyboard_layout module

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.

Sending SIGUSR1 should immediately refresh

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).

How it's works?

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.

"workspace_buttons no" will disable on_click AFFAIR

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.