Refactor preferences
@@ -6,7 +6,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
# Night Theme Switcher <!-- omit in toc -->
|
||||
|
||||

|
||||
<!-- Background picture by Adrien Converse from https://unsplash.com/photos/kCrrUx7US04 -->
|
||||
|
||||
Automatically toggle your light and dark GTK, GNOME Shell, icon and cursor themes variants, switch backgrounds and run custom commands at sunset and sunrise.
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,3 @@
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,3 @@
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 154 KiB |
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m3.7578 2.0293a1 1 0 0 0-0.61523 0.45703l-3 5a1.0001 1.0001 0 0 0 0 1.0273l3 5a1 1 0 0 0 1.3711 0.34375 1 1 0 0 0 0.34375-1.3711l-2.6914-4.4863 2.6914-4.4863a1 1 0 0 0-0.34375-1.3711 1 1 0 0 0-0.75586-0.11328z"/>
|
||||
<path d="m12.242 2.0293a1 1 0 0 0-0.75586 0.11328 1 1 0 0 0-0.34375 1.3711l2.6914 4.4863-2.6914 4.4863a1 1 0 0 0 0.34375 1.3711 1 1 0 0 0 1.3711-0.34375l3-5a1.0001 1.0001 0 0 0 0-1.0273l-3-5a1 1 0 0 0-0.61523-0.45703z"/>
|
||||
<path d="m9.1953 2.0195a1 1 0 0 0-1.1758 0.78516l-2 10a1 1 0 0 0 0.78516 1.1758 1 1 0 0 0 1.1758-0.78516l2-10a1 1 0 0 0-0.78516-1.1758z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 848 B |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m4.5 1c-2.4853 0-4.5 2.0147-4.5 4.5 0.0032498 1.2489 0.75291 2.3099 1.4414 3.2891 1.7318 2.463 6.5586 6.2109 6.5586 6.2109s4.8267-3.7479 6.5586-6.2109c0.68851-0.97919 1.4382-2.0402 1.4414-3.2891 0-2.4853-2.0147-4.5-4.5-4.5-2.5 0-3.101 2.001-3.5 2s-1-2-3.5-2z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 535 B |
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m3 11c0 1.6509 1.3491 3 3 3v-1c-1.1105 0-2-0.88951-2-2h-1z"/>
|
||||
<path d="m10 2v1c1.1105 0 2 0.88951 2 2h1c0-1.6509-1.3491-3-3-3z"/>
|
||||
<path d="m2 0c-1.108 0-2 0.892-2 2v6c0 1.108 0.892 2 2 2h4v-2l-0.33398-1h-2.332l-0.33398 1h-1l2-6h1l1.4668 4.4023c0.53433-0.84006 1.4736-1.4023 2.5332-1.4023v-3c0-1.108-0.892-2-2-2h-5zm2.5 3.5-0.83398 2.5h1.668l-0.83398-2.5z"/>
|
||||
<path d="m9 6c-1.108 0-2 0.892-2 2v6c0 1.108 0.892 2 2 2h5c1.108 0 2-0.892 2-2v-6c0-1.108-0.892-2-2-2zm2 2h1v1h2v1h-0.53906c-0.15383 0.98264-0.74444 1.7805-1.3945 2.3926 0.79475 0.45608 1.5312 0.61719 1.5312 0.61719a0.5 0.5 0 0 1 0.39258 0.58789 0.5 0.5 0 0 1-0.58789 0.39258s-1.0838-0.19928-2.168-0.91797c-0.81221 0.5775-1.5371 0.88672-1.5371 0.88672a0.5 0.5 0 0 1-0.65625-0.26172 0.5 0.5 0 0 1 0.26172-0.65625s0.50729-0.21982 1.1211-0.625c-0.33276-0.3295-0.63597-0.72311-0.87109-1.1934a0.5 0.5 0 0 1 0.22461-0.66992 0.5 0.5 0 0 1 0.38086-0.02734 0.5 0.5 0 0 1 0.28906 0.25195c0.20204 0.40409 0.48152 0.74022 0.79102 1.0195 0.55892-0.49663 1.0381-1.1094 1.2012-1.7969h-3.4395v-1h2z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -4,5 +4,5 @@ SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m2 0c-1.108 0-2 0.892-2 2v14h16v-14c0-1.108-0.892-2-2-2zm9.9512 2c0.01628-1.987e-4 0.03255-1.987e-4 0.04883 0 1.1046 0 2 0.89543 2 2s-0.89543 2-2 2c-1.1046 0-2-0.89543-2-2-3.236e-4 -1.0858 0.86572-1.9735 1.9512-2zm-9.9512 6h12v6h-12z"/>
|
||||
<path d="m2 0c-1.108 0-2 0.892-2 2v14h16v-14c0-1.108-0.892-2-2-2h-12zm9 2h1l0.5 0.5 0.5-0.5h1v1l-0.5 0.5 0.5 0.5v1h-1l-0.5-0.5-0.5 0.5h-1v-1l0.5-0.5-0.5-0.5v-1zm-9 5h12v7h-12v-7z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 446 B |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m2 0.99841c-1.108 0-2 0.892-2 2v10.001c0 1.108 0.892 2 2 2h12c1.108 0 2-0.892 2-2v-10.001c0-1.108-0.892-2-2-2zm1 2h10c0.554 0 1 0.446 1 1v8.0008c0 0.554-0.446 1-1 1h-10c-0.554 0-1-0.446-1-1v-8.0008c0-0.554 0.446-1 1-1z"/>
|
||||
<path d="m3 10v2h10v-4l-3-3-3 4-2-2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 536 B |
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m5 1c-0.554 0-1 0.446-1 1v8h-1c0-0.554-0.446-1-1-1s-1 0.446-1 1v1 2c0 1.108 0.892 2 2 2h10.002c1.108 0 2.0006-0.892 2-2l-0.001953-5c0-0.554-0.446-1-1-1s-1 0.446-1 1h-1v-1c0-0.554-0.446-1-1-1s-1 0.446-1 1h-1v-1c0-0.554-0.446-1-1-1s-1 0.446-1 1v1h-1v-5c0-0.554-0.446-1-1-1z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 548 B |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m2 0v16h12v-12l-4-4zm2 2h5v3h3v9h-8z"/>
|
||||
<path d="m5 13h6v-5c-4-1-2 3-6 2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 351 B |
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: CC-BY-SA-4.0
|
||||
-->
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m8 3-2 3h-2.9987c-1.108 0-2 0.892-2 2v4.9998c0 1.108 0.892 2 2 2h10.002c1.108 0 2-0.892 2-2v-4.9998c0-1.108-0.892-2-2-2h-3.003zm0 3 1.334 2h2.669c0.554 0 1 0.446 1 1v2.9998c0 0.554-0.446 1-1 1h-8.0017c-0.554 0-1-0.446-1-1v-2.9998c0-0.554 0.446-1 1-1h2.6647z"/>
|
||||
<rect y="1" width="16" height="2"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 571 B |
@@ -1,30 +1,30 @@
|
||||
# Night Theme Switcher
|
||||
# Copyright (C) 2019, 2020 Romain Vigier
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the Night Theme Switcher package.
|
||||
# Romain Vigier <>, 2019, 2020.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Night Theme Switcher 43\n"
|
||||
"Project-Id-Version: Night Theme Switcher\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-12-13 09:50+0100\n"
|
||||
"POT-Creation-Date: 2021-08-19 14:00+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/modules/GtkThemer.js:177
|
||||
#: src/modules/GtkThemer.js:162
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Unable to automatically detect the day and night variants for the \"%s\" GTK "
|
||||
"theme. Please manually choose them in the extension's preferences."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/ShellThemer.js:183
|
||||
#: src/modules/ShellThemer.js:168
|
||||
#, javascript-format
|
||||
msgid ""
|
||||
"Unable to automatically detect the day and night variants for the \"%s\" "
|
||||
@@ -32,521 +32,503 @@ msgid ""
|
||||
"preferences."
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/TimerOndemand.js:216
|
||||
#: src/modules/TimerOndemand.js:237
|
||||
msgid "Switch to night theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/modules/TimerOndemand.js:216
|
||||
#: src/modules/TimerOndemand.js:237
|
||||
msgid "Switch to day theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Backgrounds.js:35 src/preferences/ui/backgrounds.ui:146
|
||||
#: src/preferences/ui/headerbar.ui:338
|
||||
msgid "Backgrounds"
|
||||
#: src/preferences/Schedule.js:57 src/preferences/ui/Schedule.ui:62
|
||||
msgid "Night Light"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Commands.js:35 src/preferences/ui/commands.ui:132
|
||||
#: src/preferences/ui/headerbar.ui:391
|
||||
msgid "Commands"
|
||||
#: src/preferences/Schedule.js:67
|
||||
msgid "Location Services"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/CursorTheme.js:37 src/preferences/ui/headerbar.ui:285
|
||||
msgid "Cursor theme"
|
||||
#: src/preferences/Schedule.js:80
|
||||
msgid "Manual schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/GtkTheme.js:37 src/preferences/ui/headerbar.ui:126
|
||||
msgid "GTK theme"
|
||||
#: src/preferences/Schedule.js:81 src/preferences/ui/Schedule.ui:135
|
||||
msgid "On-demand"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/IconTheme.js:37 src/preferences/ui/headerbar.ui:232
|
||||
msgid "Icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Schedule.js:37 src/preferences/ui/headerbar.ui:73
|
||||
msgid "Schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/Schedule.js:216 src/preferences/ui/schedule.ui:842
|
||||
msgid "Choose"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ShellTheme.js:37 src/preferences/ui/headerbar.ui:179
|
||||
msgid "Shell theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ShellTheme.js:79
|
||||
#: src/preferences/ShellPreferences.js:55
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:6
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:10
|
||||
msgid "Settings version"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:7
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:11
|
||||
msgid "The current extension settings version"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:13
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:6
|
||||
#: src/preferences/ui/gtk_theme.ui:76
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:17
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:10
|
||||
msgid "Switch GTK variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:14
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:7
|
||||
msgid "Enable GTK variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:18
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:11
|
||||
msgid "Day GTK theme"
|
||||
msgid "Enable GTK variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:19
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:12
|
||||
msgid "The GTK theme to use during daytime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:22
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:15
|
||||
msgid "Day GTK theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:23
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:16
|
||||
msgid "Night GTK theme"
|
||||
msgid "The GTK theme to use during daytime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:24
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:17
|
||||
msgid "The GTK theme to use during nighttime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:27
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:20
|
||||
msgid "Night GTK theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:28
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:21
|
||||
msgid "The GTK theme to use during nighttime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:32
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:25
|
||||
msgid "Use manual GTK variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:29
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:22
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:33
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:26
|
||||
msgid "Disable automatic GTK theme variants detection"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:35
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:26
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:39
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:30
|
||||
msgid "Switch shell variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:36
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:27
|
||||
msgid "Enable shell variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:40
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:31
|
||||
msgid "Day shell theme"
|
||||
msgid "Enable shell variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:41
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:32
|
||||
msgid "The shell theme to use during daytime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:44
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:35
|
||||
msgid "Day shell theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:45
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:36
|
||||
msgid "Night shell theme"
|
||||
msgid "The shell theme to use during daytime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:46
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:37
|
||||
msgid "The shell theme to use during nighttime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:49
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:40
|
||||
msgid "Night shell theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:50
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:41
|
||||
msgid "The shell theme to use during nighttime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:54
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:45
|
||||
msgid "Use manual shell variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:51
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:42
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:55
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:46
|
||||
msgid "Disable automatic shell theme variants detection"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:57
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:46
|
||||
#: src/preferences/ui/icon_theme.ui:76
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:61
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:50
|
||||
msgid "Switch icon variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:58
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:47
|
||||
msgid "Enable icon variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:62
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:51
|
||||
msgid "Day icon theme"
|
||||
msgid "Enable icon variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:63
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:52
|
||||
msgid "The icon theme to use during daytime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:66
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:55
|
||||
msgid "Day icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:67
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:56
|
||||
msgid "The icon theme to use during daytime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:71
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:60
|
||||
msgid "Night icon theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:68
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:57
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:72
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:61
|
||||
msgid "The icon theme to use during nighttime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:74
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:61
|
||||
#: src/preferences/ui/cursor_theme.ui:76
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:78
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:65
|
||||
msgid "Switch cursor variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:75
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:62
|
||||
msgid "Enable cursor variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:79
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:66
|
||||
msgid "Day cursor theme"
|
||||
msgid "Enable cursor variants switching"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:80
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:67
|
||||
msgid "The cursor theme to use during daytime"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:83
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:70
|
||||
msgid "Day cursor theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:84
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:71
|
||||
msgid "The cursor theme to use during daytime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:88
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:75
|
||||
msgid "Night cursor theme"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:85
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:72
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:89
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:76
|
||||
msgid "The cursor theme to use during nighttime"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:91
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:126
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:95
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:130
|
||||
msgid "Enable commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:92
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:127
|
||||
msgid "Commands will be spawned on time change"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:96
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:131
|
||||
#: src/preferences/ui/commands.ui:174
|
||||
msgid "Sunrise command"
|
||||
msgid "Commands will be spawned on time change"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:97
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:132
|
||||
msgid "The command to spawn at sunrise"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:100
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:135
|
||||
msgid "Sunrise command"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:101
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:136
|
||||
#: src/preferences/ui/commands.ui:268
|
||||
msgid "The command to spawn at sunrise"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:105
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:140
|
||||
msgid "Sunset command"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:102
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:137
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:106
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:141
|
||||
msgid "The command to spawn at sunset"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:108
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:141
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:112
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:145
|
||||
msgid "Enable backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:109
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:142
|
||||
msgid "Background will be changed on time change"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:113
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:146
|
||||
#: src/preferences/ui/backgrounds.ui:188
|
||||
msgid "Day background"
|
||||
msgid "Background will be changed on time change"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:114
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:147
|
||||
msgid "Path to the day background"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:117
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:150
|
||||
#: src/preferences/ui/BackgroundsPreferences.ui:39
|
||||
msgid "Day background"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:118
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:151
|
||||
#: src/preferences/ui/backgrounds.ui:280
|
||||
msgid "Path to the day background"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:122
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:155
|
||||
#: src/preferences/ui/BackgroundsPreferences.ui:47
|
||||
msgid "Night background"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:119
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:152
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:123
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:156
|
||||
msgid "Path to the night background"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:131
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:82
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:135
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:86
|
||||
#: src/preferences/ui/Schedule.ui:36
|
||||
msgid "Time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:132
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:83
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:136
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:87
|
||||
msgid "The source used to check current time"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:136
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:140
|
||||
msgid "Follow Night Light \"Disable until tomorrow\""
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:137
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:141
|
||||
msgid "Switch back to day time when Night Light is temporarily disabled"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:141
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:145
|
||||
msgid "Always enable the on-demand timer"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:142
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:146
|
||||
msgid "The on-demand timer will always be enabled alongside other timers"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:150
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:91
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:154
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:95
|
||||
msgid "On-demand time"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:151
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:92
|
||||
msgid "The current time used in on-demand mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:155
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:96
|
||||
msgid "The current time used in on-demand mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:159
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:100
|
||||
msgid "Key combination to toggle time"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:156
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:97
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:160
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:101
|
||||
msgid "The key combination that will toggle time in on-demand mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:165
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:106
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:169
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:110
|
||||
msgid "On-demand button placement"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:166
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:107
|
||||
msgid "Where the on-demand button will be placed"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:170
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:111
|
||||
msgid "Use manual time source"
|
||||
msgid "Where the on-demand button will be placed"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:171
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:112
|
||||
msgid "Disable automatic time source detection"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:174
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:115
|
||||
msgid "Use manual time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:175
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:116
|
||||
msgid "Sunrise time"
|
||||
msgid "Disable automatic time source detection"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:176
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:117
|
||||
msgid "When the day starts"
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:179
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:120
|
||||
msgid "Sunrise time"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:180
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:121
|
||||
msgid "When the day starts"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:184
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:125
|
||||
msgid "Sunset time"
|
||||
msgstr ""
|
||||
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:181
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:122
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.gschema.xml:185
|
||||
#: src/schemas/org.gnome.shell.extensions.nightthemeswitcher.v0.gschema.xml:126
|
||||
msgid "When the day ends"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/backgrounds.ui:98
|
||||
msgid "Switch backgrounds"
|
||||
#: src/preferences/ui/BackgroundButton.ui:15
|
||||
#: src/preferences/ui/ShortcutButton.ui:15
|
||||
msgid "Choose…"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/backgrounds.ui:211 src/preferences/ui/backgrounds.ui:303
|
||||
msgid "Select your background image"
|
||||
#: src/preferences/ui/BackgroundButton.ui:32
|
||||
msgid "Change background"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/backgrounds.ui:221 src/preferences/ui/backgrounds.ui:313
|
||||
#: src/preferences/ui/commands.ui:206 src/preferences/ui/commands.ui:300
|
||||
#: src/preferences/ui/schedule.ui:857
|
||||
#: src/preferences/ui/BackgroundButton.ui:44
|
||||
#: src/preferences/ui/BackgroundButton.ui:46
|
||||
#: src/preferences/ui/ClearableEntry.ui:10
|
||||
#: src/preferences/ui/ShortcutButton.ui:43
|
||||
#: src/preferences/ui/ShortcutButton.ui:45
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/commands.ui:57
|
||||
#: src/preferences/ui/BackgroundButton.ui:61
|
||||
msgid "Select your background image"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/BackgroundsPreferences.ui:15
|
||||
msgid "Switch backgrounds"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Commands.ui:31
|
||||
msgid "Run commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/commands.ui:70
|
||||
msgid ""
|
||||
"<small>You can set custom commands that will be run when the time of the day "
|
||||
"changes.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/commands.ui:195
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/commands.ui:289
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/cursor_theme.ui:125 src/preferences/ui/icon_theme.ui:125
|
||||
msgid "Variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/cursor_theme.ui:167 src/preferences/ui/gtk_theme.ui:268
|
||||
#: src/preferences/ui/icon_theme.ui:167 src/preferences/ui/shell_theme.ui:268
|
||||
msgid "Day variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/cursor_theme.ui:226 src/preferences/ui/gtk_theme.ui:327
|
||||
#: src/preferences/ui/icon_theme.ui:226 src/preferences/ui/shell_theme.ui:327
|
||||
msgid "Night variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/gtk_theme.ui:151 src/preferences/ui/gtk_theme.ui:226
|
||||
#: src/preferences/ui/shell_theme.ui:151 src/preferences/ui/shell_theme.ui:226
|
||||
msgid "Manual variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/gtk_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GTK theme. Please <a href="
|
||||
"\"https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues"
|
||||
"\">submit a request</a> to get your theme supported.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:62
|
||||
msgid "Press your keyboard shortcut..."
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:76
|
||||
#: src/preferences/ui/schedule.ui:828
|
||||
msgid "Keyboard shortcut"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/ondemand_keyboard_shortcut_dialog.ui:79
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:98
|
||||
msgid "Automatic time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:111
|
||||
msgid ""
|
||||
"<small>The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:191
|
||||
msgid "Always show on-demand controls"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:204
|
||||
msgid ""
|
||||
"<small>This allows you to override the current time when using a schedule.</"
|
||||
"small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:266
|
||||
msgid "Manual time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:286 src/preferences/ui/schedule.ui:392
|
||||
#: src/preferences/ui/schedule.ui:508
|
||||
msgid "Night Light"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:301
|
||||
msgid "Location Services"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:316
|
||||
msgid "Manual schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:331 src/preferences/ui/schedule.ui:786
|
||||
msgid "On-demand"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:379
|
||||
msgid "No preferences"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:440
|
||||
msgid "Follow <i>Disable until tomorrow</i>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:454
|
||||
msgid ""
|
||||
"<small>When Night Light is temporarily disabled, the extension will switch "
|
||||
"to day variants.</small>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:524 src/preferences/ui/schedule.ui:761
|
||||
msgid "Manual schedule times"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:566
|
||||
#: src/preferences/ui/Commands.ui:55 src/preferences/ui/Schedule.ui:107
|
||||
msgid "Sunrise"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:602 src/preferences/ui/schedule.ui:709
|
||||
msgid ":"
|
||||
#. Don't translate the `notify-send` command.
|
||||
#: src/preferences/ui/Commands.ui:58
|
||||
msgid "notify-send \"Hello sunshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:673
|
||||
#: src/preferences/ui/Commands.ui:67 src/preferences/ui/Schedule.ui:115
|
||||
msgid "Sunset"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:920
|
||||
#. Don't translate the `notify-send` command.
|
||||
#: src/preferences/ui/Commands.ui:70
|
||||
msgid "notify-send \"Hello moonshine!\""
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/CursorPreferences.ui:15
|
||||
msgid "Switch cursor theme variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/CursorPreferences.ui:39
|
||||
#: src/preferences/ui/GtkPreferences.ui:48
|
||||
#: src/preferences/ui/IconPreferences.ui:39
|
||||
#: src/preferences/ui/ShellPreferences.ui:48
|
||||
msgid "Day variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/CursorPreferences.ui:49
|
||||
#: src/preferences/ui/GtkPreferences.ui:59
|
||||
#: src/preferences/ui/IconPreferences.ui:49
|
||||
#: src/preferences/ui/ShellPreferences.ui:59
|
||||
msgid "Night variant"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/GtkPreferences.ui:15
|
||||
msgid "Switch GTK theme variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/GtkPreferences.ui:39
|
||||
#: src/preferences/ui/ShellPreferences.ui:39
|
||||
msgid "Manual variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Headerbar.ui:12 src/preferences/ui/Headerbar.ui:24
|
||||
msgid "Support us"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Headerbar.ui:48
|
||||
msgid "View code on GitLab"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Headerbar.ui:71
|
||||
msgid "Translate on Weblate"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Headerbar.ui:94
|
||||
msgid "Donate on Liberapay"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/IconPreferences.ui:15
|
||||
msgid "Switch icon theme variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Preferences.ui:14
|
||||
msgid "Schedule"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Preferences.ui:24
|
||||
msgid "Appearance"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Preferences.ui:34
|
||||
msgid "Commands"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:27
|
||||
msgid "Manual time source"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:28
|
||||
msgid ""
|
||||
"The extension will try to use Night Light or Location Services to "
|
||||
"automatically set your current sunrise and sunset times if they are enabled. "
|
||||
"If you prefer, you can manually choose a time source."
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:45
|
||||
msgid "Always show on-demand controls"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:46
|
||||
msgid "Allows you to override the current time when using a schedule."
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:74
|
||||
msgid "Follow <i>Disable until tomorrow</i>"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:75
|
||||
msgid ""
|
||||
"When Night Light is temporarily disabled, the extension will switch to day "
|
||||
"variants."
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:95
|
||||
msgid "Manual schedule times"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:147
|
||||
msgid "Keyboard shortcut"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/Schedule.ui:155
|
||||
msgid "Button location"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:936
|
||||
#: src/preferences/ui/Schedule.ui:160
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:937
|
||||
#: src/preferences/ui/Schedule.ui:161
|
||||
msgid "Top bar"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/schedule.ui:938
|
||||
#: src/preferences/ui/Schedule.ui:162
|
||||
msgid "System menu"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/shell_theme.ui:76
|
||||
msgid "Switch Shell variants"
|
||||
#: src/preferences/ui/ShellPreferences.ui:15
|
||||
msgid "Switch Shell theme variants"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/shell_theme.ui:164
|
||||
msgid ""
|
||||
"<small>You can manually set variants if the extension cannot automatically "
|
||||
"detect the day and night variants of your GNOME Shell theme. Please <a href="
|
||||
"\"https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues"
|
||||
"\">submit a request</a> to get your theme supported.</small>"
|
||||
#: src/preferences/ui/ShortcutButton.ui:32
|
||||
msgid "Change keyboard shortcut"
|
||||
msgstr ""
|
||||
|
||||
#: src/preferences/ui/ShortcutButton.ui:100
|
||||
msgid "Press your keyboard shortcut…"
|
||||
msgstr ""
|
||||
|
||||
#. Time separator (eg. 08:27)
|
||||
#: src/preferences/ui/TimeChooser.ui:23
|
||||
msgid ":"
|
||||
msgstr ""
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var Appearance = GObject.registerClass({
|
||||
GTypeName: 'Appearance',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'Appearance.ui'])}`,
|
||||
}, class Appearance extends Gtk.ScrolledWindow {});
|
||||
@@ -0,0 +1,59 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gdk, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var BackgroundButton = GObject.registerClass({
|
||||
GTypeName: 'BackgroundButton',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'BackgroundButton.ui'])}`,
|
||||
InternalChildren: ['choose_button', 'change_button', 'clear_button', 'filechooser'],
|
||||
Properties: {
|
||||
path: GObject.ParamSpec.string(
|
||||
'path',
|
||||
'Path',
|
||||
'Path to the background file',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
},
|
||||
}, class BackgroundButton extends Gtk.Stack {
|
||||
activate() {
|
||||
if (this.path)
|
||||
return this._change_button.activate();
|
||||
else
|
||||
return this._choose_button.activate();
|
||||
}
|
||||
|
||||
openFileChooser() {
|
||||
this._filechooser.transient_for = this.get_root();
|
||||
this._filechooser.show();
|
||||
}
|
||||
|
||||
onFileChooserResponse(fileChooser, responseId) {
|
||||
if (responseId !== Gtk.ResponseType.ACCEPT)
|
||||
return;
|
||||
this.path = fileChooser.get_file().get_uri();
|
||||
}
|
||||
|
||||
onPathChanged(button) {
|
||||
button.visible_child_name = button.path ? 'edit' : 'choose';
|
||||
}
|
||||
|
||||
onChooseButtonClicked(_button) {
|
||||
this.openFileChooser();
|
||||
}
|
||||
|
||||
onChangeButtonClicked(_button) {
|
||||
this.openFileChooser();
|
||||
}
|
||||
|
||||
onClearButtonClicked(_button) {
|
||||
this.path = '';
|
||||
}
|
||||
});
|
||||
@@ -1,96 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { GdkPixbuf, Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var BackgroundsPreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'backgrounds.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('backgrounds');
|
||||
this.name = 'backgrounds';
|
||||
this.title = _('Backgrounds');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const choosers = this._builder.get_object('choosers');
|
||||
settings.backgrounds.settings.bind(
|
||||
'enabled',
|
||||
choosers,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const dayChooserButton = this._builder.get_object('day_chooser_button');
|
||||
const dayChooser = this._builder.get_object('day_chooser');
|
||||
const updateDayChooserButtonLabel = () => {
|
||||
dayChooserButton.set_label(settings.backgrounds.day ? GLib.filename_display_basename(settings.backgrounds.day) : _('Choose...'));
|
||||
};
|
||||
settings.backgrounds.connect('day-changed', () => updateDayChooserButtonLabel());
|
||||
dayChooser.connect('response', (_fileChooser, responseId) => {
|
||||
if (responseId !== Gtk.ResponseType.ACCEPT)
|
||||
return;
|
||||
settings.backgrounds.day = dayChooser.get_file().get_uri();
|
||||
});
|
||||
dayChooserButton.connect('clicked', () => {
|
||||
dayChooser.set_transient_for(dayChooserButton.get_root());
|
||||
dayChooser.show();
|
||||
});
|
||||
updateDayChooserButtonLabel();
|
||||
|
||||
const dayClearButton = this._builder.get_object('day_clear_button');
|
||||
dayClearButton.connect('clicked', () => {
|
||||
settings.backgrounds.day = '';
|
||||
});
|
||||
const updateDayClearButtonSensitivity = () => {
|
||||
dayClearButton.sensitive = !!settings.backgrounds.day;
|
||||
};
|
||||
settings.backgrounds.connect('day-changed', () => updateDayClearButtonSensitivity());
|
||||
updateDayClearButtonSensitivity();
|
||||
|
||||
const nightChooserButton = this._builder.get_object('night_chooser_button');
|
||||
const nightChooser = this._builder.get_object('night_chooser');
|
||||
const updateNightChooserButtonLabel = () => {
|
||||
nightChooserButton.set_label(settings.backgrounds.night ? GLib.filename_display_basename(settings.backgrounds.night) : _('Choose...'));
|
||||
};
|
||||
settings.backgrounds.connect('night-changed', () => updateNightChooserButtonLabel());
|
||||
nightChooser.connect('response', (_fileChooser, responseId) => {
|
||||
if (responseId !== Gtk.ResponseType.ACCEPT)
|
||||
return;
|
||||
settings.backgrounds.night = nightChooser.get_file().get_uri();
|
||||
});
|
||||
nightChooserButton.connect('clicked', () => {
|
||||
nightChooser.set_transient_for(nightChooserButton.get_root());
|
||||
nightChooser.show();
|
||||
});
|
||||
updateNightChooserButtonLabel();
|
||||
|
||||
const nightClearButton = this._builder.get_object('night_clear_button');
|
||||
nightClearButton.connect('clicked', () => {
|
||||
settings.backgrounds.night = '';
|
||||
});
|
||||
const updateNightClearButtonSensitivity = () => {
|
||||
nightClearButton.sensitive = !!settings.backgrounds.night;
|
||||
};
|
||||
settings.backgrounds.connect('night-changed', () => updateNightClearButtonSensitivity());
|
||||
updateNightClearButtonSensitivity();
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var BackgroundsPreferences = GObject.registerClass({
|
||||
GTypeName: 'BackgroundsPreferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'BackgroundsPreferences.ui'])}`,
|
||||
InternalChildren: [
|
||||
'enabled_switch',
|
||||
'day_button',
|
||||
'night_button',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Backgrounds GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class BackgroundsPreferences extends Gtk.Box {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('backgrounds'));
|
||||
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
this.settings.bind(
|
||||
'day',
|
||||
this._day_button,
|
||||
'path',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
this.settings.bind(
|
||||
'night',
|
||||
this._night_button,
|
||||
'path',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
|
||||
var ClearableEntry = GObject.registerClass({
|
||||
GTypeName: 'ClearableEntry',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'ClearableEntry.ui'])}`,
|
||||
}, class ClearableEntry extends Gtk.Entry {
|
||||
onIconReleased(entry, position) {
|
||||
if (position === Gtk.EntryIconPosition.SECONDARY)
|
||||
entry.text = '';
|
||||
}
|
||||
});
|
||||
@@ -1,78 +1,51 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var CommandsPreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'commands.ui']));
|
||||
var Commands = GObject.registerClass({
|
||||
GTypeName: 'Commands',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'Commands.ui'])}`,
|
||||
InternalChildren: ['enabled_switch', 'sunrise_entry', 'sunset_entry'],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Command GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class Commands extends Gtk.ScrolledWindow {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('commands'));
|
||||
|
||||
this.widget = this._builder.get_object('commands');
|
||||
this.name = 'commands';
|
||||
this.title = _('Commands');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.commands.settings.bind(
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const entries = this._builder.get_object('entries');
|
||||
settings.commands.settings.bind(
|
||||
'enabled',
|
||||
entries,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunriseEntry = this._builder.get_object('sunrise_entry');
|
||||
settings.commands.settings.bind(
|
||||
this.settings.bind(
|
||||
'sunrise',
|
||||
sunriseEntry,
|
||||
this._sunrise_entry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunriseClearButton = this._builder.get_object('sunrise_clear_button');
|
||||
sunriseClearButton.connect('clicked', () => {
|
||||
settings.commands.sunrise = '';
|
||||
});
|
||||
const updateSunriseClearButtonSensitivity = () => {
|
||||
sunriseClearButton.sensitive = !!settings.commands.sunrise;
|
||||
};
|
||||
settings.commands.connect('sunrise-changed', () => updateSunriseClearButtonSensitivity());
|
||||
updateSunriseClearButtonSensitivity();
|
||||
|
||||
const sunsetEntry = this._builder.get_object('sunset_entry');
|
||||
settings.commands.settings.bind(
|
||||
this.settings.bind(
|
||||
'sunset',
|
||||
sunsetEntry,
|
||||
this._sunset_entry,
|
||||
'text',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const sunsetClearButton = this._builder.get_object('sunset_clear_button');
|
||||
sunsetClearButton.connect('clicked', () => {
|
||||
settings.commands.sunset = '';
|
||||
});
|
||||
const updateSunsetClearButtonSensitivity = () => {
|
||||
sunsetClearButton.sensitive = !!settings.commands.sunset;
|
||||
};
|
||||
settings.commands.connect('sunset-changed', () => updateSunsetClearButtonSensitivity());
|
||||
updateSunsetClearButtonSensitivity();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const { DropDownChoice } = Me.imports.preferences.DropDownChoice;
|
||||
|
||||
|
||||
var CursorPreferences = GObject.registerClass({
|
||||
GTypeName: 'CursorPreferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'CursorPreferences.ui'])}`,
|
||||
InternalChildren: [
|
||||
'enabled_switch',
|
||||
'day_dropdown',
|
||||
'night_dropdown',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Cursor GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class CursorPreferences extends Gtk.Box {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('cursor-variants'));
|
||||
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const themeChoices = Gio.ListStore.new(DropDownChoice);
|
||||
themeChoices.splice(0, 0, Array.from(utils.getInstalledCursorThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||
|
||||
this._day_dropdown.model = themeChoices;
|
||||
this._day_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._day_dropdown.connect('notify::selected-item', () => this.settings.set_string('day', this._day_dropdown.selected_item.id));
|
||||
const updateDayDropDownSelected = () => {
|
||||
this._day_dropdown.selected = utils.findItemPositionInModel(this._day_dropdown.model, item => item.id === this.settings.get_string('day'));
|
||||
};
|
||||
this.settings.connect('changed::day', () => updateDayDropDownSelected());
|
||||
updateDayDropDownSelected();
|
||||
|
||||
this._night_dropdown.model = themeChoices;
|
||||
this._night_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._night_dropdown.connect('notify::selected-item', () => this.settings.set_string('night', this._night_dropdown.selected_item.id));
|
||||
const updateNightDropDownSelected = () => {
|
||||
this._night_dropdown.selected = utils.findItemPositionInModel(this._night_dropdown.model, item => item.id === this.settings.get_string('night'));
|
||||
};
|
||||
this.settings.connect('changed::night', () => updateNightDropDownSelected());
|
||||
updateNightDropDownSelected();
|
||||
}
|
||||
});
|
||||
@@ -1,64 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var CursorThemePreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'cursor_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('cursor_theme');
|
||||
this.name = 'cursor-theme';
|
||||
this.title = _('Cursor theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
settings.cursorVariants.settings.bind(
|
||||
'enabled',
|
||||
variants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedCursorThemes = Array.from(utils.getInstalledCursorThemes()).sort();
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
installedCursorThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.cursorVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.cursorVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { GObject } = imports.gi;
|
||||
|
||||
|
||||
var DropDownChoice = GObject.registerClass({
|
||||
GTypeName: 'DropDownChoice',
|
||||
Properties: {
|
||||
id: GObject.ParamSpec.string(
|
||||
'id',
|
||||
'ID',
|
||||
'Identifier',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
title: GObject.ParamSpec.string(
|
||||
'title',
|
||||
'Title',
|
||||
'Displayed title',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
enabled: GObject.ParamSpec.boolean(
|
||||
'enabled',
|
||||
'Enabled',
|
||||
'If the choice is enabled',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
true
|
||||
),
|
||||
},
|
||||
}, class DropDownChoice extends GObject.Object {});
|
||||
@@ -0,0 +1,72 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const { DropDownChoice } = Me.imports.preferences.DropDownChoice;
|
||||
|
||||
|
||||
var GtkPreferences = GObject.registerClass({
|
||||
GTypeName: 'GtkPreferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'GtkPreferences.ui'])}`,
|
||||
InternalChildren: [
|
||||
'enabled_switch',
|
||||
'manual_switch',
|
||||
'day_dropdown',
|
||||
'night_dropdown',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'GTK GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class GtkPreferences extends Gtk.Box {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('gtk-variants'));
|
||||
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
this.settings.bind(
|
||||
'manual',
|
||||
this._manual_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const themeChoices = Gio.ListStore.new(DropDownChoice);
|
||||
themeChoices.splice(0, 0, Array.from(utils.getInstalledGtkThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||
|
||||
this._day_dropdown.model = themeChoices;
|
||||
this._day_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._day_dropdown.connect('notify::selected-item', () => this.settings.set_string('day', this._day_dropdown.selected_item.id));
|
||||
const updateDayDropDownSelected = () => {
|
||||
this._day_dropdown.selected = utils.findItemPositionInModel(this._day_dropdown.model, item => item.id === this.settings.get_string('day'));
|
||||
};
|
||||
this.settings.connect('changed::day', () => updateDayDropDownSelected());
|
||||
updateDayDropDownSelected();
|
||||
|
||||
this._night_dropdown.model = themeChoices;
|
||||
this._night_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._night_dropdown.connect('notify::selected-item', () => this.settings.set_string('night', this._night_dropdown.selected_item.id));
|
||||
const updateNightDropDownSelected = () => {
|
||||
this._night_dropdown.selected = utils.findItemPositionInModel(this._night_dropdown.model, item => item.id === this.settings.get_string('night'));
|
||||
};
|
||||
this.settings.connect('changed::night', () => updateNightDropDownSelected());
|
||||
updateNightDropDownSelected();
|
||||
}
|
||||
});
|
||||
@@ -1,80 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var GtkThemePreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'gtk_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('gtk_theme');
|
||||
this.name = 'gtk-theme';
|
||||
this.title = _('GTK theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'enabled',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manualSwitch = this._builder.get_object('manual_switch');
|
||||
settings.gtkVariants.settings.bind(
|
||||
'manual',
|
||||
manualSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
const updateVariantsSensitivity = () => {
|
||||
variants.sensitive = !!(settings.gtkVariants.enabled && settings.gtkVariants.manual);
|
||||
};
|
||||
settings.gtkVariants.connect('status-changed', () => updateVariantsSensitivity());
|
||||
settings.gtkVariants.connect('manual-changed', () => updateVariantsSensitivity());
|
||||
updateVariantsSensitivity();
|
||||
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
const installedGtkThemes = Array.from(utils.getInstalledGtkThemes()).sort();
|
||||
installedGtkThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.gtkVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.gtkVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -1,49 +1,47 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { GLib, Gtk } = imports.gi;
|
||||
const { GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var Headerbar = class {
|
||||
constructor(stack) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'headerbar.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('headerbar');
|
||||
|
||||
this._connect(stack);
|
||||
|
||||
return this.widget;
|
||||
var Headerbar = GObject.registerClass({
|
||||
GTypeName: 'Headerbar',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'Headerbar.ui'])}`,
|
||||
Properties: {
|
||||
preferences: GObject.ParamSpec.object(
|
||||
'preferences',
|
||||
'Preferences',
|
||||
'A Preferences stack',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gtk.Stack.$gtype
|
||||
),
|
||||
},
|
||||
}, class Headerbar extends Gtk.HeaderBar {
|
||||
onPreferencesChanged(headerbar) {
|
||||
headerbar.title_widget = null;
|
||||
if (!headerbar.preferences)
|
||||
return;
|
||||
const pages = headerbar.preferences.pages;
|
||||
const box = new Gtk.Box({ orientation: 'horizontal', css_classes: ['linked'] });
|
||||
for (let i = 0; i < pages.get_n_items(); i++) {
|
||||
const page = pages.get_item(i);
|
||||
const button = new Gtk.ToggleButton({ active: pages.is_selected(i) });
|
||||
const buttonBox = new Gtk.Box({ orientation: 'horizontal', margin_start: 12, margin_end: 12, spacing: 6 });
|
||||
buttonBox.append(new Gtk.Image({ icon_name: page.icon_name }));
|
||||
buttonBox.append(new Gtk.Label({ label: page.title }));
|
||||
button.set_child(buttonBox);
|
||||
button.connect('clicked', () => {
|
||||
pages.select_item(i, true);
|
||||
button.active = true;
|
||||
});
|
||||
pages.connect('selection-changed', () => {
|
||||
button.active = pages.is_selected(i);
|
||||
});
|
||||
box.append(button);
|
||||
}
|
||||
headerbar.title_widget = box;
|
||||
}
|
||||
|
||||
_connect(stack) {
|
||||
const scheduleRadio = this._builder.get_object('schedule_radio');
|
||||
scheduleRadio.connect('clicked', () => stack.set_visible_child_name('schedule'));
|
||||
|
||||
const gtkThemeRadio = this._builder.get_object('gtk_theme_radio');
|
||||
gtkThemeRadio.connect('clicked', () => stack.set_visible_child_name('gtk-theme'));
|
||||
|
||||
const shellThemeRadio = this._builder.get_object('shell_theme_radio');
|
||||
shellThemeRadio.connect('clicked', () => stack.set_visible_child_name('shell-theme'));
|
||||
|
||||
const iconThemeRadio = this._builder.get_object('icon_theme_radio');
|
||||
iconThemeRadio.connect('clicked', () => stack.set_visible_child_name('icon-theme'));
|
||||
|
||||
const cursorThemeRadio = this._builder.get_object('cursor_theme_radio');
|
||||
cursorThemeRadio.connect('clicked', () => stack.set_visible_child_name('cursor-theme'));
|
||||
|
||||
const backgroundsRadio = this._builder.get_object('backgrounds_radio');
|
||||
backgroundsRadio.connect('clicked', () => stack.set_visible_child_name('backgrounds'));
|
||||
|
||||
const commandsRadio = this._builder.get_object('commands_radio');
|
||||
commandsRadio.connect('clicked', () => stack.set_visible_child_name('commands'));
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const { DropDownChoice } = Me.imports.preferences.DropDownChoice;
|
||||
|
||||
|
||||
var IconPreferences = GObject.registerClass({
|
||||
GTypeName: 'IconPreferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'IconPreferences.ui'])}`,
|
||||
InternalChildren: [
|
||||
'enabled_switch',
|
||||
'day_dropdown',
|
||||
'night_dropdown',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Icon GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class IconPreferences extends Gtk.Box {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('icon-variants'));
|
||||
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const themeChoices = Gio.ListStore.new(DropDownChoice);
|
||||
themeChoices.splice(0, 0, Array.from(utils.getInstalledIconThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme })));
|
||||
|
||||
this._day_dropdown.model = themeChoices;
|
||||
this._day_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._day_dropdown.connect('notify::selected-item', () => this.settings.set_string('day', this._day_dropdown.selected_item.id));
|
||||
const updateDayDropDownSelected = () => {
|
||||
this._day_dropdown.selected = utils.findItemPositionInModel(this._day_dropdown.model, item => item.id === this.settings.get_string('day'));
|
||||
};
|
||||
this.settings.connect('changed::day', () => updateDayDropDownSelected());
|
||||
updateDayDropDownSelected();
|
||||
|
||||
this._night_dropdown.model = themeChoices;
|
||||
this._night_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._night_dropdown.connect('notify::selected-item', () => this.settings.set_string('night', this._night_dropdown.selected_item.id));
|
||||
const updateNightDropDownSelected = () => {
|
||||
this._night_dropdown.selected = utils.findItemPositionInModel(this._night_dropdown.model, item => item.id === this.settings.get_string('night'));
|
||||
};
|
||||
this.settings.connect('changed::night', () => updateNightDropDownSelected());
|
||||
updateNightDropDownSelected();
|
||||
}
|
||||
});
|
||||
@@ -1,64 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var IconThemePreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'icon_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('icon_theme');
|
||||
this.name = 'icon-theme';
|
||||
this.title = _('Icon theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
settings.iconVariants.settings.bind(
|
||||
'enabled',
|
||||
variants,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const installedIconThemes = Array.from(utils.getInstalledIconThemes()).sort();
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
installedIconThemes.forEach(theme => {
|
||||
dayCombo.append(theme, theme);
|
||||
nightCombo.append(theme, theme);
|
||||
});
|
||||
settings.iconVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.iconVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gdk, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var OndemandKeyboardShortcutDialog = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'ondemand_keyboard_shortcut_dialog.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('dialog');
|
||||
|
||||
this._connectSettings(settings);
|
||||
|
||||
return this.widget;
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const eventController = this._builder.get_object('event-controller');
|
||||
eventController.connect('key-pressed', (_widget, keyval, keycode, state) => {
|
||||
let mask = state & Gtk.accelerator_get_default_mod_mask();
|
||||
mask &= ~Gdk.ModifierType.LOCK_MASK;
|
||||
|
||||
if (mask === 0 && keyval === Gdk.KEY_Escape) {
|
||||
this.widget.visible = false;
|
||||
return Gdk.EVENT_STOP;
|
||||
}
|
||||
|
||||
if (
|
||||
!utils.isBindingValid({ mask, keycode, keyval }) ||
|
||||
!utils.isAccelValid({ mask, keyval })
|
||||
)
|
||||
return Gdk.EVENT_STOP;
|
||||
|
||||
const binding = Gtk.accelerator_name_with_keycode(
|
||||
null,
|
||||
keyval,
|
||||
keycode,
|
||||
mask
|
||||
);
|
||||
settings.time.ondemandKeybinding = binding;
|
||||
this.widget.close();
|
||||
return Gdk.EVENT_STOP;
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,58 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
|
||||
var PreferenceRow = GObject.registerClass({
|
||||
GTypeName: 'PreferenceRow',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'PreferenceRow.ui'])}`,
|
||||
InternalChildren: ['subtitle_label', 'end_box'],
|
||||
Properties: {
|
||||
title: GObject.ParamSpec.string(
|
||||
'title',
|
||||
'Title',
|
||||
'Title of the preference',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
subtitle: GObject.ParamSpec.string(
|
||||
'subtitle',
|
||||
'Subtitle',
|
||||
'Description of the preference',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
activatable_widget: GObject.ParamSpec.object(
|
||||
'activatable-widget',
|
||||
'Activatable widget',
|
||||
'The widget to activate when the row is activated',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gtk.Widget.$gtype
|
||||
),
|
||||
},
|
||||
}, class PreferenceRow extends Gtk.ListBoxRow {
|
||||
activate() {
|
||||
if (this.activatable_widget)
|
||||
return this.activatable_widget.activate();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
onSubtitleChanged(list) {
|
||||
list._subtitle_label.visible = !!list.subtitle;
|
||||
}
|
||||
|
||||
onActivatableWidgetChanged(list) {
|
||||
while (list._end_box.get_last_child())
|
||||
list._end_box.remove(list._end_box.get_last_child());
|
||||
list.activatable = false;
|
||||
if (list.activatable_widget) {
|
||||
list._end_box.append(list.activatable_widget);
|
||||
list.activatable = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1,57 +1,28 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gtk } = imports.gi;
|
||||
const { GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { Settings } = Me.imports.settings.Settings;
|
||||
|
||||
const { BackgroundsPreferences } = Me.imports.preferences.Backgrounds;
|
||||
const { CommandsPreferences } = Me.imports.preferences.Commands;
|
||||
const { CursorThemePreferences } = Me.imports.preferences.CursorTheme;
|
||||
const { GtkThemePreferences } = Me.imports.preferences.GtkTheme;
|
||||
const { IconThemePreferences } = Me.imports.preferences.IconTheme;
|
||||
const { SchedulePreferences } = Me.imports.preferences.Schedule;
|
||||
const { ShellThemePreferences } = Me.imports.preferences.ShellTheme;
|
||||
|
||||
const { Headerbar } = Me.imports.preferences.Headerbar;
|
||||
const { Appearance } = Me.imports.preferences.Appearance;
|
||||
const { BackgroundButton } = Me.imports.preferences.BackgroundButton;
|
||||
const { BackgroundsPreferences } = Me.imports.preferences.BackgroundsPreferences;
|
||||
const { ClearableEntry } = Me.imports.preferences.ClearableEntry;
|
||||
const { Commands } = Me.imports.preferences.Commands;
|
||||
const { CursorPreferences } = Me.imports.preferences.CursorPreferences;
|
||||
const { GtkPreferences } = Me.imports.preferences.GtkPreferences;
|
||||
const { IconPreferences } = Me.imports.preferences.IconPreferences;
|
||||
const { PreferenceRow } = Me.imports.preferences.PreferenceRow;
|
||||
const { PreferencesList } = Me.imports.preferences.PreferencesList;
|
||||
const { Schedule } = Me.imports.preferences.Schedule;
|
||||
const { ShellPreferences } = Me.imports.preferences.ShellPreferences;
|
||||
const { ShortcutButton } = Me.imports.preferences.ShortcutButton;
|
||||
const { TimeChooser } = Me.imports.preferences.TimeChooser;
|
||||
|
||||
|
||||
var Preferences = class {
|
||||
constructor() {
|
||||
this.settings = new Settings();
|
||||
this.settings.enable();
|
||||
|
||||
this.widget = new Gtk.Stack({
|
||||
interpolate_size: true,
|
||||
vhomogeneous: false,
|
||||
transition_type: Gtk.StackTransitionType.SLIDE_LEFT_RIGHT,
|
||||
visible: true,
|
||||
});
|
||||
|
||||
const schedulePreferences = new SchedulePreferences(this.settings);
|
||||
this.widget.add_titled(schedulePreferences.widget, schedulePreferences.name, schedulePreferences.title);
|
||||
|
||||
const gtkThemePreferences = new GtkThemePreferences(this.settings);
|
||||
this.widget.add_titled(gtkThemePreferences.widget, gtkThemePreferences.name, gtkThemePreferences.title);
|
||||
|
||||
const shellThemePreferences = new ShellThemePreferences(this.settings);
|
||||
this.widget.add_titled(shellThemePreferences.widget, shellThemePreferences.name, shellThemePreferences.title);
|
||||
|
||||
const iconThemePreferences = new IconThemePreferences(this.settings);
|
||||
this.widget.add_titled(iconThemePreferences.widget, iconThemePreferences.name, iconThemePreferences.title);
|
||||
|
||||
const cursorThemePreferences = new CursorThemePreferences(this.settings);
|
||||
this.widget.add_titled(cursorThemePreferences.widget, cursorThemePreferences.name, cursorThemePreferences.title);
|
||||
|
||||
const backgroundsPreferences = new BackgroundsPreferences(this.settings);
|
||||
this.widget.add_titled(backgroundsPreferences.widget, backgroundsPreferences.name, backgroundsPreferences.title);
|
||||
|
||||
const commandsPreferences = new CommandsPreferences(this.settings);
|
||||
this.widget.add_titled(commandsPreferences.widget, commandsPreferences.name, commandsPreferences.title);
|
||||
|
||||
this.headerbar = new Headerbar(this.widget);
|
||||
}
|
||||
};
|
||||
var Preferences = GObject.registerClass({
|
||||
GTypeName: 'Preferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'Preferences.ui'])}`,
|
||||
}, class Preferences extends Gtk.Stack {});
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
|
||||
var PreferencesList = GObject.registerClass({
|
||||
GTypeName: 'PreferencesList',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'PreferencesList.ui'])}`,
|
||||
}, class PreferencesList extends Gtk.ListBox {
|
||||
onRowActivated(_list, row) {
|
||||
row.activate();
|
||||
}
|
||||
});
|
||||
@@ -1,229 +1,149 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { OndemandKeyboardShortcutDialog } = Me.imports.preferences.OndemandKeyboardShortcutDialog;
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const { DropDownChoice } = Me.imports.preferences.DropDownChoice;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var SchedulePreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'schedule.ui']));
|
||||
var Schedule = GObject.registerClass({
|
||||
GTypeName: 'Schedule',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'Schedule.ui'])}`,
|
||||
InternalChildren: [
|
||||
'manual_time_source_switch',
|
||||
'time_source_dropdown',
|
||||
'always_show_ondemand_switch',
|
||||
'nightlight_preferences_revealer',
|
||||
'nightlight_follow_disable_switch',
|
||||
'schedule_preferences_revealer',
|
||||
'schedule_sunrise_time_chooser',
|
||||
'schedule_sunset_time_chooser',
|
||||
'ondemand_preferences_revealer',
|
||||
'ondemand_shortcut_button',
|
||||
'ondemand_button_location_combo',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Time GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class Schedule extends Gtk.ScrolledWindow {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('time'));
|
||||
|
||||
this.widget = this._builder.get_object('schedule');
|
||||
this.name = 'schedule';
|
||||
this.title = _('Schedule');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const autoSwitch = this._builder.get_object('auto_switch');
|
||||
settings.time.settings.bind(
|
||||
this.settings.bind(
|
||||
'manual-time-source',
|
||||
autoSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.INVERT_BOOLEAN
|
||||
);
|
||||
|
||||
const alwaysEnableOndemandSwitch = this._builder.get_object('always_enable_ondemand_switch');
|
||||
settings.time.settings.bind(
|
||||
'always-enable-ondemand',
|
||||
alwaysEnableOndemandSwitch,
|
||||
this._manual_time_source_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.time.settings.bind(
|
||||
'manual-time-source',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
const choiceFilter = new Gtk.BoolFilter({ expression: Gtk.PropertyExpression.new(DropDownChoice, null, 'enabled') });
|
||||
|
||||
const manualNightlightRadio = this._builder.get_object('manual_nightlight_radio');
|
||||
const updateManualNightlightRadioActivity = () => {
|
||||
manualNightlightRadio.active = settings.time.timeSource === 'nightlight';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualNightlightRadioActivity());
|
||||
settings.system.colorSettings.bind(
|
||||
const colorSettings = new Gio.Settings({ schema: 'org.gnome.settings-daemon.plugins.color' });
|
||||
const nightlightChoice = new DropDownChoice({ id: 'nightlight', title: _('Night Light') });
|
||||
nightlightChoice.connect('notify::enabled', () => choiceFilter.changed(Gtk.FilterChange.DIFFERENT));
|
||||
colorSettings.bind(
|
||||
'night-light-enabled',
|
||||
manualNightlightRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
manualNightlightRadio.connect('toggled', () => {
|
||||
if (manualNightlightRadio.active)
|
||||
settings.time.timeSource = 'nightlight';
|
||||
});
|
||||
updateManualNightlightRadioActivity();
|
||||
|
||||
const manualLocationRadio = this._builder.get_object('manual_location_radio');
|
||||
const updateManualLocationRadioActivity = () => {
|
||||
manualLocationRadio.active = settings.time.timeSource === 'location';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualLocationRadioActivity());
|
||||
settings.system.locationSettings.bind(
|
||||
nightlightChoice,
|
||||
'enabled',
|
||||
manualLocationRadio,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
Gio.SettingsBindFlags.GET
|
||||
);
|
||||
manualLocationRadio.connect('toggled', () => {
|
||||
if (manualLocationRadio.active)
|
||||
settings.time.timeSource = 'location';
|
||||
|
||||
const locationSettings = new Gio.Settings({ schema: 'org.gnome.system.location' });
|
||||
const locationChoice = new DropDownChoice({ id: 'location', title: _('Location Services') });
|
||||
locationChoice.connect('notify::enabled', () => choiceFilter.changed(Gtk.FilterChange.DIFFERENT));
|
||||
locationSettings.bind(
|
||||
'enabled',
|
||||
locationChoice,
|
||||
'enabled',
|
||||
Gio.SettingsBindFlags.GET
|
||||
);
|
||||
|
||||
const timeSources = Gio.ListStore.new(DropDownChoice);
|
||||
timeSources.splice(0, 0, [
|
||||
nightlightChoice,
|
||||
locationChoice,
|
||||
new DropDownChoice({ id: 'schedule', title: _('Manual schedule') }),
|
||||
new DropDownChoice({ id: 'ondemand', title: _('On-demand') }),
|
||||
]);
|
||||
|
||||
this._time_source_dropdown.model = new Gtk.FilterListModel({
|
||||
model: timeSources,
|
||||
filter: choiceFilter,
|
||||
});
|
||||
updateManualLocationRadioActivity();
|
||||
|
||||
const manualScheduleRadio = this._builder.get_object('manual_schedule_radio');
|
||||
const updateManualScheduleRadioActivity = () => {
|
||||
manualScheduleRadio.active = settings.time.timeSource === 'schedule';
|
||||
this._time_source_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._time_source_dropdown.connect('notify::selected-item', () => this.settings.set_string('time-source', this._time_source_dropdown.selected_item.id));
|
||||
const updateTimeSourceDropDownSelected = () => {
|
||||
this._time_source_dropdown.selected = utils.findItemPositionInModel(this._time_source_dropdown.model, item => item.id === this.settings.get_string('time-source'));
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualScheduleRadioActivity());
|
||||
manualScheduleRadio.connect('toggled', () => {
|
||||
if (manualScheduleRadio.active)
|
||||
settings.time.timeSource = 'schedule';
|
||||
});
|
||||
updateManualScheduleRadioActivity();
|
||||
this.settings.connect('changed::time-source', () => updateTimeSourceDropDownSelected());
|
||||
updateTimeSourceDropDownSelected();
|
||||
|
||||
const manualOndemandRadio = this._builder.get_object('manual_ondemand_radio');
|
||||
const updateManualOndemandRadioActivity = () => {
|
||||
manualOndemandRadio.active = settings.time.timeSource === 'ondemand';
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualOndemandRadioActivity());
|
||||
manualOndemandRadio.connect('toggled', () => {
|
||||
if (manualOndemandRadio.active)
|
||||
settings.time.timeSource = 'ondemand';
|
||||
});
|
||||
updateManualOndemandRadioActivity();
|
||||
|
||||
const manualPrefsStack = this._builder.get_object('manual_prefs_stack');
|
||||
const updateManualPrefsStackVisible = () => {
|
||||
switch (settings.time.timeSource) {
|
||||
case 'nightlight':
|
||||
manualPrefsStack.set_visible_child_name('nightlight');
|
||||
break;
|
||||
case 'schedule':
|
||||
manualPrefsStack.set_visible_child_name('schedule_times');
|
||||
break;
|
||||
default:
|
||||
manualPrefsStack.set_visible_child_name('none');
|
||||
}
|
||||
};
|
||||
settings.time.connect('time-source-changed', () => updateManualPrefsStackVisible());
|
||||
updateManualPrefsStackVisible();
|
||||
|
||||
const nightlightFollowDisableSwitch = this._builder.get_object('nightlight_follow_disable_switch');
|
||||
settings.time.settings.bind(
|
||||
'nightlight-follow-disable',
|
||||
nightlightFollowDisableSwitch,
|
||||
this.settings.bind(
|
||||
'always-enable-ondemand',
|
||||
this._always_show_ondemand_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const scheduleTimesSunriseHoursSpin = this._builder.get_object('schedule_times_sunrise_hours_spin');
|
||||
scheduleTimesSunriseHoursSpin.value = Math.trunc(settings.time.scheduleSunrise);
|
||||
scheduleTimesSunriseHoursSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunriseHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunriseHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunriseHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = settings.time.scheduleSunrise;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleTimesSunriseHoursSpin.value + newMinutes;
|
||||
settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
this.settings.bind(
|
||||
'nightlight-follow-disable',
|
||||
this._nightlight_follow_disable_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const scheduleTimesSunriseMinutesSpin = this._builder.get_object('schedule_times_sunrise_minutes_spin');
|
||||
scheduleTimesSunriseMinutesSpin.value = Math.round((settings.time.scheduleSunrise - Math.trunc(settings.time.scheduleSunrise)) * 60);
|
||||
scheduleTimesSunriseMinutesSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunriseMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunriseMinutesSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunriseMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(settings.time.scheduleSunrise);
|
||||
const newMinutes = scheduleTimesSunriseMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
settings.time.scheduleSunrise = newTime;
|
||||
});
|
||||
this.settings.bind(
|
||||
'schedule-sunrise',
|
||||
this._schedule_sunrise_time_chooser,
|
||||
'time',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const scheduleTimesSunsetHoursSpin = this._builder.get_object('schedule_times_sunset_hours_spin');
|
||||
scheduleTimesSunsetHoursSpin.value = Math.trunc(settings.time.scheduleSunset);
|
||||
scheduleTimesSunsetHoursSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunsetHoursSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunsetHoursSpin.set_text(text);
|
||||
return true;
|
||||
});
|
||||
scheduleTimesSunsetHoursSpin.connect('value-changed', () => {
|
||||
const oldTime = settings.time.scheduleSunset;
|
||||
const oldHour = Math.trunc(oldTime);
|
||||
const newMinutes = oldTime - oldHour;
|
||||
const newTime = scheduleTimesSunsetHoursSpin.value + newMinutes;
|
||||
settings.time.scheduleSunset = newTime;
|
||||
});
|
||||
this.settings.bind(
|
||||
'schedule-sunset',
|
||||
this._schedule_sunset_time_chooser,
|
||||
'time',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const scheduleTimesSunsetMinutesSpin = this._builder.get_object('schedule_times_sunset_minutes_spin');
|
||||
scheduleTimesSunsetMinutesSpin.value = Math.round((settings.time.scheduleSunset - Math.trunc(settings.time.scheduleSunset)) * 60);
|
||||
scheduleTimesSunsetMinutesSpin.connect('output', () => {
|
||||
const text = scheduleTimesSunsetMinutesSpin.adjustment.value.toString().padStart(2, '0');
|
||||
scheduleTimesSunsetMinutesSpin.set_text(text);
|
||||
return true;
|
||||
this.settings.connect('changed::nightthemeswitcher-ondemand-keybinding', () => {
|
||||
this._ondemand_shortcut_button.keybinding = this.settings.get_strv('nightthemeswitcher-ondemand-keybinding')[0];
|
||||
});
|
||||
scheduleTimesSunsetMinutesSpin.connect('value-changed', () => {
|
||||
const hour = Math.trunc(settings.time.scheduleSunset);
|
||||
const newMinutes = scheduleTimesSunsetMinutesSpin.value / 60;
|
||||
const newTime = hour + newMinutes;
|
||||
settings.time.scheduleSunset = newTime;
|
||||
this._ondemand_shortcut_button.connect('notify::keybinding', () => {
|
||||
this.settings.set_strv('nightthemeswitcher-ondemand-keybinding', [this._ondemand_shortcut_button.keybinding]);
|
||||
});
|
||||
this._ondemand_shortcut_button.keybinding = this.settings.get_strv('nightthemeswitcher-ondemand-keybinding')[0];
|
||||
|
||||
const ondemand = this._builder.get_object('ondemand');
|
||||
const updateOndemandVisibility = () => {
|
||||
ondemand.visible = settings.time.alwaysEnableOndemand || settings.time.timeSource === 'ondemand';
|
||||
};
|
||||
settings.time.connect('always-enable-ondemand-changed', () => updateOndemandVisibility());
|
||||
settings.time.connect('time-source-changed', () => updateOndemandVisibility());
|
||||
updateOndemandVisibility();
|
||||
|
||||
const ondemandShortcutButton = this._builder.get_object('ondemand_shortcut_button');
|
||||
const updateOndemandShortcutButtonLabel = () => {
|
||||
const label = settings.time.ondemandKeybinding;
|
||||
ondemandShortcutButton.label = label || _('Choose');
|
||||
};
|
||||
settings.time.connect('ondemand-keybinding-changed', () => updateOndemandShortcutButtonLabel());
|
||||
ondemandShortcutButton.connect('clicked', () => {
|
||||
const dialog = new OndemandKeyboardShortcutDialog(settings);
|
||||
dialog.set_transient_for(this.widget.get_root());
|
||||
dialog.present();
|
||||
});
|
||||
updateOndemandShortcutButtonLabel();
|
||||
|
||||
const ondemandShortcutClearButton = this._builder.get_object('ondemand_shortcut_clear_button');
|
||||
ondemandShortcutClearButton.connect('clicked', () => {
|
||||
settings.time.ondemandKeybinding = '';
|
||||
});
|
||||
const updateOndemandShortcutClearButtonVisibility = () => {
|
||||
ondemandShortcutClearButton.visible = !!settings.time.ondemandKeybinding;
|
||||
};
|
||||
settings.time.connect('ondemand-keybinding-changed', () => updateOndemandShortcutClearButtonVisibility());
|
||||
updateOndemandShortcutClearButtonVisibility();
|
||||
|
||||
const ondemandButtonPlacementCombo = this._builder.get_object('ondemand_button_placement_combo');
|
||||
settings.time.settings.bind(
|
||||
this.settings.bind(
|
||||
'ondemand-button-placement',
|
||||
ondemandButtonPlacementCombo,
|
||||
this._ondemand_button_location_combo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const updatePreferencesVisibility = () => {
|
||||
const timeSource = this.settings.get_string('time-source');
|
||||
this._nightlight_preferences_revealer.reveal_child = timeSource === 'nightlight';
|
||||
this._schedule_preferences_revealer.reveal_child = timeSource === 'schedule';
|
||||
this._ondemand_preferences_revealer.reveal_child = timeSource === 'ondemand' || this.settings.get_boolean('always-enable-ondemand');
|
||||
};
|
||||
this.settings.connect('changed::time-source', () => updatePreferencesVisibility());
|
||||
this.settings.connect('changed::always-enable-ondemand', () => updatePreferencesVisibility());
|
||||
updatePreferencesVisibility();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const { DropDownChoice } = Me.imports.preferences.DropDownChoice;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var ShellPreferences = GObject.registerClass({
|
||||
GTypeName: 'ShellPreferences',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'ShellPreferences.ui'])}`,
|
||||
InternalChildren: [
|
||||
'enabled_switch',
|
||||
'manual_switch',
|
||||
'day_dropdown',
|
||||
'night_dropdown',
|
||||
],
|
||||
Properties: {
|
||||
settings: GObject.ParamSpec.object(
|
||||
'settings',
|
||||
'Settings',
|
||||
'Shell GSettings',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
Gio.Settings.$gtype
|
||||
),
|
||||
},
|
||||
}, class ShellPreferences extends Gtk.Box {
|
||||
_init(props = {}) {
|
||||
super._init(props);
|
||||
this.settings = extensionUtils.getSettings(utils.getSettingsSchema('shell-variants'));
|
||||
|
||||
this.settings.bind(
|
||||
'enabled',
|
||||
this._enabled_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
this.settings.bind(
|
||||
'manual',
|
||||
this._manual_switch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const themeChoices = Gio.ListStore.new(DropDownChoice);
|
||||
themeChoices.splice(0, 0, Array.from(utils.getInstalledShellThemes()).sort().map(theme => new DropDownChoice({ id: theme, title: theme || _('Default') })));
|
||||
|
||||
this._day_dropdown.model = themeChoices;
|
||||
this._day_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._day_dropdown.connect('notify::selected-item', () => this.settings.set_string('day', this._day_dropdown.selected_item.id));
|
||||
const updateDayDropDownSelected = () => {
|
||||
this._day_dropdown.selected = utils.findItemPositionInModel(this._day_dropdown.model, item => item.id === this.settings.get_string('day'));
|
||||
};
|
||||
this.settings.connect('changed::day', () => updateDayDropDownSelected());
|
||||
updateDayDropDownSelected();
|
||||
|
||||
this._night_dropdown.model = themeChoices;
|
||||
this._night_dropdown.expression = Gtk.PropertyExpression.new(DropDownChoice, null, 'title');
|
||||
this._night_dropdown.connect('notify::selected-item', () => this.settings.set_string('night', this._night_dropdown.selected_item.id));
|
||||
const updateNightDropDownSelected = () => {
|
||||
this._night_dropdown.selected = utils.findItemPositionInModel(this._night_dropdown.model, item => item.id === this.settings.get_string('night'));
|
||||
};
|
||||
this.settings.connect('changed::night', () => updateNightDropDownSelected());
|
||||
updateNightDropDownSelected();
|
||||
}
|
||||
});
|
||||
@@ -1,81 +0,0 @@
|
||||
// SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gio, GLib, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
||||
const _ = Gettext.gettext;
|
||||
|
||||
|
||||
var ShellThemePreferences = class {
|
||||
constructor(settings) {
|
||||
this._builder = new Gtk.Builder();
|
||||
this._builder.add_from_file(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'shell_theme.ui']));
|
||||
|
||||
this.widget = this._builder.get_object('shell_theme');
|
||||
this.name = 'shell-theme';
|
||||
this.title = _('Shell theme');
|
||||
|
||||
this._connectSettings(settings);
|
||||
}
|
||||
|
||||
_connectSettings(settings) {
|
||||
const enabledSwitch = this._builder.get_object('enabled_switch');
|
||||
settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
enabledSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manual = this._builder.get_object('manual');
|
||||
settings.shellVariants.settings.bind(
|
||||
'enabled',
|
||||
manual,
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const manualSwitch = this._builder.get_object('manual_switch');
|
||||
settings.shellVariants.settings.bind(
|
||||
'manual',
|
||||
manualSwitch,
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
|
||||
const variants = this._builder.get_object('variants');
|
||||
const updateVariantsSensitivity = () => {
|
||||
variants.sensitive = !!(settings.shellVariants.enabled && settings.shellVariants.manual);
|
||||
};
|
||||
settings.shellVariants.connect('status-changed', () => updateVariantsSensitivity());
|
||||
settings.shellVariants.connect('manual-changed', () => updateVariantsSensitivity());
|
||||
updateVariantsSensitivity();
|
||||
|
||||
const dayCombo = this._builder.get_object('day_combo');
|
||||
const nightCombo = this._builder.get_object('night_combo');
|
||||
const installedShellThemes = Array.from(utils.getInstalledShellThemes()).sort();
|
||||
installedShellThemes.forEach(theme => {
|
||||
const themeName = theme === '' ? _('Default') : theme;
|
||||
dayCombo.append(theme, themeName);
|
||||
nightCombo.append(theme, themeName);
|
||||
});
|
||||
settings.shellVariants.settings.bind(
|
||||
'day',
|
||||
dayCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
settings.shellVariants.settings.bind(
|
||||
'night',
|
||||
nightCombo,
|
||||
'active-id',
|
||||
Gio.SettingsBindFlags.DEFAULT
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,78 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { Gdk, GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const utils = Me.imports.utils;
|
||||
|
||||
|
||||
var ShortcutButton = GObject.registerClass({
|
||||
GTypeName: 'ShortcutButton',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'ShortcutButton.ui'])}`,
|
||||
InternalChildren: ['choose_button', 'change_button', 'clear_button', 'dialog'],
|
||||
Properties: {
|
||||
keybinding: GObject.ParamSpec.string(
|
||||
'keybinding',
|
||||
'Keybinding',
|
||||
'Key sequence',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
null
|
||||
),
|
||||
},
|
||||
}, class ShortcutButton extends Gtk.Stack {
|
||||
activate() {
|
||||
if (this.keybinding)
|
||||
return this._change_button.activate();
|
||||
else
|
||||
return this._choose_button.activate();
|
||||
}
|
||||
|
||||
openDialog() {
|
||||
this._dialog.transient_for = this.get_root();
|
||||
this._dialog.present();
|
||||
}
|
||||
|
||||
onKeybindingChanged(button) {
|
||||
button.visible_child_name = button.keybinding ? 'edit' : 'choose';
|
||||
}
|
||||
|
||||
onChooseButtonClicked(_button) {
|
||||
this.openDialog();
|
||||
}
|
||||
|
||||
onChangeButtonClicked(_button) {
|
||||
this.openDialog();
|
||||
}
|
||||
|
||||
onClearButtonClicked(_button) {
|
||||
this.keybinding = '';
|
||||
}
|
||||
|
||||
onKeyPressed(_widget, keyval, keycode, state) {
|
||||
let mask = state & Gtk.accelerator_get_default_mod_mask();
|
||||
mask &= ~Gdk.ModifierType.LOCK_MASK;
|
||||
|
||||
if (mask === 0 && keyval === Gdk.KEY_Escape) {
|
||||
this._dialog.close();
|
||||
return Gdk.EVENT_STOP;
|
||||
}
|
||||
|
||||
if (
|
||||
!utils.isBindingValid({ mask, keycode, keyval }) ||
|
||||
!utils.isAccelValid({ mask, keyval })
|
||||
)
|
||||
return Gdk.EVENT_STOP;
|
||||
|
||||
this.keybinding = Gtk.accelerator_name_with_keycode(
|
||||
null,
|
||||
keyval,
|
||||
keycode,
|
||||
mask
|
||||
);
|
||||
this._dialog.close();
|
||||
return Gdk.EVENT_STOP;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
// SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const { GLib, GObject, Gtk } = imports.gi;
|
||||
const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
|
||||
var TimeChooser = GObject.registerClass({
|
||||
GTypeName: 'TimeChooser',
|
||||
Template: `file://${GLib.build_filenamev([Me.path, 'preferences', 'ui', 'TimeChooser.ui'])}`,
|
||||
InternalChildren: ['hours', 'minutes'],
|
||||
Properties: {
|
||||
time: GObject.ParamSpec.double(
|
||||
'time',
|
||||
'Time',
|
||||
'The time of the chooser',
|
||||
GObject.ParamFlags.READWRITE,
|
||||
0,
|
||||
24,
|
||||
0
|
||||
),
|
||||
},
|
||||
}, class TimeChooser extends Gtk.Box {
|
||||
onTimeChanged(chooser) {
|
||||
const hours = Math.trunc(chooser.time);
|
||||
const minutes = Math.round((chooser.time - hours) * 60);
|
||||
chooser._hours.value = hours;
|
||||
chooser._minutes.value = minutes;
|
||||
}
|
||||
|
||||
onValueChanged(_spin) {
|
||||
const hours = this._hours.value;
|
||||
const minutes = this._minutes.value / 60;
|
||||
this.time = hours + minutes;
|
||||
}
|
||||
|
||||
onOutputChanged(spin) {
|
||||
spin.text = spin.value.toString().padStart(2, '0');
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="Appearance" parent="GtkScrolledWindow">
|
||||
<property name="propagate-natural-height">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="scroll-to-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="width-request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="GtkPreferences"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="ShellPreferences"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="IconPreferences"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="CursorPreferences"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="BackgroundsPreferences"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="BackgroundButton" parent="GtkStack">
|
||||
<property name="hhomogeneous">False</property>
|
||||
<signal name="notify::path" handler="onPathChanged" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">choose</property>
|
||||
<property name="child">
|
||||
<object class="GtkButton" id="choose_button">
|
||||
<property name="label" translatable="yes">Choose…</property>
|
||||
<signal name="clicked" handler="onChooseButtonClicked" swapped="no"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">edit</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton" id="change_button">
|
||||
<property name="tooltip-text" translatable="yes">Change background</property>
|
||||
<signal name="clicked" handler="onChangeButtonClicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="BackgroundButton" bind-property="path"/>
|
||||
<property name="ellipsize">middle</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="icon-name">edit-delete-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Clear</property>
|
||||
<signal name="clicked" handler="onClearButtonClicked" swapped="no"/>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkFileChooserNative" id="filechooser">
|
||||
<property name="modal">True</property>
|
||||
<property name="action">open</property>
|
||||
<property name="title" translatable="yes">Select your background image</property>
|
||||
<property name="select-multiple">False</property>
|
||||
<signal name="response" handler="onFileChooserResponse" swapped="no"/>
|
||||
<property name="filter">
|
||||
<object class="GtkFileFilter">
|
||||
<mime-types>
|
||||
<mime-type>image/jpeg</mime-type>
|
||||
<mime-type>image/png</mime-type>
|
||||
<mime-type>image/tiff</mime-type>
|
||||
<mime-type>application/xml</mime-type>
|
||||
</mime-types>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="BackgroundsPreferences" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch backgrounds</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Day background</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="BackgroundButton" id="day_button"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Night background</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="BackgroundButton" id="night_button"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="ClearableEntry" parent="GtkEntry">
|
||||
<property name="secondary-icon-name">edit-clear-symbolic</property>
|
||||
<property name="secondary-icon-activatable">True</property>
|
||||
<property name="secondary-icon-tooltip-text" translatable="yes">Clear</property>
|
||||
<signal name="icon-release" handler="onIconReleased" swapped="no"/>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="Commands" parent="GtkScrolledWindow">
|
||||
<property name="propagate-natural-height">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="scroll-to-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="width-request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Run commands</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Sunrise</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="ClearableEntry" id="sunrise_entry">
|
||||
<property name="placeholder-text" translatable="yes" comments="Don't translate the `notify-send` command.">notify-send "Hello sunshine!"</property>
|
||||
<property name="input-purpose">terminal</property>
|
||||
<property name="width-chars">28</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Sunset</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="ClearableEntry" id="sunset_entry">
|
||||
<property name="placeholder-text" translatable="yes" comments="Don't translate the `notify-send` command.">notify-send "Hello moonshine!"</property>
|
||||
<property name="input-purpose">terminal</property>
|
||||
<property name="width-chars">28</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="CursorPreferences" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch cursor theme variants</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Day variant</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="day_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Night variant</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="night_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="GtkPreferences" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch GTK theme variants</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Manual variants</property>
|
||||
<property name="subtitle"><![CDATA[You can manually set variants if the extension cannot automatically detect the day and night variants of your GTK theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.]]></property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkSwitch" id="manual_switch"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Day variant</property>
|
||||
<property name="sensitive" bind-source="manual_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="day_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Night variant</property>
|
||||
<property name="sensitive" bind-source="manual_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="night_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="Headerbar" parent="GtkHeaderBar">
|
||||
<signal name="notify::preferences" handler="onPreferencesChanged" swapped="no"/>
|
||||
<child type="start">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="icon-name">face-smile-big-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Support us</property>
|
||||
<property name="popover">
|
||||
<object class="GtkPopover">
|
||||
<style>
|
||||
<class name="support"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Support us</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton">
|
||||
<property name="uri">https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension</property>
|
||||
<style>
|
||||
<class name="gitlab"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkCenterBox">
|
||||
<child type="start">
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">nightthemeswitcher-code-symbolic</property>
|
||||
<property name="margin-end">12</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">View code on GitLab</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton">
|
||||
<property name="uri">https://hosted.weblate.org/engage/night-theme-switcher/</property>
|
||||
<style>
|
||||
<class name="weblate"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkCenterBox">
|
||||
<child type="start">
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">nightthemeswitcher-translate-symbolic</property>
|
||||
<property name="margin-end">12</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Translate on Weblate</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLinkButton">
|
||||
<property name="uri">https://liberapay.com/rmnvgr/donate</property>
|
||||
<style>
|
||||
<class name="liberapay"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkCenterBox">
|
||||
<child type="start">
|
||||
<object class="GtkImage">
|
||||
<property name="icon-name">nightthemeswitcher-support-symbolic</property>
|
||||
<property name="margin-end">12</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="center">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Donate on Liberapay</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="IconPreferences" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch icon theme variants</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Day variant</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="day_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Night variant</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="night_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="PreferenceRow" parent="GtkListBoxRow">
|
||||
<property name="activatable">False</property>
|
||||
<signal name="notify::subtitle" handler="onSubtitleChanged" swapped="no"/>
|
||||
<signal name="notify::activatable-widget" handler="onActivatableWidgetChanged" swapped="no"/>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">72</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" bind-source="PreferenceRow" bind-property="title"/>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="subtitle_label">
|
||||
<property name="visible">False</property>
|
||||
<property name="label" bind-source="PreferenceRow" bind-property="subtitle"/>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
<class name="caption"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="end_box">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="Preferences" parent="GtkStack">
|
||||
<property name="interpolate-size">True</property>
|
||||
<property name="vhomogeneous">True</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">schedule</property>
|
||||
<property name="title" translatable="yes">Schedule</property>
|
||||
<property name="icon-name">nightthemeswitcher-schedule-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="Schedule"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">appearance</property>
|
||||
<property name="title" translatable="yes">Appearance</property>
|
||||
<property name="icon-name">nightthemeswitcher-appearance-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="Appearance"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">commands</property>
|
||||
<property name="title" translatable="yes">Commands</property>
|
||||
<property name="icon-name">nightthemeswitcher-commands-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="Commands"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="PreferencesList" parent="GtkListBox">
|
||||
<signal name="row-activated" handler="onRowActivated" swapped="no"/>
|
||||
<property name="show-separators">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="activate-on-single-click">True</property>
|
||||
<style>
|
||||
<class name="rich-list"/>
|
||||
<class name="frame"/>
|
||||
</style>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="Schedule" parent="GtkScrolledWindow">
|
||||
<property name="propagate-natural-height">True</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="scroll-to-focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="width-request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Manual time source</property>
|
||||
<property name="subtitle" translatable="yes">The extension will try to use Night Light or Location Services to automatically set your current sunrise and sunset times if they are enabled. If you prefer, you can manually choose a time source.</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkSwitch" id="manual_time_source_switch"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Time source</property>
|
||||
<property name="sensitive" bind-source="manual_time_source_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="time_source_dropdown"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Always show on-demand controls</property>
|
||||
<property name="subtitle" translatable="yes">Allows you to override the current time when using a schedule.</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkSwitch" id="always_show_ondemand_switch"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="nightlight_preferences_revealer">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night Light</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes"><![CDATA[Follow <i>Disable until tomorrow</i>]]></property>
|
||||
<property name="subtitle" translatable="yes">When Night Light is temporarily disabled, the extension will switch to day variants.</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkSwitch" id="nightlight_follow_disable_switch"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="schedule_preferences_revealer">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Manual schedule times</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Sunrise</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="TimeChooser" id="schedule_sunrise_time_chooser"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Sunset</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="TimeChooser" id="schedule_sunset_time_chooser"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer" id="ondemand_preferences_revealer">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">On-demand</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Keyboard shortcut</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="ShortcutButton" id="ondemand_shortcut_button"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Button location</property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkComboBoxText" id="ondemand_button_location_combo">
|
||||
<property name="active-id">panel</property>
|
||||
<items>
|
||||
<item id="none" translatable="yes">None</item>
|
||||
<item id="panel" translatable="yes">Top bar</item>
|
||||
<item id="menu" translatable="yes">System menu</item>
|
||||
</items>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="ShellPreferences" parent="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch Shell theme variants</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="heading"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRevealer">
|
||||
<property name="reveal-child" bind-source="enabled_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<child>
|
||||
<object class="PreferencesList">
|
||||
<property name="margin-bottom">36</property>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Manual variants</property>
|
||||
<property name="subtitle"><![CDATA[You can manually set variants if the extension cannot automatically detect the day and night variants of your GNOME Shell theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.]]></property>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkSwitch" id="manual_switch"/>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Day variant</property>
|
||||
<property name="sensitive" bind-source="manual_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="day_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="PreferenceRow">
|
||||
<property name="title" translatable="yes">Night variant</property>
|
||||
<property name="sensitive" bind-source="manual_switch" bind-property="active" bind-flags="sync-create"/>
|
||||
<property name="activatable-widget">
|
||||
<object class="GtkDropDown" id="night_dropdown">
|
||||
<property name="enable-search">True</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="ShortcutButton" parent="GtkStack">
|
||||
<property name="hhomogeneous">False</property>
|
||||
<signal name="notify::keybinding" handler="onKeybindingChanged" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">choose</property>
|
||||
<property name="child">
|
||||
<object class="GtkButton" id="choose_button">
|
||||
<property name="label" translatable="yes">Choose…</property>
|
||||
<signal name="clicked" handler="onChooseButtonClicked" swapped="no"/>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">edit</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton" id="change_button">
|
||||
<property name="tooltip-text" translatable="yes">Change keyboard shortcut</property>
|
||||
<signal name="clicked" handler="onChangeButtonClicked" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkShortcutLabel">
|
||||
<property name="accelerator" bind-source="ShortcutButton" bind-property="keybinding"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="icon-name">edit-delete-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Clear</property>
|
||||
<signal name="clicked" handler="onClearButtonClicked" swapped="no"/>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkWindow" id="dialog">
|
||||
<property name="modal">True</property>
|
||||
<property name="default_width">440</property>
|
||||
<property name="default_height">200</property>
|
||||
<property name="hide-on-close">True</property>
|
||||
<property name="decorated">False</property>
|
||||
<style>
|
||||
<class name="toolbox"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkWindowHandle">
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkOverlay">
|
||||
<child type="overlay">
|
||||
<object class="GtkCenterBox">
|
||||
<property name="valign">start</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<child type="start">
|
||||
<object class="GtkWindowControls">
|
||||
<property name="side">start</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkWindowControls">
|
||||
<property name="side">end</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<property name="label" translatable="yes">Press your keyboard shortcut…</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="wrap">True</property>
|
||||
<style>
|
||||
<class name="large-title"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventControllerKey">
|
||||
<signal name="key-pressed" handler="onKeyPressed" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<template class="TimeChooser" parent="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">8</property>
|
||||
<signal name="notify::time" handler="onTimeChanged" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="hours">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="adjustment">hours_adjustment</property>
|
||||
<signal name="value-changed" handler="onValueChanged" swapped="no"/>
|
||||
<signal name="output" handler="onOutputChanged" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes" comments="Time separator (eg. 08:27)">:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="minutes">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="adjustment">minutes_adjustment</property>
|
||||
<signal name="value-changed" handler="onValueChanged" swapped="no"/>
|
||||
<signal name="output" handler="onOutputChanged" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkAdjustment" id="hours_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">23</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="minutes_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">59</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,201 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkFileFilter" id="image_filter">
|
||||
<mime-types>
|
||||
<mime-type>image/jpeg</mime-type>
|
||||
<mime-type>image/png</mime-type>
|
||||
<mime-type>image/tiff</mime-type>
|
||||
<mime-type>application/xml</mime-type>
|
||||
</mime-types>
|
||||
</object>
|
||||
<object class="GtkFileChooserNative" id="day_chooser">
|
||||
<property name="modal">1</property>
|
||||
<property name="action">open</property>
|
||||
<property name="title" translatable="yes">Select your background image</property>
|
||||
<property name="select-multiple">0</property>
|
||||
<property name="filter">image_filter</property>
|
||||
</object>
|
||||
<object class="GtkFileChooserNative" id="night_chooser">
|
||||
<property name="modal">1</property>
|
||||
<property name="action">open</property>
|
||||
<property name="title" translatable="yes">Select your background image</property>
|
||||
<property name="select-multiple">0</property>
|
||||
<property name="filter">image_filter</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="backgrounds">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch backgrounds</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="choosers">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Backgrounds</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Day background</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="day_chooser_button">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">Choose...</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="day_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="receives_default">1</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night background</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="night_chooser_button">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="label" translatable="yes">Choose...</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="night_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="receives_default">1</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox" id="commands">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Run commands</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can set custom commands that will be run when the time of the day changes.</small></property>
|
||||
<property name="use_markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="entries">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Commands</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Sunrise command</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="sunrise_entry">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width_chars">28</property>
|
||||
<property name="truncate_multiline">1</property>
|
||||
<property name="placeholder_text" translatable="yes">notify-send "Hello sunshine!"</property>
|
||||
<property name="input_purpose">terminal</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="sunrise_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Sunset command</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="sunset_entry">
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width_chars">28</property>
|
||||
<property name="truncate_multiline">1</property>
|
||||
<property name="placeholder_text" translatable="yes">notify-send "Hello moonshine!"</property>
|
||||
<property name="input_purpose">terminal</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="sunset_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox" id="cursor_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch cursor variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,203 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox" id="gtk_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch GTK variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="manual">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can manually set variants if the extension cannot automatically detect the day and night variants of your GTK theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.</small></property>
|
||||
<property name="use_markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="manual_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,214 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkHeaderBar" id="headerbar">
|
||||
<child type="title">
|
||||
<object class="GtkBox" id="switcher">
|
||||
<property name="homogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="schedule_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="active">1</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-schedule-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Schedule</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="gtk_theme_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-gtktheme-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">GTK theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="shell_theme_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-shelltheme-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Shell theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="icon_theme_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-icontheme-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Icon theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="cursor_theme_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-cursortheme-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Cursor theme</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="backgrounds_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-backgrounds-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Backgrounds</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="commands_radio">
|
||||
<property name="focus_on_click">0</property>
|
||||
<property name="group">schedule_radio</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin_top">4</property>
|
||||
<property name="margin_bottom">4</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="icon_name">nightthemeswitcher-commands-symbolic</property>
|
||||
<property name="icon_size">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Commands</property>
|
||||
<attributes>
|
||||
<attribute name="size" value="8192"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox" id="icon_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch icon variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkDialog" id="dialog">
|
||||
<property name="modal">1</property>
|
||||
<property name="default_width">440</property>
|
||||
<property name="default_height">200</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="label" translatable="yes">Press your keyboard shortcut...</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="title-widget">
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Keyboard shortcut</property>
|
||||
<property name="single-line-mode">1</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<property name="width-chars">5</property>
|
||||
<style>
|
||||
<class name="title"/>
|
||||
</style>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEventControllerKey" id="event-controller"/>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,599 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkAdjustment" id="sunrise_hours_adjustment">
|
||||
<property name="upper">23</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunrise_minutes_adjustment">
|
||||
<property name="upper">59</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunset_hours_adjustment">
|
||||
<property name="upper">23</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="sunset_minutes_adjustment">
|
||||
<property name="upper">59</property>
|
||||
<property name="step-increment">1</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="schedule">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin-start">36</property>
|
||||
<property name="margin-end">36</property>
|
||||
<property name="margin-top">36</property>
|
||||
<property name="margin-bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline-position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="general">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Automatic time source</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>The extension will try to use Night Light or Location Services to automatically set your current sunrise and sunset times if they are enabled. If you prefer, you can manually choose a time source.</small></property>
|
||||
<property name="use-markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="auto_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
<property name="can-focus">0</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Always show on-demand controls</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>This allows you to override the current time when using a schedule.</small></property>
|
||||
<property name="use-markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="always_enable_ondemand_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="manual">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual time source</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="homogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="manual_nightlight_radio">
|
||||
<property name="label" translatable="yes">Night Light</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="manual_location_radio">
|
||||
<property name="label" translatable="yes">Location Services</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="manual_schedule_radio">
|
||||
<property name="label" translatable="yes">Manual schedule</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="manual_ondemand_radio">
|
||||
<property name="label" translatable="yes">On-demand</property>
|
||||
<property name="group">manual_nightlight_radio</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="manual_prefs_stack">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="vhomogeneous">0</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<property name="interpolate-size">1</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">none</property>
|
||||
<property name="title" translatable="yes">No preferences</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="none">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">nightlight</property>
|
||||
<property name="title" translatable="yes">Night Light</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="nightlight">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Night Light</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Follow <i>Disable until tomorrow</i></property>
|
||||
<property name="use-markup">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>When Night Light is temporarily disabled, the extension will switch to day variants.</small></property>
|
||||
<property name="use-markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="nightlight_follow_disable_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">schedule_times</property>
|
||||
<property name="title" translatable="yes">Manual schedule times</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="schedule_times">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual schedule times</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">Sunrise</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunrise_hours_spin">
|
||||
<property name="width-chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunrise_hours_adjustment</property>
|
||||
<property name="numeric">1</property>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunrise_minutes_spin">
|
||||
<property name="width-chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunrise_minutes_adjustment</property>
|
||||
<property name="numeric">1</property>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
<property name="can-focus">0</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">Sunset</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunset_hours_spin">
|
||||
<property name="width-chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunset_hours_adjustment</property>
|
||||
<property name="numeric">1</property>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">:</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="schedule_times_sunset_minutes_spin">
|
||||
<property name="width-chars">2</property>
|
||||
<property name="text">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">sunset_minutes_adjustment</property>
|
||||
<property name="numeric">1</property>
|
||||
<property name="wrap">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="ondemand">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">On-demand</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width-request">600</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">Keyboard shortcut</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="can-focus">0</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="ondemand_shortcut_button">
|
||||
<property name="label" translatable="yes">Choose</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ondemand_shortcut_clear_button">
|
||||
<property name="label" translatable="yes">Clear</property>
|
||||
<property name="receives-default">1</property>
|
||||
<style>
|
||||
<class name="destructive-action"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
<property name="can-focus">0</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="margin-start">16</property>
|
||||
<property name="margin-end">16</property>
|
||||
<property name="margin-top">16</property>
|
||||
<property name="margin-bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="can-focus">0</property>
|
||||
<property name="label" translatable="yes">Button location</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="ondemand_button_placement_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="can-focus">0</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="active">1</property>
|
||||
<property name="active-id">panel</property>
|
||||
<items>
|
||||
<item id="none" translatable="yes">None</item>
|
||||
<item id="panel" translatable="yes">Top bar</item>
|
||||
<item id="menu" translatable="yes">System menu</item>
|
||||
</items>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,200 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
<interface domain="nightthemeswitcher@romainvigier.fr">
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="GtkBox" id="shell_theme">
|
||||
<property name="width_request">600</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="margin_start">36</property>
|
||||
<property name="margin_end">36</property>
|
||||
<property name="margin_top">36</property>
|
||||
<property name="margin_bottom">36</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">30</property>
|
||||
<property name="baseline_position">top</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="enabled">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Switch Shell variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="enabled_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="manual">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="valign">center</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes"><small>You can manually set variants if the extension cannot automatically detect the day and night variants of your GNOME Shell theme. Please <a href="https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/-/issues">submit a request</a> to get your theme supported.</small></property>
|
||||
<property name="use_markup">1</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max_width_chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="manual_switch">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="variants">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Manual variants</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"></attribute>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="child">
|
||||
<object class="GtkListBox">
|
||||
<property name="width_request">600</property>
|
||||
<property name="selection_mode">none</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Day variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="day_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="selectable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkSeparator">
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="activatable">0</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="margin_start">16</property>
|
||||
<property name="margin_end">16</property>
|
||||
<property name="margin_top">16</property>
|
||||
<property name="margin_bottom">16</property>
|
||||
<property name="spacing">30</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Night variant</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="night_combo">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2020, 2021 Romain Vigier <contact AT romainvigier.fr>
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
window.nightthemeswitcher,
|
||||
window.toolbox
|
||||
{
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar
|
||||
{
|
||||
background: #000;
|
||||
color: alpha(#fff, 0.9);
|
||||
border: none;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar button
|
||||
{
|
||||
background: alpha(#fff, 0.2);
|
||||
color: inherit;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
transition: all 200ms;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar button.close
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar button:hover
|
||||
{
|
||||
background: alpha(#fff, 0.3);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar button:active
|
||||
{
|
||||
background: alpha(#fff, 0.4);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar button:checked
|
||||
{
|
||||
background: alpha(#fff, 0.1);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar .linked button.toggle
|
||||
{
|
||||
border-right: 1px solid alpha(#000, 0.4);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher headerbar .linked button.toggle:last-child
|
||||
{
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher list.frame
|
||||
{
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher list.frame row:last-child
|
||||
{
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button
|
||||
{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.gitlab
|
||||
{
|
||||
background-color: rgba(250, 112, 53, 1);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.gitlab:hover
|
||||
{
|
||||
background-color: rgba(250, 112, 53, 1);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.liberapay
|
||||
{
|
||||
background-color: rgba(246, 201, 21, 0.8);
|
||||
color: #1a171b;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.liberapay:hover
|
||||
{
|
||||
background-color: rgba(246, 201, 21, 1);
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.weblate
|
||||
{
|
||||
background-color: rgba(46, 204, 170, 0.8);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
window.nightthemeswitcher .support button.weblate:hover
|
||||
{
|
||||
background-color: rgba(46, 204, 170, 1);
|
||||
}
|
||||
@@ -8,7 +8,7 @@ const { extensionUtils } = imports.misc;
|
||||
|
||||
const Me = extensionUtils.getCurrentExtension();
|
||||
|
||||
const { utils } = Me.imports;
|
||||
const { Headerbar } = Me.imports.preferences.Headerbar;
|
||||
const { Preferences } = Me.imports.preferences.Preferences;
|
||||
|
||||
|
||||
@@ -16,9 +16,14 @@ const { Preferences } = Me.imports.preferences.Preferences;
|
||||
* Initialize the preferences.
|
||||
*/
|
||||
function init() {
|
||||
extensionUtils.initTranslations(Me.metadata.uuid);
|
||||
extensionUtils.initTranslations();
|
||||
|
||||
const iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default());
|
||||
iconTheme.add_search_path(GLib.build_filenamev([Me.path, 'icons']));
|
||||
|
||||
const styleProvider = new Gtk.CssProvider();
|
||||
styleProvider.load_from_path(GLib.build_filenamev([Me.path, 'preferences', 'ui', 'style.css']));
|
||||
Gtk.StyleContext.add_provider_for_display(Gdk.Display.get_default(), styleProvider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,8 +32,10 @@ function init() {
|
||||
function buildPrefsWidget() {
|
||||
const preferences = new Preferences();
|
||||
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
|
||||
const window = preferences.widget.get_root();
|
||||
window.set_titlebar(preferences.headerbar);
|
||||
const window = preferences.get_root();
|
||||
window.add_css_class('nightthemeswitcher');
|
||||
const headerbar = new Headerbar({ preferences });
|
||||
window.set_titlebar(headerbar);
|
||||
});
|
||||
return preferences.widget;
|
||||
return preferences;
|
||||
}
|
||||
|
||||
@@ -295,3 +295,19 @@ function findShellAggregateMenuItemPosition(menuItem) {
|
||||
const items = menu._getMenuItems();
|
||||
return items.indexOf(menuItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find an item in a `Gio.ListModel`.
|
||||
*
|
||||
* @param {Gio.ListModel} model The ListModel to search.
|
||||
* @param {Function} findFunction The function used to find the item. Gets the item as argument.
|
||||
* @returns {(*|undefined)} The found item or `undefined`.
|
||||
*/
|
||||
function findItemPositionInModel(model, findFunction) {
|
||||
const nItems = model.get_n_items();
|
||||
for (let i = 0; i < nItems; i++) {
|
||||
if (findFunction(model.get_item(i)))
|
||||
return i;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||