willpower3309 / swayblur Goto Github PK
View Code? Open in Web Editor NEWBasic i3ipc based script to blur an output's wallpaper when a client is present in it
Home Page: https://pypi.org/project/swayblur/
License: MIT License
Basic i3ipc based script to blur an output's wallpaper when a client is present in it
Home Page: https://pypi.org/project/swayblur/
License: MIT License
This is a horribly and needlessly complicated file, with hash vs imageHash vs imageHashPath etc, it could be optimized as well, lots of python list generator expressions that could likely be reduced down to one or two
As it currently stands, the script perfectly supports multi-monitor setups for all operations except when switching the first / last client from one monitor's focused workspace to another monitor's currently open but unfocused workspace.
I'm on Arch Linux I have dual monitors so it takes a sec for oguri to recognize the two.
I wrote a script combining oguri and swayblur to starts within split seconds from launch.
Oguri works as expected, but I always have to run a manual command to get swayblur working under this condition.
Otherwise swayblur runs only when I don't put a sleep command in front. But then the wallpaper doesn't get set correctly. So I have to manually run oguri .
Any thoughts as to why?
An enhancement suggestion
Right now the delay just pauses before switching the wallpaper which is too sudden
If a series of images with a blur gradually increasing/decreasing is generated based on the delay, then that can be merged into a GIF and played by oguri...
This would make the transition from blurred to unblurred way smoother when you close a window
I understand this program uses Oguri, but on a dual monitor landscape & portrait setup oguri always starts the portrait orientation wrong, and it doesn't correct until I open up an app. I wondering how hard would it be to tweak the code to read .azotebg file in the home folder instead of oguri config?
This is displayed when spawning swayblur when oguri daemon isn't run. Maybe it would be better to spawn a new instance instead of printing the error?
Also, it seems that currently oguri conflicts with swaybg and it's a bit of a puzzle to figure this out, especially if the latter is launched through setting wallpaper in sway config. Although, it's not directly related to swayblur it could be handled here (by killing swaybg
process) until it gets fixed upstream
The script could be made much more simple if it read the values from the oguri config
When changing wallpapers sometimes I see some frames from previous wallpaper when animation is run. Removing ~/.cache/swayblur
helps to fix it
Here's the traceback
Traceback (most recent call last):
File "/usr/sbin/swayblur", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.10/site-packages/swayblur/__main__.py", line 122, in main
blurManager.start()
File "/usr/lib/python3.10/site-packages/swayblur/blurManager.py", line 92, in start
self.SWAY.main()
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 514, in main
raise loop_exception
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 497, in main
while not self._event_socket_poll():
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 477, in _event_socket_poll
raise e
File "/usr/lib/python3.10/site-packages/i3ipc/connection.py", line 474, in _event_socket_poll
self._pubsub.emit(event_name, event)
File "/usr/lib/python3.10/site-packages/i3ipc/_private/pubsub.py", line 28, in emit
s['handler'](self.conn, data)
File "/usr/lib/python3.10/site-packages/swayblur/blurManager.py", line 97, in handleMove
containerOutput = container.workspace().ipc_data['output']
KeyError: 'output'
Users can have a monitor with no wallpaper. While this is an atypical use case for someone to have with this script, it's best that we handle it just in case
It seems that blur is only added but not removed.
Also, the wallpaper path is set either in oguri config and in swayblur, maybe that's the source of problem?
I don't know what it means, but perhaps it's better to find a replacement?
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.