From fabc1199551edb8d6f9ceab9fef94881a3a2f4dd Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Sat, 31 Jul 2021 12:35:36 +0200 Subject: [PATCH] Try gdm background --- nixos/machines/apollo/configuration.nix | 11 +- nixos/machines/zeus/configuration.nix | 11 +- overlays/gnome-shell/default.nix | 17 ++ ...hell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch | 153 ++++++++++++++++++ 4 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 overlays/gnome-shell/default.nix create mode 100644 overlays/gnome-shell/gnome-shell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch diff --git a/nixos/machines/apollo/configuration.nix b/nixos/machines/apollo/configuration.nix index 503ca3ba..efe12830 100644 --- a/nixos/machines/apollo/configuration.nix +++ b/nixos/machines/apollo/configuration.nix @@ -132,7 +132,16 @@ in }; gdm.enable = true; }; - desktopManager.gnome.enable = true; + desktopManager.gnome = { + enable = true; + extraGSettingsOverrides = '' + [com.ubuntu.login-screen] + background-repeat='no-repeat' + background-size='cover' + background-color='#0000ee' + background-picture-uri='file:///home/maralorn/media/images/wallpapers/orga/gdm.jpg' + ''; + }; }; gnome = { evolution-data-server.enable = lib.mkForce false; diff --git a/nixos/machines/zeus/configuration.nix b/nixos/machines/zeus/configuration.nix index 4d249e49..abb86f75 100644 --- a/nixos/machines/zeus/configuration.nix +++ b/nixos/machines/zeus/configuration.nix @@ -180,7 +180,16 @@ in }; gdm.enable = true; }; - desktopManager.gnome.enable = true; + desktopManager.gnome = { + enable = true; + extraGSettingsOverrides = '' + [com.ubuntu.login-screen] + background-repeat='no-repeat' + background-size='cover' + background-color='#0000ff' + background-picture-uri='file:///disk/persist/maralorn/media/images/wallpapers/orga/gdm.jpg' + ''; + }; }; gnome = { evolution-data-server.enable = lib.mkForce false; diff --git a/overlays/gnome-shell/default.nix b/overlays/gnome-shell/default.nix new file mode 100644 index 00000000..c06a0d68 --- /dev/null +++ b/overlays/gnome-shell/default.nix @@ -0,0 +1,17 @@ +self: super: { + gnome = super.gnome.overrideScope' ( + selfg: superg: { + gnome-shell = superg.gnome-shell.overrideAttrs ( + old: { + patches = (old.patches or [ ]) ++ [ + ( + self.substituteAll { + src = ./gnome-shell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch; + } + ) + ]; + } + ); + } + ); +} diff --git a/overlays/gnome-shell/gnome-shell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch b/overlays/gnome-shell/gnome-shell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch new file mode 100644 index 00000000..cdb2b98c --- /dev/null +++ b/overlays/gnome-shell/gnome-shell_3.38.3-3ubuntu1_3.38.3-3ubuntu2.patch @@ -0,0 +1,153 @@ +--- /dev/null ++++ gnome-shell-3.38.3/data/com.ubuntu.login-screen.gschema.xml.in +@@ -0,0 +1,70 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ '' ++ ++ Sets the background image for the login screen. ++ ++ ++ URI to use for the background image. Note that the backend only ++ supports local (file://) URIs. ++ It overrides the value defined in the default style sheet. ++ ++ ++ ++ '' ++ ++ The background-color property sets the background color. ++ ++ ++ The background-color property sets the background color to use when ++ the background picture URI is missing or when it doesn't cover the whole background. ++ It overrides the value defined in the default style sheet. ++ ++ ++ ++ 'default' ++ ++ The background-repeat property sets if/how the background image will be repeated. ++ ++ ++ The background-repeat property sets if/how a background image will be repeated. ++ By default, a background-image is repeated both vertically and horizontally. ++ ++ It overrides the value defined in the default style sheet. ++ ++ ++ ++ 'default' ++ ++ The background-size property specifies the size of the background image. ++ ++ ++ The background-size property specifies the size of the background images. ++ ++ There are three keywords you can use with this property: ++ auto: The background image is displayed in its original size; ++ cover: Resize the background image to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges; ++ contain: Resize the background image to make sure the image is fully visible. ++ ++ It overrides the value defined in the default style sheet. ++ ++ ++ ++ +--- gnome-shell-3.38.3.orig/data/meson.build ++++ gnome-shell-3.38.3/data/meson.build +@@ -85,6 +85,12 @@ schema = configure_file( + configuration: schemaconf, + install_dir: schemadir + ) ++schemaubuntu = configure_file( ++ input: 'com.ubuntu.login-screen.gschema.xml.in', ++ output: 'com.ubuntu.login-screen.gschema.xml', ++ configuration: schemaconf, ++ install_dir: schemadir ++) + install_data('00_org.gnome.shell.gschema.override', install_dir: schemadir) + + overrides_migration_conf = configuration_data() +@@ -122,7 +128,7 @@ endif + + # for unit tests - gnome.compile_schemas() only looks in srcdir + custom_target('compile-schemas', +- input: schema, ++ input: [schema, schemaubuntu], + output: 'gschemas.compiled', + command: [find_program('glib-compile-schemas'), meson.current_build_dir()], + build_by_default: true) +--- gnome-shell-3.38.3.orig/js/ui/screenShield.js ++++ gnome-shell-3.38.3/js/ui/screenShield.js +@@ -26,6 +26,12 @@ const DISABLE_LOCK_KEY = 'disable-lock-s + + const LOCKED_STATE_STR = 'screenShield.locked'; + ++const LOGINSCREEN_SCHEMA = 'com.ubuntu.login-screen'; ++const LOGINSCREEN_BACKGROUND_COLOR_KEY = 'background-color'; ++const LOGINSCREEN_BACKGROUND_PICTURE_URI_KEY = 'background-picture-uri'; ++const LOGINSCREEN_BACKGROUND_REPEAT_KEY = 'background-repeat'; ++const LOGINSCREEN_BACKGROUND_SIZE_KEY = 'background-size'; ++ + // ScreenShield animation time + // - STANDARD_FADE_TIME is used when the session goes idle + // - MANUAL_FADE_TIME is used for lowering the shield when asked by the user, +@@ -119,6 +125,13 @@ var ScreenShield = class { + this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA }); + this._lockSettings.connect('changed::%s'.format(DISABLE_LOCK_KEY), this._syncInhibitor.bind(this)); + ++ this._loginscreenSettings = new Gio.Settings({ schema_id: LOGINSCREEN_SCHEMA }); ++ this._loginscreenSettings.connect('changed::%s'.format(LOGINSCREEN_BACKGROUND_COLOR_KEY), this._refreshBackground.bind(this)); ++ this._loginscreenSettings.connect('changed::%s'.format(LOGINSCREEN_BACKGROUND_PICTURE_URI_KEY), this._refreshBackground.bind(this)); ++ this._loginscreenSettings.connect('changed::%s'.format(LOGINSCREEN_BACKGROUND_REPEAT_KEY), this._refreshBackground.bind(this)); ++ this._loginscreenSettings.connect('changed::%s'.format(LOGINSCREEN_BACKGROUND_SIZE_KEY), this._refreshBackground.bind(this)); ++ this._refreshBackground() ++ + this._isModal = false; + this._isGreeter = false; + this._isActive = false; +@@ -196,6 +209,26 @@ var ScreenShield = class { + return this._isModal; + } + ++ _refreshBackground() { ++ let inline_style = []; ++ ++ let backgroundColor = this._loginscreenSettings.get_string(LOGINSCREEN_BACKGROUND_COLOR_KEY); ++ let backgroundPictureUri = this._loginscreenSettings.get_string(LOGINSCREEN_BACKGROUND_PICTURE_URI_KEY); ++ let backgroundRepeat = this._loginscreenSettings.get_string(LOGINSCREEN_BACKGROUND_REPEAT_KEY); ++ let backgroundSize = this._loginscreenSettings.get_string(LOGINSCREEN_BACKGROUND_SIZE_KEY); ++ ++ if (backgroundColor != "") ++ inline_style.push("background-color: " + backgroundColor); ++ if (backgroundPictureUri != "") ++ inline_style.push("background-image: url(" + backgroundPictureUri + ")"); ++ if (backgroundRepeat != "default") ++ inline_style.push("background-repeat: " + backgroundRepeat); ++ if (backgroundSize != "default") ++ inline_style.push("background-size: " + backgroundSize); ++ ++ this._lockDialogGroup.set_style(inline_style.join('; ')); ++ } ++ + _syncInhibitor() { + let lockEnabled = this._settings.get_boolean(LOCK_ENABLED_KEY) || + this._settings.get_boolean(SUSPEND_LOCK_ENABLED_KEY);