Skip to content

Commit

Permalink
Merge pull request #130380 from bobby285271/switchboard
Browse files Browse the repository at this point in the history
Pantheon 6.0.2
  • Loading branch information
davidak authored Sep 18, 2021
2 parents 84258de + 1b16dbe commit 69f341a
Show file tree
Hide file tree
Showing 115 changed files with 1,764 additions and 1,581 deletions.
18 changes: 14 additions & 4 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
actions.
</para>
</listitem>
<listitem>
<para>
Pantheon desktop has been updated to version 6. Due to changes
of screen locker, if locking doesn’t work for you, please try
<literal>gsettings set org.gnome.desktop.lockdown disable-lock-screen false</literal>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-new-services">
Expand Down Expand Up @@ -189,8 +196,6 @@
<link linkend="opt-services.isso.enable">isso</link>
</para>
</listitem>
</itemizedlist>
<itemizedlist spacing="compact">
<listitem>
<para>
<link xlink:href="https://www.navidrome.org/">navidrome</link>,
Expand All @@ -199,8 +204,6 @@
<link linkend="opt-services.navidrome.enable">navidrome</link>.
</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>
<link xlink:href="https://docs.fluidd.xyz/">fluidd</link>, a
Expand Down Expand Up @@ -263,6 +266,13 @@
unified analytics engine for large-scale data processing.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/JoseExposito/touchegg">touchegg</link>,
a multi-touch gesture recognizer. Available as
<link linkend="opt-services.touchegg.enable">services.touchegg</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-incompatibilities">
Expand Down
6 changes: 5 additions & 1 deletion nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ In addition to numerous new and upgraded packages, this release has the followin
This allows activation scripts to output what they would change if the activation was really run.
The users/modules activation script supports this and outputs some of is actions.

- Pantheon desktop has been updated to version 6. Due to changes of screen locker, if locking doesn't work for you, please try `gsettings set org.gnome.desktop.lockdown disable-lock-screen false`.

## New Services {#sec-release-21.11-new-services}

- [btrbk](https://digint.ch/btrbk/index.html), a backup tool for btrfs subvolumes, taking advantage of btrfs specific capabilities to create atomic snapshots and transfer them incrementally to your backup locations. Available as [services.btrbk](options.html#opt-services.brtbk.instances).
Expand Down Expand Up @@ -60,7 +62,7 @@ pt-services.clipcat.enable).
- [isso](https://posativ.org/isso/), a commenting server similar to Disqus.
Available as [isso](#opt-services.isso.enable)

* [navidrome](https://www.navidrome.org/), a personal music streaming server with
- [navidrome](https://www.navidrome.org/), a personal music streaming server with
subsonic-compatible api. Available as [navidrome](#opt-services.navidrome.enable).

- [fluidd](https://docs.fluidd.xyz/), a Klipper web interface for managing 3d printers using moonraker. Available as [fluidd](#opt-services.fluidd.enable).
Expand All @@ -82,6 +84,8 @@ subsonic-compatible api. Available as [navidrome](#opt-services.navidrome.enable

- [spark](https://spark.apache.org/), a unified analytics engine for large-scale data processing.

- [touchegg](https://github.com/JoseExposito/touchegg), a multi-touch gesture recognizer. Available as [services.touchegg](#opt-services.touchegg.enable).

## Backward Incompatibilities {#sec-release-21.11-incompatibilities}


Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@
./services/x11/gdk-pixbuf.nix
./services/x11/imwheel.nix
./services/x11/redshift.nix
./services/x11/touchegg.nix
./services/x11/urserver.nix
./services/x11/urxvtd.nix
./services/x11/window-managers/awesome.nix
Expand Down
26 changes: 16 additions & 10 deletions nixos/modules/services/x11/desktop-managers/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ in
services.accounts-daemon.enable = true;
services.bamf.enable = true;
services.colord.enable = mkDefault true;
services.fwupd.enable = mkDefault true;
services.touchegg.enable = mkDefault true;
services.touchegg.package = pkgs.pantheon.touchegg;
services.tumbler.enable = mkDefault true;
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
services.dbus.packages = with pkgs.pantheon; [
Expand Down Expand Up @@ -162,12 +165,11 @@ in
isAllowed = true;
isSystem = true;
};
# Use gnome-settings-daemon fork
services.udev.packages = [
pkgs.pantheon.elementary-settings-daemon
pkgs.gnome.gnome-settings-daemon338
];
systemd.packages = [
pkgs.pantheon.elementary-settings-daemon
pkgs.gnome.gnome-settings-daemon338
];
programs.dconf.enable = true;
networking.networkmanager.enable = mkDefault true;
Expand All @@ -180,7 +182,6 @@ in
gnome.adwaita-icon-theme
gtk3.out
hicolor-icon-theme
lightlocker
onboard
qgnomeplatform
shared-mime-info
Expand Down Expand Up @@ -208,25 +209,26 @@ in

# Services
elementary-capnet-assist
elementary-dpms-helper
elementary-notifications
elementary-settings-daemon
pantheon-agent-geoclue2
pantheon-agent-polkit
]) ++ (gnome.removePackagesByName [
gnome.geary
gnome.epiphany
gnome.gnome-font-viewer
gnome.gnome-settings-daemon338
] config.environment.pantheon.excludePackages);

programs.evince.enable = mkDefault true;
programs.file-roller.enable = mkDefault true;

# Settings from elementary-default-settings
environment.sessionVariables.GTK_CSD = "1";
environment.sessionVariables.GTK3_MODULES = [ "pantheon-filechooser-module" ];
environment.etc."gtk-3.0/settings.ini".source = "${pkgs.pantheon.elementary-default-settings}/etc/gtk-3.0/settings.ini";

xdg.portal.extraPortals = [
pkgs.pantheon.elementary-files
];

# Override GSettings schemas
environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";

Expand Down Expand Up @@ -254,6 +256,8 @@ in

# Default Fonts
fonts.fonts = with pkgs; [
inter
open-dyslexic
open-sans
roboto-mono
];
Expand All @@ -271,14 +275,16 @@ in
elementary-camera
elementary-code
elementary-files
elementary-mail
elementary-music
elementary-photos
elementary-screenshot-tool
elementary-screenshot
elementary-terminal
elementary-videos
epiphany
] config.environment.pantheon.excludePackages);

# needed by screenshot-tool
# needed by screenshot
fonts.fonts = [
pkgs.pantheon.elementary-redacted-script
];
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/x11/desktop-managers/pantheon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<programlisting>
<xref linkend="opt-services.pantheon.apps.enable"/> = false;
</programlisting>
You can also use <xref linkend="opt-environment.pantheon.excludePackages"/> to remove any other app (like <package>geary</package>).
You can also use <xref linkend="opt-environment.pantheon.excludePackages"/> to remove any other app (like <package>elementary-mail</package>).
</para>
</section>
<section xml:id="sec-pantheon-wingpanel-switchboard">
Expand Down
38 changes: 38 additions & 0 deletions nixos/modules/services/x11/touchegg.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }:

with lib;

let cfg = config.services.touchegg;

in {
meta = {
maintainers = teams.pantheon.members;
};

###### interface
options.services.touchegg = {
enable = mkEnableOption "touchegg, a multi-touch gesture recognizer";

package = mkOption {
type = types.package;
default = pkgs.touchegg;
defaultText = "pkgs.touchegg";
description = "touchegg derivation to use.";
};
};

###### implementation
config = mkIf cfg.enable {
systemd.services.touchegg = {
description = "Touchegg Daemon";
serviceConfig = {
Type = "simple";
ExecStart = "${cfg.package}/bin/touchegg --daemon";
Restart = "on-failure";
};
wantedBy = [ "multi-user.target" ];
};

environment.systemPackages = [ cfg.package ];
};
}
4 changes: 2 additions & 2 deletions nixos/tests/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import ./make-test-python.nix ({ pkgs, ...} :
with subtest("Check if pantheon session components actually start"):
machine.wait_until_succeeds("pgrep gala")
machine.wait_for_window("gala")
machine.wait_until_succeeds("pgrep wingpanel")
machine.wait_for_window("wingpanel")
machine.wait_until_succeeds("pgrep -f io.elementary.wingpanel")
machine.wait_for_window("io.elementary.wingpanel")
machine.wait_until_succeeds("pgrep plank")
machine.wait_for_window("plank")
Expand Down
76 changes: 76 additions & 0 deletions pkgs/desktops/gnome/core/epiphany/dark-style.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
diff --git a/meson.build b/meson.build
index de9cbfa850..647f617605 100644
--- a/meson.build
+++ b/meson.build
@@ -92,6 +92,7 @@ iso_codes_dep = dependency('iso-codes', version: '>= 0.35')
json_glib_dep = dependency('json-glib-1.0', version: '>= 1.6')
libarchive_dep = dependency('libarchive')
libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.37.1')
+libgranite_dep = dependency('granite', version: '>= 6.0.0')
libhandy_dep = dependency('libhandy-1', version: '>= 1.1.0')
libsecret_dep = dependency('libsecret-1', version: '>= 0.19.0')
libsoup_dep = dependency('libsoup-2.4', version: '>= 2.48.0')
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 650531da86..b9d1355e86 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -50,6 +50,7 @@

#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <granite.h>
#include <handy.h>

struct _EphyShell {
@@ -483,6 +484,20 @@ run_in_background_set_mapping (const GValue *value,
return g_variant_new_boolean (g_variant_get_boolean (var));
}

+static void
+ephy_shell_set_prefers_color_scheme (EphyShell *shell)
+{
+ GtkSettings* gtk_settings = gtk_settings_get_default ();
+ GraniteSettings* granite_settings = granite_settings_get_default ();
+
+ g_object_set (
+ gtk_settings,
+ "gtk-application-prefer-dark-theme",
+ granite_settings_get_prefers_color_scheme (granite_settings) == GRANITE_SETTINGS_COLOR_SCHEME_DARK,
+ NULL
+ );
+}
+
static void
ephy_shell_startup (GApplication *application)
{
@@ -490,11 +505,18 @@ ephy_shell_startup (GApplication *application)
EphyShell *shell = EPHY_SHELL (application);
EphyEmbedShellMode mode;
GAction *action;
+ GraniteSettings* granite_settings = granite_settings_get_default ();

G_APPLICATION_CLASS (ephy_shell_parent_class)->startup (application);

hdy_init ();

+ ephy_shell_set_prefers_color_scheme (shell);
+
+ g_signal_connect (granite_settings, "notify::prefers-color-scheme",
+ G_CALLBACK (ephy_shell_set_prefers_color_scheme), shell
+ );
+
/* If we are under Pantheon set the icon-theme and cursor-theme accordingly. */
if (is_desktop_pantheon ()) {
GtkSettings *settings = gtk_settings_get_default ();
diff --git a/src/meson.build b/src/meson.build
index 5bf3eb92ec..d17b1b6d93 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -74,6 +74,7 @@ libephymain_deps = [
gdk_dep,
gvdb_dep,
libarchive_dep,
+ libgranite_dep,
libhandy_dep
]

13 changes: 11 additions & 2 deletions pkgs/desktops/gnome/core/epiphany/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
, icu
, wrapGAppsHook
, gnome
, pantheon
, libportal
, libxml2
, libxslt
Expand All @@ -33,6 +34,7 @@
, libdazzle
, libhandy
, buildPackages
, withPantheon ? false
}:

stdenv.mkDerivation rec {
Expand All @@ -44,6 +46,13 @@ stdenv.mkDerivation rec {
sha256 = "2tE4ufLVXeJxEo/KOLYfU/2YDFh9KeG6a1CP/zsZ9WQ=";
};

patches = lib.optionals withPantheon [
# https://github.com/elementary/browser
# FIXME: Update the patches when https://github.com/elementary/browser/pull/41 merged
./dark-style.patch
./navigation-buttons.patch
];

nativeBuildInputs = [
desktop-file-utils
gettext
Expand Down Expand Up @@ -87,7 +96,7 @@ stdenv.mkDerivation rec {
p11-kit
sqlite
webkitgtk
];
] ++ lib.optional withPantheon pantheon.granite;

# Tests need an X display
mesonFlags = [
Expand All @@ -108,7 +117,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://wiki.gnome.org/Apps/Epiphany";
description = "WebKit based web browser for GNOME";
maintainers = teams.gnome.members;
maintainers = teams.gnome.members ++ teams.pantheon.members;
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
Expand Down
12 changes: 12 additions & 0 deletions pkgs/desktops/gnome/core/epiphany/navigation-buttons.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/resources/gtk/action-bar-start.ui b/src/resources/gtk/action-bar-start.ui
index e604b9601f..2bfe244d53 100644
--- a/src/resources/gtk/action-bar-start.ui
+++ b/src/resources/gtk/action-bar-start.ui
@@ -7,7 +7,6 @@
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<style>
- <class name="linked"/>
<class name="navigation-box"/>
</style>
<child>
Loading

0 comments on commit 69f341a

Please sign in to comment.