Commit graph

25 commits

Author SHA1 Message Date
tobi-wan-kenobi
1983408e58 [util] fix location timeouts 2022-08-31 19:12:05 +02:00
Tom Watson
a97a7fe507 Updates addressing PR comments
Added location_info() to util/location API to return a dict of all location information. Updated modules/contrib/publicip to use that API. Changed modules/contrib/publicip refresh period back to 60 minutes. Changed /util/location API from 'country_name' back to 'name'
2022-07-06 19:37:29 +07:00
Tom Watson
218bfa2235 Updated contrib/publicip module and util/location
Added another API endpoint, Added options to display country name, country code, city name and lat/long coordinates, attempt to handle failure to fetch info from API endpoints cleanly
2022-07-06 01:05:25 +07:00
Mihai Morariu
2a77e3a85c Fix exception in location.py. 2022-02-14 15:36:24 +02:00
tobi-wan-kenobi
08b5386140 [util/popup] fix endless loop on "close on leave"
When closing a popup window when the mouse leave the area (default
behaviour, unfortunately), the main "show()" got stuck in an infinite
loop.

Fix that by setting running to False when exiting.

fixes #844
2022-01-14 13:39:04 +01:00
tobi-wan-kenobi
fa66873582 [core/theme] add xresources support
add support for reading foreground and background, and colors, from
xresources.py

many thanks to @Aliuakbar for the addition!

fixes #731
2020-12-07 09:01:08 +01:00
Florian Eich
3c08eafa4a Add TiB to disk units, add SI unit option for disk space 2020-12-02 19:08:45 +01:00
Naya Verdier
4aff0499f0
[util.popup] Deduplicate code, "close" button only if leave=False 2020-07-25 08:43:26 -07:00
tobi-wan-kenobi
fc8783ee13 [util/cli] fix CLI invokation for sway
in sway/wayland, make sure that the wayland socket is cleared, which
seems to cause issue for some unspecified reason.

also, while at it, improve code so that the environment dict that is
passed in is *not* modified.

fixes #628
2020-06-28 10:44:30 +02:00
tobi-wan-kenobi
350648b0cd [util/location] reverse location providers
seems that ipapi gives better results wrt. location
2020-06-27 15:05:57 +02:00
tobi-wan-kenobi
954d7545e3 [util/format] make temperature metric case insensitive
see #664
2020-06-27 15:02:55 +02:00
Tobias Witek
92ab1a3e00 [util/cli] make sure language is set to "C"
to make parsing of CLI output reliable (i.e. always in english), set
LC_ALL accordingly.

see #662
2020-06-24 07:47:31 +02:00
tobi-wan-kenobi
5e40dfb28a [all] small fixed picked up by pytest
- unicode stuff
- make all regexps regex strings
2020-06-02 20:13:39 +02:00
tobi-wan-kenobi
55121c86d4 [util/popup] add generic "close" on root menu
add a "close" entry for the root menu of all popup menus (if they are
not automatically destroyed when leaving the menu).

fixes #633
2020-05-30 15:19:31 +02:00
tobi-wan-kenobi
1c04068f89 [util/popup] replace mainloop with custom loop
add a custom event loop for popups that closes the menu on mouse button
release events and - most importantly - propagates this event back to
any parent menu.

fixes #633
2020-05-30 10:02:12 +02:00
Zero Rust
1b34993fa9 adding separator addition to popup 2020-05-22 23:53:21 -04:00
tobi-wan-kenobi
a697500491 [core] add debugging around click events
log commandline outputs and errors. allow input handlers to be
configured as "waiting" for debugging purposes.

see #628
2020-05-16 15:16:23 +02:00
tobi-wan-kenobi
eea3c758de [core/input] Invoke commands in a subshell
add shell capability to util.cli and make sure that the input module
uses that to reliably spawn whatever command the user wants to run.

see #628
2020-05-16 11:43:43 +02:00
tobi-wan-kenobi
1b53e7ecf2 [util/popup] add docstrings 2020-05-15 10:07:07 +02:00
tobi-wan-kenobi
bc382e67d3 [general] black code some more 2020-05-14 20:36:01 +02:00
tobi-wan-kenobi
3fdd2d2be6 [modules/arch-update] Gracefully handle exit code 2
fixes #624
2020-05-11 15:10:20 +02:00
tobi-wan-kenobi
b4f8870a95 [doc] update API docs 2020-05-10 13:25:13 +02:00
tobi-wan-kenobi
8ca036bc4c [util/graph] Add API documentation 2020-05-10 13:15:47 +02:00
tobi-wan-kenobi
106bb9e8c3 [util/graph] Remove docstrings in prep for more complete documentation 2020-05-10 13:07:08 +02:00
tobi-wan-kenobi
320827d577 [core] restructure to allow PIP packaging
OK - so I have to admit I *hate* the fact that PIP seems to require a
subdirectory named like the library.

But since the PIP package is something really nifty to have (thanks to
@tony again!!!), I updated the codebase to hopefully conform with what
PIP expects. Testruns so far look promising...
2020-05-09 21:22:00 +02:00