mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-30 06:29:29 +02:00
dimmer: remove previous tentative to detect i3lock
This commit is contained in:
parent
ad1fa52a73
commit
b05514177f
1 changed files with 1 additions and 9 deletions
10
bin/dimmer
10
bin/dimmer
|
@ -8,17 +8,11 @@
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
gi.require_version("Wnck", "3.0")
|
from gi.repository import Gtk, Gdk, GLib
|
||||||
from gi.repository import Gtk, Gdk, GLib, Wnck
|
|
||||||
import cairo
|
import cairo
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def on_window_opened(screen, window, options):
|
|
||||||
if window.get_class_group_name() == options.quit_when:
|
|
||||||
Gtk.main_quit()
|
|
||||||
|
|
||||||
|
|
||||||
def on_realize(widget):
|
def on_realize(widget):
|
||||||
window = widget.get_window()
|
window = widget.get_window()
|
||||||
window.set_override_redirect(True)
|
window.set_override_redirect(True)
|
||||||
|
@ -75,7 +69,6 @@ if __name__ == "__main__":
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
display = Gdk.Display.get_default()
|
display = Gdk.Display.get_default()
|
||||||
screen = Wnck.Screen.get_default();
|
|
||||||
for i in range(display.get_n_monitors()):
|
for i in range(display.get_n_monitors()):
|
||||||
geom = display.get_monitor(i).get_geometry()
|
geom = display.get_monitor(i).get_geometry()
|
||||||
once = []
|
once = []
|
||||||
|
@ -92,7 +85,6 @@ if __name__ == "__main__":
|
||||||
window.connect("draw", on_draw, options, [])
|
window.connect("draw", on_draw, options, [])
|
||||||
window.connect("delete-event", Gtk.main_quit)
|
window.connect("delete-event", Gtk.main_quit)
|
||||||
window.connect("realize", on_realize)
|
window.connect("realize", on_realize)
|
||||||
screen.connect("window-opened", on_window_opened, options)
|
|
||||||
|
|
||||||
window.show_all()
|
window.show_all()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue