Yopu can choose your own icon, or save the icon below as set_brightness.png: In the Icon= line, set the path to the icon. desktop file in ~/.local/share/applications To make a nice set, you could make the slider available in Dash, the Launcher or any other application menu, by adding a. Click the "+" and add the command: brightness_set Make it executableĪdd it to a shortcut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Paste the script into an empty file, save it as brightness_set in ~/bin (you probably have to create the directory). # if everything ok, invoke UI and start Gtk thread loop NewBrightness = float(_value())/100Ĭmd = "xrandr -output %s -brightness %.2f" % (self.monitor, newBrightness)ĬmdStatus = subprocess.check_output(cmd, shell=True) Monitor = subprocess.check_output("xrandr -q | grep ' connected' | cut -d ' ' -f1", shell=True)ĬurrB = subprocess.check_output("xrandr -verbose | grep -i brightness | cut -f2 -d ' '", shell=True) If(self.monitor = "" or self.currB = ""): "Unable to detect active monitor, run 'xrandr -verbose' on command-line for more info") Key, modifier = Gtk.accelerator_parse('Escape')Īnnect(key, modifier,, Gtk.main_quit) nnect("destroy", lambda w: Gtk.main_quit()) Self.adjustment = Gtk.Adjustment(self.currB, 0, 100, 1, 10, 0) # get active monitor and current brightness I am using it ever since on my netbook, running Xubuntu and it seems to run on anything.įor reasons of not posting a link-only answer, here it is: #!/usr/bin/env python On this site, a while ago I found an nice script from someone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |