-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An other suggestion: wlsunset (redshift equivalent) #42
Comments
I've started packaging it here: https://build.opensuse.org/package/show/home:mrey/wlsunset |
Accepted SR https://build.opensuse.org/request/show/889691 to devel project: https://build.opensuse.org/package/show/X11:Wayland/wlsunset |
cool, interesting how to integrate it to the solution ? |
run it with something like: |
I'm fairly certain that people will complain about making connections to some website without them being aware :D But I don't see another solution out of the box. |
wlsunset is packaged and in Factory now https://build.opensuse.org/package/show/openSUSE:Factory/wlsunset |
I agree :) we could just add it as config file for sway with everything commented out, and ppl could uncomment if they wish to use it. |
There is GeoClue for getting location: https://gitlab.freedesktop.org/geoclue/geoclue/-/wikis/home Found it used here: https://phabricator.kde.org/source/plasma-redshift-control/browse/master/package/contents/ui/config/ConfigAdvanced.qml |
I can do that. Is that fine? Please look at #132 also |
@krishjainx sure, please do. I don't know though that it should be enabled by default, not everyone would like that feature. But having it as an option - cool |
@denisok Using GeoClue and Dasbus (a DBus library from Red Hat), one could use the script below. The only dependency would be python3-dasbus. What do you think? from gi.repository import GLib
from dasbus.connection import SystemMessageBus
from dasbus.typing import get_variant
# Create an event loop
loop = GLib.MainLoop()
# Connect to the system bus
bus = SystemMessageBus()
# Get the Geoclue Manager interface
geoclue_manager = bus.get_proxy(
"org.freedesktop.GeoClue2",
"/org/freedesktop/GeoClue2/Manager"
)
# Get the client path and interface
client_path = geoclue_manager.GetClient()
geoclue_client = bus.get_proxy(
"org.freedesktop.GeoClue2",
client_path
)
# Set the DesktopId
geoclue_client.DesktopId = "wlsunset"
# Define a callback function to handle the LocationUpdated signal
def on_location_updated(old_path, new_path):
# Get the location interface
geoclue_location = bus.get_proxy(
"org.freedesktop.GeoClue2",
new_path
)
# Output the latitude and longitude
print("Latitude:", geoclue_location.Latitude)
print("Longitude:", geoclue_location.Longitude)
# Stop the event loop
loop.quit()
# Connect the callback function to the LocationUpdated signal
geoclue_client.LocationUpdated.connect(on_location_updated)
# Start the client
geoclue_client.Start()
# Run the event loop
loop.run() |
Just an other suggestion :-)
I use sway on my laptop and I really prefer a blue filter while looking at its screen at nights -> There is this nice little tool that adjusts the gamma for wayland/swaywm wlsunset. Though there is no rpm for opensuse yet, but it's pretty easy to install.
The text was updated successfully, but these errors were encountered: