Skip to content
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

Toggle day and night modes in redshift #885

Open
wgmayer0 opened this issue Jul 21, 2023 · 4 comments
Open

Toggle day and night modes in redshift #885

wgmayer0 opened this issue Jul 21, 2023 · 4 comments

Comments

@wgmayer0
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I want to be able to toggle between day and night mode.

Describe the solution you'd like
A clear and concise description of what you want to happen.

!/bin/bash

current_temp=$(_code here that returns current temperature from redshift_)
echo "Current temperature: $current_temp"

if [[ $current_temp -eq 1000 ]]; then
    redshift -P -O 6500
    notify-send "Redshift: Daytime mode (6500K)"
else
    redshift -P -O 1000
    notify-send "Redshift: Nighttime mode (1000K)"
fi

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
None, the way described should work fine

Additional context
Add any other context or screenshots about the feature request here.

@yds12
Copy link

yds12 commented Aug 14, 2023

I was trying to write the exact same script and found that redshift -p shows among other things a screen temperature, but it doesn't seem to be the current value.

@wgmayer0
Copy link
Author

wgmayer0 commented Aug 14, 2023 via email

@yds12
Copy link

yds12 commented Aug 14, 2023

I found a workaround on Linux: you can do xrandr --current --verbose | grep Gamma to get the gamma settings of the monitor, it is affected by redshift.

@wgmayer0
Copy link
Author

wgmayer0 commented Aug 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants