Commit graph

1582 commits

Author SHA1 Message Date
Vincent Bernat
c974b59082 i3-companion: make DBusSignal accept more filters 2021-07-16 01:15:33 +02:00
Vincent Bernat
2fd855e191 i3-companion: push bluetooth status to polybar 2021-07-16 00:52:54 +02:00
Vincent Bernat
e79b7291ad i3-companion: avoid leaking X11 file descriptor 2021-07-15 21:26:54 +02:00
Vincent Bernat
ae6e89e27e xss-lock: correctly stop redshift 2021-07-15 20:55:46 +02:00
Vincent Bernat
0f4e668b51 i3-companion: avoid leaking window name in logs 2021-07-15 20:52:32 +02:00
Vincent Bernat
ce25d4d970 polybar: only takes the primary screen if connected 2021-07-15 19:15:16 +02:00
Vincent Bernat
1ee8138fbf firefox: mention Firefox 91 as fixing the dark/light mix 2021-07-15 18:57:36 +02:00
Vincent Bernat
ea4905bc9d i3-companion: enable autoreconnect to i3 2021-07-15 18:20:59 +02:00
Vincent Bernat
11044c6f3e xsettingsd: optimize a bit the shell script 2021-07-15 18:17:18 +02:00
Vincent Bernat
550ad9deac i3-companion: switch to Xlib to query XRandR state 2021-07-15 15:28:24 +02:00
Vincent Bernat
753eca739c wallpaper: optimize use of XRandR
Don't ask for hardware update.
2021-07-15 15:26:03 +02:00
Vincent Bernat
84b1aa99cc i3-companion: don't restart everything on spurious RandR events 2021-07-15 15:14:39 +02:00
Vincent Bernat
390597ecd7 polybar: avoid querying xrandr for changes too much
For some reason, this makes X probe again the monitors. Switch to
`xrandr --current` seems to make this problem goes away. Maybe, this
is also `polybar --list-monitors` keeping a grab while polybar is
starting.
2021-07-15 14:32:00 +02:00
Vincent Bernat
dfb7cb555e xss-lock: do not trigger a XRandR event
I need to fix that later...
2021-07-15 11:35:19 +02:00
Vincent Bernat
c7365a8886 i3-companion: add icon for d-feet 2021-07-14 20:47:46 +02:00
Vincent Bernat
e4adc69a71 firefox: mention patch about dark theme/light pages 2021-07-14 20:41:19 +02:00
Vincent Bernat
8cb90e03da firefox: don't resist fingerprinting
So many stuff are breaking, including switching tabs use Alt+N. Switch
back to systemUsesDarkTheme 0 for the moment...
2021-07-14 19:01:53 +02:00
Vincent Bernat
011cb957c4 firefox: use resist finger printing to get light themed pages 2021-07-14 18:15:27 +02:00
Vincent Bernat
5c84aff92b firefox: firefox now auto detect the theme and lying mangle stuff
See https://bugzilla.mozilla.org/show_bug.cgi?id=1720508
2021-07-14 18:07:51 +02:00
Vincent Bernat
ba28674f9b Revert "polybar: tentative to use Material Icons"
This reverts commit 4e152f0466. Not
worth it currently.
2021-07-14 17:33:19 +02:00
Vincent Bernat
4e152f0466 polybar: tentative to use Material Icons 2021-07-14 17:33:03 +02:00
Vincent Bernat
113efb421f polybar: change notification icon 2021-07-14 17:25:41 +02:00
Vincent Bernat
411120fdec polybar: allow scrolling through notification history 2021-07-14 17:20:49 +02:00
Vincent Bernat
295e13f1c4 polybar: display dunst state for notifications 2021-07-14 17:14:52 +02:00
Vincent Bernat
80c4605916 i3-companion: use proper DBus language
From https://www.freedesktop.org/wiki/IntroductionToDBus/#addressing
2021-07-14 17:09:45 +02:00
Vincent Bernat
de9c33eaad i3-companion: specify bus to listen to for DBus events 2021-07-14 16:57:23 +02:00
Vincent Bernat
a44cd7dc54 polybar: use a different color for focused vs visible 2021-07-14 14:11:16 +02:00
Vincent Bernat
3d3f3bba71 polybar: make low battery symbol blink 2021-07-14 14:03:02 +02:00
Vincent Bernat
308d419468 polybar: remove ethernet module 2021-07-14 12:02:30 +02:00
Vincent Bernat
ad01c5feae polybar: reduce interval for battery and fs 2021-07-14 12:02:16 +02:00
Vincent Bernat
29128f1b68 polybar: adapt ramp for battery
First and last values are not used.
2021-07-14 11:38:00 +02:00
Vincent Bernat
4e8ea01ea1 polybar: display remaining time on low battery 2021-07-14 11:18:45 +02:00
Vincent Bernat
0e95635691 i3-companion: decorator to declare static variables
This seems cleaner than using `getattr()` to initialize the variable
inside the function.

Also, the debouncer function does not need this and can work with a
dictionary mapping functions to their worker.
2021-07-14 11:08:39 +02:00
Vincent Bernat
4b1af45c1b polybar: specify font for battery animation
This is prettier this way.
2021-07-14 09:13:01 +02:00
Vincent Bernat
896e12e73e i3-companion: polybar's fonts are 1-indexed 2021-07-14 09:09:33 +02:00
Vincent Bernat
c906475ecf polybar: animate low battery warning 2021-07-14 09:08:42 +02:00
Vincent Bernat
65caa00117 i3-companion: use window current workspace for exclusivity check 2021-07-14 07:39:58 +02:00
Vincent Bernat
81cdc7b40d i3-companion: remove debug code 2021-07-13 17:10:54 +02:00
Vincent Bernat
030d50c636 xsettings: use i3-msg instead of i3-cmd 2021-07-13 14:11:50 +02:00
Vincent Bernat
8c1b3b7bb2 picom: switch to glx backend using experimental backends
There are some artifacts with xr_glx_hybrid and it is not available as
experimental. Let's try glx with experimental backend. No tearing.
Tested with https://www.youtube.com/watch?v=MfL_JkcEFbE.
2021-07-13 08:27:22 +02:00
Vincent Bernat
71a3d1d4a4 i3-companion: move polybar handling into its own function 2021-07-13 08:11:48 +02:00
Vincent Bernat
71dcb5d6bc i3-companion: rename dampen to debounce
I think this is more correct. Dampen is used in network world, but
debounce seems more common (notably, we debounce push buttons).
Another word could be throttle but that does not match as we need to
react to the last event of a batch instead of the first (and we sure
don't want to drop the last).
2021-07-13 00:39:45 +02:00
Vincent Bernat
2781777842 i3-companion: also dampen a bit workspace renames
Just because I want to use this new function!
2021-07-13 00:31:26 +02:00
Vincent Bernat
b6354b1256 i3-companion: move all state inside fn.worker namespace
This is cleaner than putting arbitrary attributes inside a task. The
scheduling will be done later, so it is safe to put put everything
inside the namespace object and avoid polluting the function
namespace.
2021-07-13 00:26:31 +02:00
Vincent Bernat
b62f747837 i3-companion: add back ability to trigger urgent work despite of damping 2021-07-13 00:13:55 +02:00
Vincent Bernat
f56b995d5a i3-companion: rework dampener to be easier to understand
We have a worker running as long as there is work. The optional sleep
is not implemented. There is a slight semantic difference: the work is
not postponed indefinitely.
2021-07-12 23:57:06 +02:00
Vincent Bernat
9b0bb1ce76 i3-companion: fix dampening
Cancellation is asynchronous. So, there was a race condition where we
were throwing away the task we just scheduled. Don't really on
cancellation for synchronization. We also want to have only one
instance running. So, use locks to ensure only one instance is running
and only cancel running functions while in sleeping phase, otherwise,
let them run.

Currently, this OK, however, it is assumed the function has somehow
the same effect whatever the arguments we provide. This is true for
the two callbacks we use `@dampen` on.
2021-07-12 23:37:25 +02:00
Vincent Bernat
2012ba0c15 i3-companion: move dampening/retry logic inside a decorator
There is some nasty bug we can run into:

```
ERROR: Task was destroyed but it is pending!
task: <Task pending name='Task-44' coro=<dampen.<locals>.decorator.<locals>.fn_now() running at /home/bernat/.config/i3/bin/i3-companion:115> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f687353e2b0>()]>>
```

This is often followed by a segfault. It's a bit difficult to
understand where it comes from. Sleeping a bit even if we don't want
to dampen seems to workaround this issue. It seems we have to keep a
reference to a task until it is cancelled properly.
2021-07-12 22:15:57 +02:00
Vincent Bernat
fb0bd7fcca i3-companion: fix logging to console 2021-07-12 21:17:25 +02:00
Vincent Bernat
34ac2d7268 i3: move Firefox WebRTCGlobalIndicator to some fixed position 2021-07-12 20:17:33 +02:00