Skip to content
Snippets Groups Projects
Unverified Commit db07658a authored by Martijn Braam's avatar Martijn Braam
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
/.idea
*.glade~
\ No newline at end of file
LICENSE 0 → 100644
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = path.join(prefix, 'share')
destdir = environ.get('DESTDIR', '')
if not destdir:
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database')
call(['update-desktop-database', '-q', path.join(datadir, 'applications')])
print('Compiling GSettings schemas...')
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])
install_data('org.postmarketos.Tweaks.desktop',
install_dir: join_paths(get_option('datadir'), 'applications'),
)
install_data(['org.postmarketos.Tweaks.appdata.xml'],
install_dir : get_option('datadir') / 'metainfo')
install_data('org.postmarketos.Tweaks.svg',
install_dir: join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps')
)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2021 Martijn Braam -->
<component type="desktop-application">
<id>org.postmarketos.Tweaks</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>postmarketOS Tweaks</name>
<summary>Mobile settings tweak application</summary>
<description>
<p>
A Gnome-Tweaks like application for modifying phone settings
</p>
</description>
<launchable type="desktop-id">org.postmarketos.Tweaks.desktop</launchable>
<provides>
<binary>pmos-tweaks</binary>
</provides>
<screenshots>
<screenshot type="default">
<image>http://brixitcdn.net/metainfo/numberstation.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://sr.ht/~martijnbraam/numberstation</url>
<url type="bugtracker">https://todo.sr.ht/~martijnbraam/numberstation</url>
<content_rating type="oars-1.1"/>
<releases>
<release version="0.1.0" date="2021-03-23">
<description>
<p>
First release
</p>
</description>
</release>
</releases>
</component>
[Desktop Entry]
Name=Tweaks
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=pmos-tweaks %u
GenericName=Tweaks
Icon=org.postmarketos.Tweaks
Categories=GTK;GNOME;Utility
X-DBUS-ServiceName=org.postmarketos.Tweaks
This diff is collapsed.
project('pmos-tweaks',
version: '0.1.0',
meson_version: '>= 0.50.0',
default_options: ['warning_level=2'])
dependency('libhandy-1', version: '>=1.0.0')
subdir('data')
subdir('pmos_tweaks')
meson.add_install_script('build-aux/meson/postinstall.py')
import argparse
import os
import gi
from pmos_tweaks.window import TweaksWindow
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gio
gi.require_version('Handy', '1')
from gi.repository import Handy
class TweaksApplication(Gtk.Application):
def __init__(self, application_id, flags, args):
Gtk.Application.__init__(self, application_id=application_id, flags=flags)
self.connect("activate", self.new_window)
self.args = args
def new_window(self, *args):
TweaksWindow(self, self.args)
def main(version):
Handy.init()
parser = argparse.ArgumentParser(description="postmarketOS Tweaks tool")
parser.add_argument('config', help='TOTP url to register', default='/etc/pmos-tweaks/tweaks.conf')
args = parser.parse_args()
app = TweaksApplication("org.postmarketos.Tweaks", Gio.ApplicationFlags.FLAGS_NONE, args=args)
app.run()
if __name__ == '__main__':
main('')
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'pmos_tweaks')
gnome = import('gnome')
python = import('python')
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').path())
conf.set('VERSION', meson.project_version())
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)
configure_file(
input: 'pmos-tweaks.in',
output: 'pmos-tweaks',
configuration: conf,
install: true,
install_dir: get_option('bindir')
)
sources = [
'__init__.py',
'__main__.py',
'window.py',
'settingstree.py',
]
install_data(sources, install_dir: moduledir)
#!@PYTHON@
import os
import sys
import signal
import gettext
VERSION = '@VERSION@'
pkgdatadir = '@pkgdatadir@'
localedir = '@localedir@'
sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
if __name__ == '__main__':
import gi
from gi.repository import Gio
from pmos_tweaks import __main__
sys.exit(__main__.main(VERSION))
import os
import glob
from collections import OrderedDict
import configparser
import yaml
from gi.repository import Gio
class Setting:
def __init__(self, definition):
self.name = definition['name']
self.weight = 50
if 'weight' in definition:
self.weight = definition['weight']
self.type = definition['type']
self.backend = definition['backend'] if 'backend' in definition else 'gsettings'
self.help = definition['help'] if 'help' in definition else None
self.definition = definition
self.callback = None
self.widget = None
self.map = definition['map'] if 'map' in definition else None
if self.backend == 'gsettings':
key = self.definition['key']
part = key.split('.')
self.base_key = '.'.join(part[0:-1])
self.key = part[-1]
self._settings = Gio.Settings.new(self.base_key)
self._settings.connect(f'changed::{self.key}', self._callback)
self.gtype = definition['gtype'] if 'gtype' in definition else definition['type']
elif self.backend == 'gtk3settings':
self.key = definition['key']
self.file = os.path.join(os.getenv('XDG_CONFIG_HOME', '~/.config'), 'gtk-3.0/settings.ini')
self.file = os.path.expanduser(self.file)
self.default = definition['default'] if 'default' in definition else None
def connect(self, callback):
self.callback = callback
def _callback(self, *args):
if self.callback is not None:
self.callback(self, self.get_value())
def get_value(self):
if self.backend == 'gsettings':
if self.gtype == 'boolean':
value = self._settings.get_boolean(self.key)
elif self.gtype == 'string':
print(self.key)
value = self._settings.get_string(self.key)
elif self.gtype == 'number':
value = self._settings.get_int(self.key)
elif self.backend == 'gtk3settings':
if os.path.isfile(self.file):
ini = configparser.SafeConfigParser()
ini.read(self.file)
value = ini.get('Settings', self.key)
else:
value = self.default
if self.map:
for key in self.map:
if self.map[key] == value:
value = key
return value
def set_value(self, value):
if self.map:
value = self.map[value]
if self.backend == 'gsettings':
if self.gtype == 'boolean':
self._settings.set_boolean(self.key, value)
elif self.gtype == 'string':
self._settings.set_string(self.key, value)
elif self.gtype == 'number':
self._settings.set_int(self.key, value)
elif self.backend == 'gtk3settings':
ini = configparser.SafeConfigParser()
if os.path.isfile(self.file):
ini.read(self.file)
ini.set('Settings', self.key, value)
with open(self.file, 'w') as handle:
ini.write(handle)
def __getitem__(self, item):
return getattr(self, item)
class SettingsTree:
def __init__(self):
self.settings = OrderedDict()
def _sort_weight(self, unsorted):
test = sorted(unsorted.items(), key=lambda t: t[1]['weight'])
return OrderedDict({k: v for k, v in test})
def load_dir(self, path):
for file in glob.glob(os.path.join(path, '*.yml')):
with open(file) as handle:
raw = handle.read()
data = yaml.load(raw, Loader=yaml.SafeLoader)
for page in data:
if page['name'] not in self.settings:
weight = 50
if 'weight' in page:
weight = page['weight']
self.settings[page['name']] = {
'name': page['name'],
'weight': weight,
'sections': OrderedDict()
}
for section in page['sections']:
weight = 50
if 'weight' in section:
weight = section['weight']
if section['name'] not in self.settings[page['name']]['sections']:
self.settings[page['name']]['sections'][section['name']] = {
'name': section['name'],
'weight': weight,
'settings': OrderedDict()
}
for setting in section['settings']:
if setting['name'] not in self.settings[page['name']]['sections'][section['name']]['settings']:
self.settings[page['name']]['sections'][section['name']]['settings'][
setting['name']] = Setting(setting)
self.settings = self._sort_weight(self.settings)
for page in self.settings:
self.settings[page]['sections'] = self._sort_weight(self.settings[page]['sections'])
for section in self.settings[page]['sections']:
self.settings[page]['sections'][section]['settings'] = self._sort_weight(
self.settings[page]['sections'][section]['settings'])
import gi
from pmos_tweaks.settingstree import SettingsTree
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GLib, GObject, Gio, Gdk, GLib
gi.require_version('Handy', '1')
from gi.repository import Handy
class TweaksWindow:
def __init__(self, application, args):
self.application = application
self.args = args
Handy.init()
self.window = None
self.headerbar = None
self.leaflet = None
self.sidebar = None
self.content = None
self.listbox = None
self.stack = None
self.back = None
self.create_window()
self.settings = SettingsTree()
self.settings.load_dir('../settings')
self.create_pages()
self.window.show_all()
Gtk.main()
def create_window(self):
self.window = Handy.Window()
self.window.set_title('postmarketOS Tweaks')
self.window.connect('destroy', self.on_main_window_destroy)
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.window.add(box)
self.headerbar = Handy.HeaderBar()
self.headerbar.set_title("postmarketOS Tweaks")
self.headerbar.set_show_close_button(True)
self.back = Gtk.Button.new_from_icon_name("go-previous-symbolic", 1)
self.back.connect("clicked", self.on_back_clicked)
self.back.set_visible(False)
self.back.set_no_show_all(True)
self.headerbar.pack_start(self.back)
self.leaflet = Handy.Leaflet()
self.leaflet.set_transition_type(Handy.LeafletTransitionType.SLIDE)
self.leaflet.connect("notify::folded", self.on_leaflet_change)
self.leaflet.connect("notify::visible-child", self.on_leaflet_change)
self.sidebar = Gtk.Box()
self.sidebar.set_size_request(200, 0)
self.content = Gtk.Box()
self.content.props.hexpand = True
self.leaflet.add(self.sidebar)
self.leaflet.child_set(self.sidebar, name="sidebar")
self.leaflet.add(self.content)
self.leaflet.child_set(self.content, name="content")
self.leaflet.set_visible_child_name("sidebar")
sw = Gtk.ScrolledWindow()
sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
self.sidebar.pack_start(sw, True, True, 0)
self.listbox = Gtk.ListBox()
self.listbox.connect('row-selected', self.on_select_page)
sw.add(self.listbox)
self.stack = Gtk.Stack()
self.content.pack_start(self.stack, True, True, 0)
box.pack_start(self.headerbar, False, True, 0)
box.pack_start(self.leaflet, True, True, 0)
def create_pages(self):
# Generate the items in the sidebar
for page in self.settings.settings:
label = Gtk.Label(label=page, xalign=0.0)
label.set_margin_top(7)
label.set_margin_bottom(7)
label.set_margin_left(10)
label.set_margin_right(10)
label.set_name('row')
row = Gtk.ListBoxRow()
row.add(label)
row.name = page
row.title = page
self.listbox.add(row)
for page in self.settings.settings:
box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.set_margin_top(12)
box.set_margin_bottom(12)
box.set_margin_left(12)
box.set_margin_right(12)
sw = Gtk.ScrolledWindow()
sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
sw.add(box)
self.stack.add_named(sw, page)
for section in self.settings.settings[page]['sections']:
label = Gtk.Label(label=section, xalign=0.0)
label.get_style_context().add_class('heading')
label.set_margin_bottom(4)
box.pack_start(label, False, True, 0)
frame = Gtk.Frame()
frame.get_style_context().add_class('view')
frame.set_margin_bottom(12)
box.pack_start(frame, False, True, 0)
fbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
frame.add(fbox)
for name in self.settings.settings[page]['sections'][section]['settings']:
setting = self.settings.settings[page]['sections'][section]['settings'][name]
sbox = Gtk.Box()
sbox.set_margin_top(8)
sbox.set_margin_bottom(8)
sbox.set_margin_left(8)
sbox.set_margin_right(8)
lbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
sbox.pack_start(lbox, True, True, 0)
fbox.pack_start(sbox, False, True, 0)
wbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
sbox.pack_end(wbox, False, False, 0)
label = Gtk.Label(label=name, xalign=0.0)
lbox.pack_start(label, False, True, 0)
if setting.help:
hlabel = Gtk.Label(label=setting.help, xalign=0.0)
hlabel.get_style_context().add_class('dim-label')
hlabel.set_line_wrap(True)
lbox.pack_start(hlabel, False, True, 0)
if setting.type == 'boolean':
widget = Gtk.Switch()
widget.set_active(setting.get_value())
# Make sure I leak some memory
setting.widget = widget
widget.setting = setting
widget.connect('notify::active', self.on_widget_changed)
setting.connect(self.on_setting_change)
wbox.pack_start(widget, False, False, 0)
elif setting.type == 'choice':
widget = Gtk.ComboBoxText()
setting.widget = widget
widget.setting = setting
widget.set_entry_text_column(0)
val = setting.get_value()
i = 0
for key in setting.map:
widget.append_text(key)
if key == val:
widget.set_active(i)
i += 1
widget.connect('changed', self.on_widget_changed)
setting.connect(self.on_setting_change)
wbox.pack_start(widget, False, False, 0)
widget = self.listbox.get_row_at_index(0)
self.listbox.select_row(widget)
def on_setting_change(self, setting, value):
if setting.type == 'boolean':
setting.widget.set_active(value)
elif setting.type == 'choice':
i = 0
for key in setting.map:
setting.widget.append_text(key)
if key == value:
setting.widget.set_active(i)
i += 1
def on_widget_changed(self, widget, *args):
setting = widget.setting
if setting.type == 'boolean':
setting.set_value(widget.get_active())
elif setting.type == 'choice':
setting.set_value(widget.get_active_text())
def on_select_page(self, widget, row):
if row:
self.stack.set_visible_child_name(row.name)
self.headerbar.set_subtitle(row.title)
self.leaflet.set_visible_child_name('content')
def on_main_window_destroy(self, widget):
Gtk.main_quit()
def on_back_clicked(self, widget, *args):
self.leaflet.set_visible_child_name('sidebar')
def on_leaflet_change(self, *args):
folded = self.leaflet.get_folded()
content = self.leaflet.get_visible_child_name() == "content"
self.back.set_visible(folded and content)
- name: Appearance
weight: 30
sections:
- name: GTK
weight: 0
settings:
- name: Prefer dark
type: boolean
help: Prefer the dark version of the theme if available
backend: gtk3settings
key: gtk-application-prefer-dark-theme
default: "0"
map:
true: "1"
false: "0"
\ No newline at end of file
- name: Phosh
weight: 10
sections:
- name: Clock
weight: 10
settings:
- name: Weekday
type: boolean
backend: gsettings
key: org.gnome.desktop.interface.clock-show-weekday
- name: Date
type: boolean
backend: gsettings
key: org.gnome.desktop.interface.clock-show-date
- name: Seconds
type: boolean
backend: gsettings
key: org.gnome.desktop.interface.clock-show-seconds
- name: Performance
weight: 20
settings:
- name: Animations
help: Disable GTK3 animations to speed up applications
type: boolean
backend: gsettings
key: org.gnome.desktop.interface.enable-animations
\ No newline at end of file
- name: Power
weight: 20
sections:
- name: Automatic suspend
weight: 0
settings:
- name: On battery power
type: boolean
backend: gsettings
gtype: string
key: org.gnome.settings-daemon.plugins.power.sleep-inactive-battery-type
map:
true: suspend
false: nothing
- name: Battery time
type: choice
gtype: number
backend: gsettings
key: org.gnome.settings-daemon.plugins.power.sleep-inactive-battery-timeout
map:
1 Minute: 60
2 Minutes: 120
5 Minutes: 300
10 Minutes: 600
20 Minutes: 1200
1 Hour: 3600
- name: On AC power
type: boolean
backend: gsettings
gtype: string
key: org.gnome.settings-daemon.plugins.power.sleep-inactive-ac-type
map:
true: suspend
false: nothing
- name: AC time
type: choice
gtype: number
backend: gsettings
key: org.gnome.settings-daemon.plugins.power.sleep-inactive-ac-timeout
map:
1 Minute: 60
2 Minutes: 120
5 Minutes: 300
10 Minutes: 600
20 Minutes: 1200
1 Hour: 3600
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment