Giter Club home page Giter Club logo

zb3 / gnome-gamma-tool Goto Github PK

View Code? Open in Web Editor NEW
93.0 4.0 10.0 31 KB

A command-line tool that lets you change gamma in GNOME and Cinnamon (with Wayland). You can also adjust contrast and brightness. It works by creating a color profile with the VCGT table, so that changes are persistent and don't interfere with other settings like night light.

Python 100.00%
gnome icc-profile vcgt gamma contrast brightness wayland cinnamon change-gamma gamma-adjustments

gnome-gamma-tool's Introduction

Hi there

Okay. So I've created zb3/zb3 and I can now add this text to my profile. You can do this too, hopefully you'll make a better use of this feature...

Anyway, here's a giraffe: ๐Ÿฆ’

and here's the link to my Gist profile, cool stuff there:

๐Ÿ™‚ ๐Ÿ‘‡ ๐Ÿ™‚
๐Ÿ‘‰ zb3's gists ๐Ÿ‘ˆ
๐Ÿ™ƒ ๐Ÿ‘† ๐Ÿ™ƒ

gnome-gamma-tool's People

Contributors

davsinghm avatar zb3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gnome-gamma-tool's Issues

No such display

Using Fedora38 with GNOME on Wayland
./gnome-gamma-tool.py -g 2.0
returns
No such display, found 0 displays.

Fails in python3 works in python2

thank you, this is a life saver.. just noting here that it doesn't appear to work in python 3.7.5

  File "./gnome-gamma-tool.py", line 73
    if fit and (maxval := max(val)) > 1:  # the walrus operator says hello
                       ^
SyntaxError: invalid syntax

(works for me in python 2.7.18)

Possible race condition with gnome-gamma-tool + my brightness script on gnome

ggt-log.txt
I tried to organize this a bit but you can tell me if it's good or not.

Preface

A lot of this file is redundant and I wasn't sure which information was useful vs which information was unnecessary so I opted to keep it all in this can be shortened later if it becomes an issue. It's a little above 17 thousand lines but it can be easily skimmed for some errors.

Steps to reproduce

Map the command sh /home/(username)/Projects/Gnome-Brightness-Ctl/brightness.sh Down to F9 in gnome keyboard settings.
Map the command sh /home/(username)/Projects/Gnome-Brightness-Ctl/brightness.sh Up to F10 in gnome keyboard settings.
Recreate the directory structure and paste my brightness script in that directory along with ggt(gnome-gamma-tool).
Spam the F9 and F10 keys or hold them down and the screen starts to freak out.

Theory

This is probably due to a race condition as mentioned here #2 (reply in thread)

Solutions

Find a way to limit the amount of times a user can run the script via the keybinds in a given time frame. However this is not ideal since the user should be able to change their brightness at will and as fast as possible.

Profile disappear after logout

gnome-gamma-tool creates and applies profiles correctly, but when I logout, they disappear on GNOME settings app.

./gnome-gamma-tool.py -g 0.8
Current profile is /home/dom/.local/share/icc/edid-75c94e30cdd9a420ea7870abb5a85f5d.icc
New profile is /home/dom/.local/share/icc/gnome-gamma-tool-697e2bda-871c-41d7-90c5-262aa4f67dca
Traceback (most recent call last):
  File "/home/dom/gnome-gamma-tool/./gnome-gamma-tool.py", line 398, in <module>
    main()
  File "/home/dom/gnome-gamma-tool/./gnome-gamma-tool.py", line 384, in main
    mgr.make_profile_default(new_profile)
  File "/home/dom/gnome-gamma-tool/./gnome-gamma-tool.py", line 316, in make_profile_default
    self.cdd.make_profile_default_sync(profile)
gi.repository.GLib.GError: cd_device_error: SQL error: attempt to write a readonly database (9)

error after --delete

I used the --delete option, and now every call shows this. How to fix?

Current profile is /home/username/.local/share/icc/gnome-gamma-tool-5cf2d86e-60d7-4dc3-8b00-42493ccaf1c2
Traceback (most recent call last):
  File "/home/username/.local/share/src/gnome-gamma-tool/gnome-gamma-tool.py", line 350, in <module>
    main()
  File "/home/username/.local/share/src/gnome-gamma-tool/gnome-gamma-tool.py", line 315, in main
    profile_data = mgr.clone_profile_data(base_profile)
  File "/home/username/.local/share/src/gnome-gamma-tool/gnome-gamma-tool.py", line 239, in clone_profile_data
    return profile.load_icc(0)
gi.repository.GLib.GError: cd_icc_error: failed to load file: Error opening file /home/username/.local/share/icc/gnome-gamma-tool-5cf2d86e-60d7-4dc3-8b00-42493ccaf1c2: No such file or directory (0)

Applied profiles do not change gamma

Tried for both of my displays. Profile does get applied as I can tell by checking in Gnome settings but it does not change gamma at all.

I guess it's due to Nvidia drivers not allowing gamma change on Wayland - but I do not know for sure as I have only read that information online. If so, it should be mentioned in the readme.

Regards =)

Thanks.

Just wanted to say I've been having this ongoing issue for months relating to brightness control. I use xrandr to change the brightness on Xorg so by itself that works fine. However with night light on gnome it doesn't work every time the temperature changes the brightness shoots back up and scorches my eye balls. I used to use a script with gnome and redshift but the issue with that was it randomly turned off when any application wanted to mess with my gamma. Also also there was no smooth transition with the temp and it didn't change when the sun set I just set keybinds to change the command to also change temp after the sun set. It was this whoooole big mess. But your script solved that completely it even solved another issue of remembering my settings past reboot!!! My eyes and my sleep schedule thank you. If you want my keybind script that I use on gnome for changing the brightness with your script I'd be happy to send it over.

After updates on Ubuntu 22.04.2 doesn't work

After updates on Ubuntu 22.04.2 doesn't work with wayland. If I use X11 session, script changes gamma, but doesn't work with wayland. I have hybrid intel + nvidia graphisc. Everything worked before updates

Tool worked three times only

Hello there,

I am attempting to use this software on Manjaro Linux. I have been simply only attempting to change gamma with the following:

./gnome-gamma-tool.py -g 0.8

I tried a few different variations of gamma, to see which I liked, it worked about 3 times. Each time I said 'N' to saving my settings. But now the program has no effect on screen brightness at all. I even rebooted my computer.

I tried changing contrast, which oddly, still works. But it ignores the gamma value each time.

Intel GPU on Wayland. Gnome version 45.4.

Saturation

Is it possible to adjust display saturation level?

Feature Request: Change Red/Blue/Green

I have a weird problem on a secondhand laptop running Fedora Silverblue: GNOME is very blue.

I run the same OS on my other device and it's fine, so it's probably a fault with the monitor or a kernel/driver issue. Regardless of the cause, I was wondering if it might be possible to add the feature of changing the RBG values on the GNOME colour profile?

Reducing the gamma with this script has helped a bit, so I thank you for that :) Having this additional feature would help me shift it back to a more normal colour balance.

Failing with "The profile was not added in time"

Hi, great project! I can't seem to get it to work on my system. Here is the output:

$ ./gnome-gamma-tool.py -g 0.8 
Current profile is /home/matthew/.local/share/icc/edid-f17676179651299583cd4294bff1d6e2.icc
Traceback (most recent call last):
  File "/home/matthew/Compile/gnome-gamma-tool/./gnome-gamma-tool.py", line 350, in <module>
    main()
  File "/home/matthew/Compile/gnome-gamma-tool/./gnome-gamma-tool.py", line 333, in main
    new_profile = mgr.new_profile_with_name(profile_data, OUR_PREFIX + unique_id)
  File "/home/matthew/Compile/gnome-gamma-tool/./gnome-gamma-tool.py", line 248, in new_profile_with_name
    new_profile = self.cd.import_profile_sync(Gio.File.new_for_path(tmp_path))
gi.repository.GLib.GError: cd_client_error: The profile was not added in time (0)

GNOME Version: 42.5
OS: Ubuntu 22.04 (technically Pop!_OS, but using GNOME shell)
Laptop: Zephyrus G14 GA402RJ

Any idea if there's a simple problem this could be?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.