diff --git a/README.md b/README.md index 4ffc056c..ae93621d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Have questions or comments? Please ask on our [Github Discussions](https://gith Clone the repo and check out the branch for the Gnome Shell version you're running: -- 45-46 (currently developed/supported): https://github.com/paperwm/PaperWM/tree/release +- 45-47 (currently developed/supported): https://github.com/paperwm/PaperWM/tree/release - 42-44 ([EOL](https://release.gnome.org/calendar/#releases)): https://github.com/paperwm/PaperWM/tree/gnome-44 - 40-41 ([EOL](https://release.gnome.org/calendar/#releases)): https://github.com/paperwm/PaperWM/tree/gnome-40 - 3.28-3.38 ([EOL](https://release.gnome.org/calendar/#releases)): https://github.com/paperwm/PaperWM/tree/gnome-3.38 diff --git a/background.js b/background.js index ea634c91..dd59eaa3 100644 --- a/background.js +++ b/background.js @@ -2,13 +2,13 @@ * This is a copy and modification of Gnome shell's background.js (keeping only the * relevant parts). * - * This was done since `Background` class isn't exported in Gnome 45, and we use the + * This was done since `Background` class isn't exported in Gnome 47, and we use the * `Background` to add support for animated wallpapers in PaperWM spaces * (we previously used Meta.Background but it doesn't support animated wallpapers). * - * See https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/45.0/js/ui/background.js + * See https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/449a7a13034d507cd8b6776c8e1a021264c8bf41/js/ui/background.js */ -import Clutter from 'gi://Clutter'; +import Cogl from 'gi://Cogl'; import GDesktopEnums from 'gi://GDesktopEnums'; import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; @@ -23,6 +23,8 @@ import * as LoginManager from 'resource:///org/gnome/shell/misc/loginManager.js' import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as Params from 'resource:///org/gnome/shell/misc/params.js'; +import { Utils } from './imports.js'; + const PRIMARY_COLOR_KEY = 'primary-color'; const SECONDARY_COLOR_KEY = 'secondary-color'; const COLOR_SHADING_TYPE_KEY = 'color-shading-type'; @@ -266,9 +268,9 @@ export const Background = GObject.registerClass({ let colorString, res_, color, secondColor; colorString = this._settings.get_string(PRIMARY_COLOR_KEY); - [res_, color] = Clutter.Color.from_string(colorString); + [res_, color] = Utils.color_from_string(colorString); colorString = this._settings.get_string(SECONDARY_COLOR_KEY); - [res_, secondColor] = Clutter.Color.from_string(colorString); + [res_, secondColor] = Utils.color_from_string(colorString); let shadingType = this._settings.get_enum(COLOR_SHADING_TYPE_KEY); diff --git a/config/user.css b/config/user.css index 941724db..dc0bcb8e 100644 --- a/config/user.css +++ b/config/user.css @@ -33,6 +33,12 @@ DEFAULT STYLES ARE PROVIDED BELOW FOR REFERENCE: background-color: transparent; } +.open-position-icon { + icon-size: 22px; + padding: 0; + background-color: transparent; +} + .focus-button-tooltip { background-color: rgba(0, 0, 0, 0.8); padding: 8px; @@ -40,6 +46,12 @@ DEFAULT STYLES ARE PROVIDED BELOW FOR REFERENCE: font-weight: 600; } +.take-window-hint { + background-color: rgba(0, 0, 0, 0.8); + padding: 8px; + border-radius: 8px; +} + .workspace-icon-button { -st-icon-style: symbolic; border: none; @@ -55,6 +67,11 @@ DEFAULT STYLES ARE PROVIDED BELOW FOR REFERENCE: border-radius: 8px; } +.paperwm-clone-shade { + background-color: rgba(0, 0, 0, 0.7); + border-radius: 7px 7px 0px 0px; +} + .paperwm-window-position-bar-backdrop { background-color: rgba(0, 0, 0, 0.35); } diff --git a/liveAltTab.js b/liveAltTab.js index 20a48a4c..cb8ee71d 100644 --- a/liveAltTab.js +++ b/liveAltTab.js @@ -6,7 +6,7 @@ import GObject from 'gi://GObject'; import * as Main from 'resource:///org/gnome/shell/ui/main.js'; import * as AltTab from 'resource:///org/gnome/shell/ui/altTab.js'; -import { Settings, Keybindings, Tiling, Scratch } from './imports.js'; +import { Settings, Keybindings, Tiling, Scratch, Utils } from './imports.js'; import { Easer } from './utils.js'; let switcherSettings; @@ -66,7 +66,7 @@ export const LiveAltTab = GObject.registerClass( let fog = new Clutter.Actor({ x: workArea.x, y: workArea.y, width: workArea.width, height: workArea.height, - opacity: 0, background_color: Clutter.color_from_string("black")[1], + opacity: 0, background_color: Utils.color_from_string("black")[1], }); // this.blur = new Clutter.BlurEffect(); diff --git a/metadata.json b/metadata.json index 98e8ea3e..6db9063c 100644 --- a/metadata.json +++ b/metadata.json @@ -4,8 +4,8 @@ "description": "Tiling window manager with a twist", "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", - "shell-version": [ "45", "46" ], - "version-name": "46.17.1", + "shell-version": [ "45", "46", "47" ], + "version-name": "47.0.0", "donations": { "buymeacoffee": "jaytaala", "patreon": "valpackett" diff --git a/navigator.js b/navigator.js index 6cfae094..fa79b1ca 100644 --- a/navigator.js +++ b/navigator.js @@ -72,7 +72,7 @@ class ActionDispatcher { console.debug("#dispatch", "created"); this.signals = new Utils.Signals(); this.actor = Tiling.spaces.spaceContainer; - this.actor.set_flags(Clutter.ActorFlags.REACTIVE); + this.actor.reactive = true; this.navigator = getNavigator(); if (grab) { @@ -279,7 +279,7 @@ class ActionDispatcher { console.debug("Failed to release grab: ", e); } - this.actor.unset_flags(Clutter.ActorFlags.REACTIVE); + this.actor.reactive = false; this.signals.destroy(); this.signals = null; // We have already destroyed the navigator diff --git a/stackoverlay.js b/stackoverlay.js index 84ffdd5a..d2cb7629 100644 --- a/stackoverlay.js +++ b/stackoverlay.js @@ -177,7 +177,7 @@ export class StackOverlay { }); // Uncomment to debug the overlays - // overlay.background_color = Clutter.color_from_string('green')[1]; + // overlay.background_color = Utils.color_from_string('green')[1]; // overlay.opacity = 100; this.monitor = monitor; diff --git a/tiling.js b/tiling.js index 27856500..037e3df9 100644 --- a/tiling.js +++ b/tiling.js @@ -1696,7 +1696,7 @@ border-radius: ${borderWidth}px; // after creating new background apply this space's color if (this.color) { - this.metaBackground.set_color(Clutter.color_from_string(this.color)[1]); + this.metaBackground.set_color(Utils.color_from_string(this.color)[1]); } } diff --git a/utils.js b/utils.js index ac471bde..65520756 100644 --- a/utils.js +++ b/utils.js @@ -105,6 +105,21 @@ export function setBackgroundImage(actor, resource_path) { actor.content_repeat = Clutter.ContentRepeat.BOTH; } +/** + * Backwards compatible function. Attempts to use Cogl.Color with a fallback + * to Clutter.Color. + * @param {String} colorString + */ +export function color_from_string(colorString) { + try { + // Gnome 47+ merged Clutter.Color into Cogl.Color + return Cogl.Color.from_string(colorString); + } catch (error) { + // fallback for Gnome 45, 46 + return Clutter.Color.from_string(colorString); + } +} + // // Debug and development utils @@ -156,7 +171,7 @@ export function toggleCloneMarks() { if (metaWindow.clone) { metaWindow.clone.opacity = 190; metaWindow.clone.__oldOpacity = 190; - metaWindow.clone.background_color = Clutter.color_from_string("red")[1]; + metaWindow.clone.background_color = color_from_string("red")[1]; } } function unmarkCloneOf(metaWindow) {