-
Notifications
You must be signed in to change notification settings - Fork 861
Expand file tree
/
Copy pathcs_general.py
More file actions
executable file
·51 lines (35 loc) · 2.35 KB
/
cs_general.py
File metadata and controls
executable file
·51 lines (35 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/python3
from bin.SettingsWidgets import SidePage
from bin import util
from xapp.GSettingsWidgets import *
class Module:
name = "general"
comment = _("Miscellaneous Cinnamon preferences")
category = "prefs"
def __init__(self, content_box):
keywords = _("logging, click")
sidePage = SidePage(_("General"), "cs-general", keywords, content_box, module=self)
self.sidePage = sidePage
def on_module_selected(self):
if not self.loaded:
print("Loading General module")
page = SettingsPage()
self.sidePage.add_widget(page)
settings = page.add_section(_("Compositor Options"))
size_group = Gtk.SizeGroup.new(Gtk.SizeGroupMode.HORIZONTAL)
switch = GSettingsSwitch(_("Disable compositing for full-screen windows"), "org.cinnamon.muffin", "unredirect-fullscreen-windows")
switch.set_tooltip_text(_("Select this option to let full-screen applications skip the compositing manager and run at maximum speed. Unselect it if you're experiencing screen-tearing in full screen mode."))
settings.add_row(switch)
settings = page.add_section(_("Miscellaneous Options"))
switch = GSettingsSwitch(_("Enable timer when logging out or shutting down"), "org.cinnamon.SessionManager", "quit-delay-toggle")
settings.add_row(switch)
spin = GSettingsSpinButton(_("Timer delay"), "org.cinnamon.SessionManager", "quit-time-delay", _("seconds"), 0, 36000, 1, 60)
settings.add_reveal_row(spin, "org.cinnamon.SessionManager", "quit-delay-toggle")
if util.get_session_type() != "wayland":
settings = page.add_section(_("Memory limit"))
switch = GSettingsSwitch(_("Restart Cinnamon when it uses too much memory"), "org.cinnamon.launcher", "memory-limit-enabled")
settings.add_row(switch)
spin = GSettingsSpinButton(_("Memory limit"), "org.cinnamon.launcher", "memory-limit", _("MB"), 256, 36000, 1, 100)
settings.add_reveal_row(spin, "org.cinnamon.launcher", "memory-limit-enabled")
spin = GSettingsSpinButton(_("Check frequency"), "org.cinnamon.launcher", "check-frequency", _("seconds"), 1, 86400, 1, 60)
settings.add_reveal_row(spin, "org.cinnamon.launcher", "memory-limit-enabled")