Note: The actual value is added during build time.
- *
- * @returns {string} the version
- */
-export function getFullVersion() {
- return '1.11.1'; // FULL_VERSION
-}
-
-/**
- * Loads an icon from the extension's subdirectory "images".
- *
- * @param {Gio.File} extensionDir dir of the extension
- * @param {string} name filename of the image
- * @returns {Gio.FileIcon} the icon
- */
-export function loadIcon(extensionDir, name) {
- return new Gio.FileIcon({
- file: Gio.File.new_for_path(
- getImagePath(extensionDir, name)
- ),
- });
-}
-
-/**
- * Gets the path to the image from the extension's subdirectory "images".
- *
- * @param {Gio.File} extensionDir dir of the extension
- * @param {string} name filename of the image
- * @returns {string} the path
- */
-export function getImagePath(extensionDir, name) {
- return extensionDir.get_child(`images/${name}`).get_path();
-}
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/display_module.js b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/display_module.js
deleted file mode 100644
index ceff7cc..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/display_module.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-/**
- * @type {{_display(): Meta_Display, number_of_displays(): int}}
- */
-export const DisplayApi = {
- /**
- * Returns the Wayland display or screen
- *
- * @returns {Meta.Display}
- */
- _display() {
- return global.display || global.screen;
- },
-
- /**
- * @returns {int}
- * @public
- */
- number_displays() {
- return this._display().get_n_monitors();
- },
-
- /**
- * @param {number} displayIndex the monitor number
- * @returns {Meta.Rectangle}
- */
- display_geometry_for_index(displayIndex) {
- return this._display().get_monitor_geometry(displayIndex);
- },
-
- /**
- * @param {Meta.Cursor} cursor the new cursor to set
- */
- set_cursor(cursor) {
- this._display().set_cursor(cursor);
- },
-};
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/extension.js b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/extension.js
deleted file mode 100644
index 32a7c7c..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/extension.js
+++ /dev/null
@@ -1,1037 +0,0 @@
-/*
- Copyright (C) 2013 Borsato Ivano
-
- The JavaScript code in this page is free software: you can
- redistribute it and/or modify it under the terms of the GNU
- General Public License (GNU GPL) as published by the Free Software
- Foundation, either version 3 of the License, or (at your option)
- any later version. The code is distributed WITHOUT ANY WARRANTY;
- without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
-*/
-
-
-'use strict';
-
-import GObject from 'gi://GObject';
-import St from 'gi://St';
-import Meta from 'gi://Meta';
-import Shell from 'gi://Shell';
-// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/panelMenu.js
-import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
-import Clutter from 'gi://Clutter';
-import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
-import * as Slider from 'resource:///org/gnome/shell/ui/slider.js';
-import * as Main from 'resource:///org/gnome/shell/ui/main.js';
-
-import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js';
-
-import * as Lib from './convenience.js';
-import * as Settings from './settings.js';
-import * as Time from './timer.js';
-import * as UtilRecorder from './utilrecorder.js';
-import * as UtilAudio from './utilaudio.js';
-import * as UtilWebcam from './utilwebcam.js';
-import * as UtilNotify from './utilnotify.js';
-import * as Selection from './selection.js';
-import * as UtilExeCmd from './utilexecmd.js';
-
-var Indicator;
-let timerD = null;
-let timerC = null;
-
-let isActive = false;
-let pathFile = '';
-
-let keybindingConfigured = false;
-
-/**
- * @type {EasyScreenCastIndicator}
- */
-const EasyScreenCastIndicator = GObject.registerClass({
- GTypeName: 'EasyScreenCast_Indicator',
-}, class EasyScreenCastIndicator extends PanelMenu.Button {
- constructor(extension) {
- super(null, 'EasyScreenCast_Indicator');
-
- this._extension = extension;
- this._settings = new Settings.Settings(this._extension.getSettings());
- Lib.setDebugEnabled(this._settings.getOption('b', Settings.VERBOSE_DEBUG_SETTING_KEY));
- this._settings._settings.connect(
- `changed::${Settings.VERBOSE_DEBUG_SETTING_KEY}`,
- () => {
- Lib.setDebugEnabled(this._settings.getOption('b', Settings.VERBOSE_DEBUG_SETTING_KEY));
- }
- );
-
- this.CtrlAudio = new UtilAudio.MixerAudio();
- // CtrlWebcam is initialized lazy to avoid problems like #368
- this.CtrlWebcam = null;
-
- this.CtrlNotify = new UtilNotify.NotifyManager();
- this.CtrlExe = new UtilExeCmd.ExecuteStuff(this);
-
- // load indicator icons
- this._icons = {
- on: Lib.loadIcon(this._extension.dir, 'icon_recording.svg'),
- onSel: Lib.loadIcon(this._extension.dir, 'icon_recordingSel.svg'),
- off: Lib.loadIcon(this._extension.dir, 'icon_default.svg'),
- offSel: Lib.loadIcon(this._extension.dir, 'icon_defaultSel.svg'),
- };
-
- // check audio
- if (!this.CtrlAudio.checkAudio()) {
- Lib.TalkativeLog('-*-disable audio recording');
- this._settings.setOption(Settings.INPUT_AUDIO_SOURCE_SETTING_KEY, 0);
- this._settings.setOption(
- Settings.ACTIVE_CUSTOM_GSP_SETTING_KEY,
- Settings.getGSPstd(false)
- );
- }
-
- // add enter/leave/click event
- this.connect('enter_event', () => this.refreshIndicator(true));
- this.connect('leave_event', () => this.refreshIndicator(false));
- this.connect('button_press_event', (actor, event) =>
- this._onButtonPress(actor, event)
- );
-
- // prepare setting var
- if (this._settings.getOption('i', Settings.TIME_DELAY_SETTING_KEY) > 0)
- this.isDelayActive = true;
- else
- this.isDelayActive = false;
-
-
- // Add the title bar icon and label for time display
- this.indicatorBox = new St.BoxLayout();
- this.indicatorIcon = new St.Icon({
- gicon: this._icons.off,
- icon_size: 16,
- });
- this.timeLabel = new St.Label({
- text: '',
- style_class: 'time-label',
- y_expand: true,
- y_align: Clutter.ActorAlign.CENTER,
- });
-
- this.indicatorBox.add_child(this.timeLabel);
- this.indicatorBox.add_child(this.indicatorIcon);
-
- // init var
- this.recorder = new UtilRecorder.CaptureVideo();
- this.AreaSelected = null;
- this.TimeSlider = null;
-
- this._initMainMenu();
- }
-
- /**
- * @private
- */
- _initMainMenu() {
- this._addStartStopMenuEntry();
- this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.sub_menu_audio_recording = new PopupMenu.PopupSubMenuMenuItem(_('No audio source'), true);
- this.sub_menu_audio_recording.icon.icon_name = 'audio-input-microphone-symbolic';
- this.menu.addMenuItem(this.sub_menu_audio_recording);
- this._addAudioRecordingSubMenu();
-
- // add sub menu webcam recording
- this._addSubMenuWebCam();
-
- this._addAreaRecordingSubMenu();
- this._addRecordingDelaySubMenu();
- this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
- this.menu_item_options = new PopupMenu.PopupMenuItem(_('Options'));
- this.menu_item_options.actor.insert_child_at_index(
- new St.Icon({
- style_class: 'popup-menu-icon',
- icon_name: 'preferences-other-symbolic',
- }),
- 1
- );
- this.menu.addMenuItem(this.menu_item_options);
- this.menu_item_options.connect('activate', () => this._openExtensionPreferences());
- }
-
- /**
- * Set a new value for the time label. Integers are
- * converted to seconds, minutes, hours. All other
- * values are converted to strings.
- *
- * @param {string|number} newValue new value of the label. if a number, then it's the seconds passed.
- * @returns {string}
- */
- updateTimeLabel(newValue) {
- /**
- * @param {number} number a number
- */
- function padZeros(number) {
- if (number < 10)
- number = `0${number}`;
-
- return number.toString();
- }
-
- if (typeof newValue === 'number') {
- let hours = Math.floor(newValue / 3600);
- newValue -= hours * 3600;
-
- let minutes = Math.floor(newValue / 60);
- newValue -= minutes * 60;
-
- newValue = `${padZeros(hours)}:${padZeros(minutes)}:${padZeros(newValue)}`;
- }
-
- this.timeLabel.set_text(newValue.toString());
- }
-
- /**
- * Left clicking on the icon toggles the recording
- * options menu. Any other mouse button will start
- * the recording.
- * Some submenus are refreshed to account for new
- * sources.
- *
- * @param {Clutter.Actor} actor the actor
- * @param {Clutter.Event} event a Clutter.Event
- */
- _onButtonPress(actor, event) {
- let button = event.get_button();
-
- if (button === 1) {
- Lib.TalkativeLog('-*-left click indicator');
-
- this._setupExtensionMenu();
- } else {
- Lib.TalkativeLog('-*-right click indicator');
-
- if (this.menu.isOpen)
- this.menu.close();
-
- this.isShowNotify = this._settings.getOption('b', Settings.SHOW_NOTIFY_ALERT_SETTING_KEY);
- this._doRecording();
- }
- }
-
- /**
- * Sets up the menu when the user opens it.
- */
- _setupExtensionMenu() {
- this._addAudioRecordingSubMenu();
- this._addWebcamSubMenu();
- }
-
- /**
- * Sets up all the options for web-cams. Should only run the
- * first time the icon is clicked an the CtrlWebcam is still
- * null.
- */
- _addWebcamSubMenu() {
- if (this.CtrlWebcam === null)
- this.CtrlWebcam = new UtilWebcam.HelperWebcam(_('Unspecified webcam'));
-
- // add sub menu webcam recording
- this._populateSubMenuWebcam();
-
- // start monitoring inputvideo
- this.CtrlWebcam.startMonitor();
- }
-
- /**
- * Adds individual webcam items to the webcam menu.
- */
- _populateSubMenuWebcam() {
- let arrMI = this._createMIWebCam();
-
- this.smWebCam.menu.removeAll();
- for (let element in arrMI)
- this.smWebCam.menu.addMenuItem(arrMI[element]);
-
- let i = this._settings.getOption('i', Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY);
- Lib.TalkativeLog(`-*-populated submenuwebcam. Settings i=${i}`);
-
- this.smWebCam.label.text = this.WebCamDevice[i];
- }
-
- /**
- * @private
- */
- _addStartStopMenuEntry() {
- this.imRecordAction = new PopupMenu.PopupBaseMenuItem();
- this.RecordingLabel = new St.Label({
- text: _('Start recording'),
- style_class: 'RecordAction-label',
- content_gravity: Clutter.ContentGravity.CENTER,
- x_expand: true,
- x_align: Clutter.ActorAlign.CENTER,
- });
- this.imRecordAction.actor.add_child(this.RecordingLabel);
- this.imRecordAction.x_expand = true;
- this.imRecordAction.x_fill = true;
- this.imRecordAction.x_align = Clutter.ActorAlign.CENTER;
- this.imRecordAction.connect('activate', () => {
- this.isShowNotify = this._settings.getOption('b', Settings.SHOW_NOTIFY_ALERT_SETTING_KEY);
- this._doRecording();
- });
-
- this.menu.addMenuItem(this.imRecordAction);
- }
-
- /**
- * Refreshes the submenu for audio recording sources.
- */
- _addAudioRecordingSubMenu() {
- Lib.TalkativeLog('-*-reset the sub menu audio');
- // remove old menu items
- this.sub_menu_audio_recording.menu.removeAll();
-
- Lib.TalkativeLog('-*-add new items to sub menu audio');
- var arrMI = this._createMIAudioRec();
- for (var ele in arrMI)
- this.sub_menu_audio_recording.menu.addMenuItem(arrMI[ele]);
- }
-
- /**
- * @private
- */
- _addSubMenuWebCam() {
- this.smWebCam = new PopupMenu.PopupSubMenuMenuItem('', true);
- this.smWebCam.icon.icon_name = 'camera-web-symbolic';
-
- this.menu.addMenuItem(this.smWebCam);
- }
-
- /**
- * @private
- */
- _addAreaRecordingSubMenu() {
- this.sub_menu_area_recording = new PopupMenu.PopupSubMenuMenuItem('', true);
- this.sub_menu_area_recording.icon.icon_name = 'view-fullscreen-symbolic';
-
- var arrMI = this._createMIAreaRec();
- for (var ele in arrMI)
- this.sub_menu_area_recording.menu.addMenuItem(arrMI[ele]);
-
- this.sub_menu_area_recording.label.text = this.AreaType[this._settings.getOption('i', Settings.AREA_SCREEN_SETTING_KEY)];
- this.menu.addMenuItem(this.sub_menu_area_recording);
- }
-
- /**
- * @private
- */
- _addRecordingDelaySubMenu() {
- this.smDelayRec = new PopupMenu.PopupSubMenuMenuItem('', true);
- this.smDelayRec.icon.icon_name = 'alarm-symbolic';
-
- var arrMI = this._createMIInfoDelayRec();
- for (var ele in arrMI)
- this.smDelayRec.menu.addMenuItem(arrMI[ele]);
-
- var secDelay = this._settings.getOption('i', Settings.TIME_DELAY_SETTING_KEY);
- if (secDelay > 0) {
- this.smDelayRec.label.text =
- secDelay + _(' sec. delay before recording');
- } else {
- this.smDelayRec.label.text = _('Start recording immediately');
- }
-
- this.menu.addMenuItem(this.smDelayRec);
- }
-
- /**
- * @returns {Array}
- * @private
- */
- _createMIAreaRec() {
- this.AreaType = [
- _('Record all desktop'),
- _('Record a selected monitor'),
- _('Record a selected window'),
- _('Record a selected area'),
- ];
-
- this.AreaMenuItem = new Array(this.AreaType.length);
-
- for (var i = 0; i < this.AreaMenuItem.length; i++) {
- this.AreaMenuItem[i] = new PopupMenu.PopupMenuItem(
- this.AreaType[i],
- {
- reactive: true,
- activate: true,
- hover: true,
- can_focus: true,
- }
- );
-
- (function (areaSetting, arr, item, settings) {
- this.connectMI = function () {
- this.connect('activate', () => {
- Lib.TalkativeLog(`-*-set area recording to ${areaSetting} ${arr[areaSetting]}`);
- settings.setOption(Settings.AREA_SCREEN_SETTING_KEY, areaSetting);
-
- item.label.text = arr[areaSetting];
- });
- };
- this.connectMI();
- }.call(
- this.AreaMenuItem[i],
- i,
- this.AreaType,
- this.sub_menu_area_recording,
- this._settings
- ));
- }
-
- return this.AreaMenuItem;
- }
-
- /**
- * @returns {Array}
- * @private
- */
- _createMIWebCam() {
- this.WebCamDevice = [_('No WebCam recording')];
- // add menu item webcam device from GST
- const devices = this.CtrlWebcam.getDevicesIV();
- this.WebCamDevice.push(...this.CtrlWebcam.getNameDevices());
- Lib.TalkativeLog(`-*-webcam list: ${this.WebCamDevice}`);
- this.AreaMenuItem = new Array(this.WebCamDevice.length);
-
- for (var i = 0; i < this.AreaMenuItem.length; i++) {
- let devicePath = '';
-
- // i === 0 is "No Webcam selected"
- if (i > 0) {
- const device = devices[i - 1];
- devicePath = device.get_properties().get_string('device.path');
- Lib.TalkativeLog(`-*-webcam i=${i} devicePath: ${devicePath}`);
- }
-
- Lib.TalkativeLog(`-*-webcam i=${i} menu-item-text: ${this.WebCamDevice[i]}`);
- this.AreaMenuItem[i] = new PopupMenu.PopupMenuItem(
- this.WebCamDevice[i],
- {
- reactive: true,
- activate: true,
- hover: true,
- can_focus: true,
- }
- );
-
- (function (index, devPath, arr, item, settings) {
- this.connectMI = function () {
- this.connect('activate', () => {
- Lib.TalkativeLog(`-*-set webcam device to ${index} ${arr[index]} devicePath=${devPath}`);
- settings.setOption(Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY, index);
- settings.setOption(Settings.DEVICE_WEBCAM_SETTING_KEY, devPath);
- item.label.text = arr[index];
- });
- };
- this.connectMI();
- }.call(
- this.AreaMenuItem[i],
- i,
- devicePath,
- this.WebCamDevice,
- this.smWebCam,
- this._settings
- ));
- }
-
- return this.AreaMenuItem;
- }
-
- /**
- * @returns {Array}
- * @private
- */
- _createMIAudioRec() {
- // add std menu item
- this.AudioChoice = [
- {
- desc: _('No audio source'),
- name: 'N/A',
- port: 'N/A',
- sortable: true,
- resizeable: true,
- },
- {
- desc: _('Default audio source'),
- name: 'N/A',
- port: 'N/A',
- sortable: true,
- resizeable: true,
- },
- ];
- // add menu item audio source from PA
- var audioList = this.CtrlAudio.getListInputAudio();
- for (var index in audioList)
- this.AudioChoice.push(audioList[index]);
-
- this.AudioMenuItem = new Array(this.AudioChoice.length);
-
- for (var i = 0; i < this.AudioChoice.length; i++) {
- // create label menu
- let labelMenu = this.AudioChoice[i].desc;
- if (i >= 2) {
- labelMenu +=
- _('\n - Port: ') +
- this.AudioChoice[i].port +
- _('\n - Name: ') +
- this.AudioChoice[i].name;
- }
- // create submenu
- this.AudioMenuItem[i] = new PopupMenu.PopupMenuItem(labelMenu, {
- reactive: true,
- activate: true,
- hover: true,
- can_focus: true,
- });
- // add icon on submenu
- this.AudioMenuItem[i].actor.insert_child_at_index(
- new St.Icon({
- style_class: 'popup-menu-icon',
- icon_name: 'audio-card-symbolic',
- }),
- 1
- );
-
- // update choice audio from pref
- if (i === this._settings.getOption('i', Settings.INPUT_AUDIO_SOURCE_SETTING_KEY)) {
- Lib.TalkativeLog(`-*-get audio choice from pref ${i}`);
- this.sub_menu_audio_recording.label.text = this.AudioChoice[i].desc;
- }
-
- // add action on menu item
- (function (audioIndex, arr, item, settings) {
- this.connectMI = function () {
- this.connect('activate', () => {
- Lib.TalkativeLog(`-*-set audio choice to ${audioIndex}`);
- settings.setOption(Settings.INPUT_AUDIO_SOURCE_SETTING_KEY, audioIndex);
- item.label.text = arr[audioIndex].desc;
- });
- };
- this.connectMI();
- }.call(
- this.AudioMenuItem[i],
- i,
- this.AudioChoice,
- this.sub_menu_audio_recording,
- this._settings
- ));
- }
- return this.AudioMenuItem;
- }
-
- /**
- * @returns {Array}
- * @private
- */
- _createMIInfoDelayRec() {
- this.DelayTimeTitle = new PopupMenu.PopupMenuItem(_('Delay Time'), {
- reactive: false,
- });
-
- this.DelayTimeLabel = new St.Label({
- text:
- Math.floor(
- this._settings.getOption('i', Settings.TIME_DELAY_SETTING_KEY)
- ).toString() + _(' Sec'),
- });
- this.DelayTimeTitle.actor.add_child(this.DelayTimeLabel);
- // TODO this.DelayTimeTitle.align = St.Align.END;
-
- this.imSliderDelay = new PopupMenu.PopupBaseMenuItem({
- activate: false,
- });
- this.TimeSlider = new Slider.Slider(this._settings.getOption('i', Settings.TIME_DELAY_SETTING_KEY) / 100);
- this.TimeSlider.x_expand = true;
- this.TimeSlider.y_expand = true;
-
- this.TimeSlider.connect('notify::value', item => {
- this.DelayTimeLabel.set_text(
- Math.floor(item.value * 100).toString() + _(' Sec')
- );
- });
-
- this.TimeSlider.connect('drag-end', () => this._onDelayTimeChanged());
- this.TimeSlider.connect('scroll-event', () =>
- this._onDelayTimeChanged()
- );
-
- this.imSliderDelay.actor.add_child(this.TimeSlider);
-
- return [this.DelayTimeTitle, this.imSliderDelay];
- }
-
- /**
- * @private
- */
- _enable() {
- // enable key binding
- this._enableKeybindings();
- // immediately activate/deactive shortcut on settings change
- this._settings._settings.connect(
- `changed::${Settings.ACTIVE_SHORTCUT_SETTING_KEY}`,
- () => {
- if (this._settings.getOption('b', Settings.ACTIVE_SHORTCUT_SETTING_KEY)) {
- Lib.TalkativeLog('-^-shortcut changed - enabling');
- this._enableKeybindings();
- } else {
- Lib.TalkativeLog('-^-shortcut changed - disabling');
- this._removeKeybindings();
- }
- }
- );
-
- // start monitoring inputvideo
- if (this.CtrlWebcam !== null)
- this.CtrlWebcam.startMonitor();
-
- // add indicator
- this.add_child(this.indicatorBox);
- }
-
- /**
- * @private
- */
- _disable() {
- // remove key binding
- this._removeKeybindings();
- // stop monitoring inputvideo
- if (this.CtrlWebcam !== null)
- this.CtrlWebcam.stopMonitor();
- // unregister mixer control
- this.CtrlAudio.destroy();
-
- // remove indicator
- this.remove_child(this.indicatorBox);
- }
-
- /**
- * @private
- */
- _doDelayAction() {
- if (this.isDelayActive) {
- Lib.TalkativeLog(`-*-delay recording called | delay= ${this.TimeSlider.value}`);
- timerD = new Time.TimerDelay(
- Math.floor(this.TimeSlider.value * 100),
- this._doPreCommand,
- this
- );
- timerD.begin();
- } else {
- Lib.TalkativeLog('-*-instant recording called');
- // start recording
- this._doPreCommand();
- }
- }
-
- /**
- * @private
- */
- _doPreCommand() {
- if (this._settings.getOption('b', Settings.ACTIVE_PRE_CMD_SETTING_KEY)) {
- Lib.TalkativeLog('-*-execute pre command');
-
- const PreCmd = this._settings.getOption('s', Settings.PRE_CMD_SETTING_KEY);
-
- this.CtrlExe.Execute(
- PreCmd,
- false,
- res => {
- Lib.TalkativeLog(`-*-pre command final: ${res}`);
- if (res === true) {
- Lib.TalkativeLog('-*-pre command OK');
- this.recorder.start();
- } else {
- Lib.TalkativeLog('-*-pre command ERROR');
- this.CtrlNotify.createNotify(
- _('ERROR PRE COMMAND - See logs for more info'),
- this._icons.off
- );
- }
- },
- line => {
- Lib.TalkativeLog(`-*-pre command output: ${line}`);
- }
- );
- } else {
- this.recorder.start();
- }
- }
-
- /**
- * @private
- */
- _doRecording() {
- // start/stop record screen
- if (isActive === false) {
- Lib.TalkativeLog('-*-start recording');
-
- pathFile = '';
-
- // get selected area
- const optArea = this._settings.getOption('i', Settings.AREA_SCREEN_SETTING_KEY);
- if (optArea > 0) {
- Lib.TalkativeLog(`-*-type of selection of the area to record: ${optArea}`);
- switch (optArea) {
- case 3:
- new Selection.SelectionArea();
- break;
- case 2:
- new Selection.SelectionWindow();
- break;
- case 1:
- new Selection.SelectionDesktop();
- break;
- }
- } else {
- Lib.TalkativeLog('-*-recording full area');
- this._doDelayAction();
- }
- } else {
- Lib.TalkativeLog('-*-stop recording');
- isActive = false;
-
- this.recorder.stop();
-
- if (timerC !== null) {
- // stop counting rec
- timerC.halt();
- timerC = null;
- }
-
- // execute post-command
- this._doPostCommand();
- }
-
- this.refreshIndicator(false);
- }
-
- /**
- * @private
- */
- _doPostCommand() {
- if (this._settings.getOption('b', Settings.ACTIVE_POST_CMD_SETTING_KEY)) {
- Lib.TalkativeLog('-*-execute post command');
-
- // launch cmd after registration
- const tmpCmd = `/usr/bin/sh -c "${this._settings.getOption('s', Settings.POST_CMD_SETTING_KEY)}"`;
-
- const mapObj = {
- _fpath: pathFile,
- _dirpath: pathFile.substr(0, pathFile.lastIndexOf('/')),
- _fname: pathFile.substr(
- pathFile.lastIndexOf('/') + 1,
- pathFile.length
- ),
- };
-
- const Cmd = tmpCmd.replace(/_fpath|_dirpath|_fname/gi, match => {
- return mapObj[match];
- });
-
- Lib.TalkativeLog(`-*-post command:${Cmd}`);
-
- // execute post command
- this.CtrlExe.Spawn(Cmd);
- }
- }
-
- /**
- * @param {boolean} result whether the recording was successful
- * @param {string} file file path of the recorded file
- */
- doRecResult(result, file) {
- if (result) {
- isActive = true;
-
- Lib.TalkativeLog('-*-record OK');
- // update indicator
- const indicators = this._settings.getOption('i', Settings.STATUS_INDICATORS_SETTING_KEY);
- this._replaceStdIndicator(indicators === 1 || indicators === 3);
-
- if (this.isShowNotify) {
- Lib.TalkativeLog('-*-show notify');
- // create counting notify
- this.notifyCounting = this.CtrlNotify.createNotify(
- _('Start Recording'),
- this._icons.on
- );
- this.notifyCounting.connect('destroy', () => {
- Lib.TalkativeLog('-*-notification destroyed');
- this.notifyCounting = null;
- });
-
- // start counting rec
- timerC = new Time.TimerCounting((secpassed, alertEnd) => {
- this._refreshNotify(secpassed, alertEnd);
- }, this);
- timerC.begin();
- }
-
- // update path file video
- pathFile = file;
- Lib.TalkativeLog(`-*-update abs file path -> ${pathFile}`);
- } else {
- Lib.TalkativeLog('-*-record ERROR');
-
- pathFile = '';
-
- if (this.isShowNotify) {
- Lib.TalkativeLog('-*-show error notify');
- this.CtrlNotify.createNotify(
- _('ERROR RECORDER - See logs for more info'),
- this._icons.off
- );
- }
- }
- this.refreshIndicator(false);
- }
-
- /**
- * @param {number} sec the seconds passed
- * @param {boolean} alertEnd whether the timer is ending
- */
- _refreshNotify(sec, alertEnd) {
- if (this.notifyCounting !== null && this.notifyCounting !== undefined && this.isShowNotify) {
- if (alertEnd) {
- this.CtrlNotify.updateNotify(
- this.notifyCounting,
- _(`Finish Recording / Seconds : ${sec}`),
- this._icons.off,
- true
- );
- } else {
- this.CtrlNotify.updateNotify(
- this.notifyCounting,
- _('Recording ... / Seconds passed : ') + sec,
- this._icons.on,
- false
- );
- }
- }
- }
-
- /**
- * @private
- */
- _openExtensionPreferences() {
- try {
- this._extension.openPreferences();
- } catch (e) {
- Lib.TalkativeLog(`Failed to open preferences: ${e}`);
- }
- }
-
- /**
- * @private
- */
- _onDelayTimeChanged() {
- const secDelay = Math.floor(this.TimeSlider.value * 100);
- this._settings.setOption(Settings.TIME_DELAY_SETTING_KEY, secDelay);
- if (secDelay > 0)
- this.smDelayRec.label.text = secDelay + _(' sec. delay before recording');
- else
- this.smDelayRec.label.text = _('Start recording immediately');
- }
-
- /**
- * @param {boolean} focus selects the correct icon depending on the focus state
- */
- refreshIndicator(focus) {
- Lib.TalkativeLog(`-*-refresh indicator -A ${isActive} -F ${focus}`);
-
- const indicators = this._settings.getOption('i', Settings.STATUS_INDICATORS_SETTING_KEY);
-
- if (isActive === true) {
- if (indicators === 0 || indicators === 1) {
- if (focus === true)
- this.indicatorIcon.set_gicon(this._icons.onSel);
- else
- this.indicatorIcon.set_gicon(this._icons.on);
- } else if (this._settings.getOption('b', Settings.ACTIVE_SHORTCUT_SETTING_KEY)) {
- this.indicatorIcon.set_gicon(null);
- } else if (focus === true) {
- this.indicatorIcon.set_gicon(this._icons.onSel);
- } else {
- this.indicatorIcon.set_gicon(this._icons.on);
- }
-
- this.RecordingLabel.set_text(_('Stop recording'));
- } else {
- if (focus === true)
- this.indicatorIcon.set_gicon(this._icons.offSel);
- else
- this.indicatorIcon.set_gicon(this._icons.off);
-
- this.RecordingLabel.set_text(_('Start recording'));
- }
- }
-
- /**
- * @param {boolean} OPTtemp whether to replace the standard indicator or use it
- * @private
- */
- _replaceStdIndicator(OPTtemp) {
- if (Main.panel.statusArea === undefined) {
- Lib.TalkativeLog('-*-no Main.panel.statusArea found');
- return;
- }
-
- var stdMenu = Main.panel.statusArea.quickSettings;
- if (stdMenu === undefined) {
- Lib.TalkativeLog('-*-no quickSettings or aggregateMenu in Main.panel.statusArea');
- return;
- }
- if (stdMenu._remoteAccess === undefined) {
- Lib.TalkativeLog('-*-no _remoteAccess indicator applet found');
- return;
- }
- var indicator = stdMenu._remoteAccess._indicator;
- if (indicator === undefined) {
- Lib.TalkativeLog('-*-no _indicator or _recordingIndicator found');
- return;
- }
-
- if (OPTtemp) {
- Lib.TalkativeLog('-*-replace STD indicator');
- indicator.visible = false;
- } else {
- Lib.TalkativeLog('-*-use STD indicator');
- indicator.visible = isActive;
- }
- }
-
- /**
- * @private
- */
- _enableKeybindings() {
- if (this._settings.getOption('b', Settings.ACTIVE_SHORTCUT_SETTING_KEY)) {
- Lib.TalkativeLog('-*-enable keybinding');
-
- Main.wm.addKeybinding(
- Settings.SHORTCUT_KEY_SETTING_KEY,
- this._settings._settings,
- Meta.KeyBindingFlags.NONE,
- // available modes: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/src/shell-action-modes.h
- Shell.ActionMode.NORMAL |
- Shell.ActionMode.OVERVIEW |
- Shell.ActionMode.POPUP |
- Shell.ActionMode.SYSTEM_MODAL,
- () => {
- Lib.TalkativeLog('-*-intercept key combination');
- this._doRecording();
- }
- );
- keybindingConfigured = true;
- }
- }
-
- /**
- * @private
- */
- _removeKeybindings() {
- if (keybindingConfigured) {
- Lib.TalkativeLog('-*-remove keybinding');
- Main.wm.removeKeybinding(Settings.SHORTCUT_KEY_SETTING_KEY);
- keybindingConfigured = false;
- }
- }
-
- getSelectedRect() {
- var recX = this._settings.getOption('i', Settings.X_POS_SETTING_KEY);
- var recY = this._settings.getOption('i', Settings.Y_POS_SETTING_KEY);
- var recW = this._settings.getOption('i', Settings.WIDTH_SETTING_KEY);
- var recH = this._settings.getOption('i', Settings.HEIGHT_SETTING_KEY);
- return [recX, recY, recW, recH];
- }
-
- saveSelectedRect(x, y, h, w) {
- this._settings.setOption(Settings.X_POS_SETTING_KEY, x);
- this._settings.setOption(Settings.Y_POS_SETTING_KEY, y);
- this._settings.setOption(Settings.HEIGHT_SETTING_KEY, h);
- this._settings.setOption(Settings.WIDTH_SETTING_KEY, w);
- }
-
- getSettings() {
- return this._settings;
- }
-
- getAudioSource() {
- return this.CtrlAudio.getAudioSource();
- }
-
- /**
- * Destroy indicator
- */
- destroy() {
- Lib.TalkativeLog('-*-destroy indicator called');
-
- if (isActive)
- isActive = false;
-
- if (this._settings) {
- this._settings.destroy();
- this._settings = null;
- }
-
- super.destroy();
- }
-});
-
-export default class EasyScreenCast extends Extension {
- /**
- *
- */
- enable() {
- Lib.TalkativeLog('-*-enableExtension called');
- Lib.TalkativeLog(`-*-version: ${this.metadata.version}`);
- Lib.TalkativeLog(`-*-install path: ${this.path}`);
- Lib.TalkativeLog(`-*-version (package.json): ${Lib.getFullVersion()}`);
-
- if (Indicator === null || Indicator === undefined) {
- Lib.TalkativeLog('-*-create indicator');
-
- Indicator = new EasyScreenCastIndicator(this);
- Main.panel.addToStatusArea('EasyScreenCast-indicator', Indicator);
- }
-
- Indicator._enable();
- }
-
- /**
- *
- */
- disable() {
- Lib.TalkativeLog('-*-disableExtension called');
-
- if (timerD !== null) {
- Lib.TalkativeLog('-*-timerD stopped');
- timerD.stop();
- timerD = null;
- }
-
- // this might happen, if the extension is disabled during recording
- if (timerC !== null) {
- // stop counting rec
- timerC.halt();
- timerC = null;
- }
-
-
- if (Indicator !== null) {
- Lib.TalkativeLog('-*-indicator call destroy');
-
- Indicator._disable();
- Indicator.destroy();
- Indicator = null;
- }
- }
-}
-
-export {Indicator};
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Info.png b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Info.png
deleted file mode 100644
index 7f15ae8..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Info.png and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Performance.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Performance.svg
deleted file mode 100644
index f23e320..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Performance.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Quality.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Quality.svg
deleted file mode 100644
index b7e8d3d..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/Icon_Quality.svg
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_default.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_default.svg
deleted file mode 100644
index ff59a8c..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_default.svg
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_defaultSel.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_defaultSel.svg
deleted file mode 100644
index 7a57f9a..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_defaultSel.svg
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recording.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recording.svg
deleted file mode 100644
index 0608982..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recording.svg
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recordingSel.svg b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recordingSel.svg
deleted file mode 100644
index 453444c..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/images/icon_recordingSel.svg
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-
-
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ca/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ca/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 1e565d3..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ca/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/cs/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/cs/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index ef74169..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/cs/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/de/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/de/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 9f6db59..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/de/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/es/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/es/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index d40762a..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/es/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/fr/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/fr/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 546ca3c..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/fr/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/it/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/it/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 35411ef..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/it/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ja/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ja/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 7256b66..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ja/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/pt_BR/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/pt_BR/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index c88a3bc..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/pt_BR/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ru/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ru/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 2392f4c..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/ru/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/uk/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/uk/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 21ae02f..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/uk/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/vi/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/vi/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 7526ab9..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/vi/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/zh/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/zh/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo
deleted file mode 100644
index 03ee607..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/locale/zh/LC_MESSAGES/EasyScreenCast@iacopodeenosee.gmail.com.mo and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/metadata.json b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/metadata.json
deleted file mode 100644
index c40875d..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/metadata.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "_generated": "Generated by SweetTooth, do not edit",
- "description": "This extension simplifies the use of the video recording function integrated in gnome shell, allows quickly to change the various settings of the desktop recording.\n\nSOURCE CODE -> https://github.com/EasyScreenCast/EasyScreenCast\n\nVIDEO -> https://youtu.be/81E9AruraKU\n\n**NOTICE**\nif an error occurs during the update is recommended to reload GNOME Shell (Alt + F2, 'r') and reload the extension's installation page.",
- "gettext-domain": "EasyScreenCast@iacopodeenosee.gmail.com",
- "name": "EasyScreenCast",
- "settings-schema": "org.gnome.shell.extensions.EasyScreenCast",
- "shell-version": [
- "46",
- "47",
- "48"
- ],
- "url": "https://github.com/EasyScreenCast/EasyScreenCast",
- "uuid": "EasyScreenCast@iacopodeenosee.gmail.com",
- "version": 53
-}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.css b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.css
deleted file mode 100644
index 4dc0f17..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.options-grid {
- margin: 18px;
-}
-
-.borderless {
- border: none;
-}
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.js b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.js
deleted file mode 100644
index e0dd1a2..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/prefs.js
+++ /dev/null
@@ -1,1184 +0,0 @@
-/*
- Copyright (C) 2013 Borsato Ivano
-
- The JavaScript code in this page is free software: you can
- redistribute it and/or modify it under the terms of the GNU
- General Public License (GNU GPL) as published by the Free Software
- Foundation, either version 3 of the License, or (at your option)
- any later version. The code is distributed WITHOUT ANY WARRANTY;
- without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
-*/
-
-'use strict';
-
-import GIRepository from 'gi://GIRepository';
-GIRepository.Repository.prepend_search_path('/usr/lib64/gnome-shell');
-GIRepository.Repository.prepend_library_path('/usr/lib64/gnome-shell');
-
-import Adw from 'gi://Adw';
-import GObject from 'gi://GObject';
-import Gio from 'gi://Gio';
-import Gtk from 'gi://Gtk';
-import Gdk from 'gi://Gdk';
-import Pango from 'gi://Pango';
-
-import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
-
-import * as Lib from './convenience.js';
-import * as UtilWebcam from './utilwebcam.js';
-import * as UtilGSP from './utilgsp.js';
-import * as Settings from './settings.js';
-import * as UtilExeCmd from './utilexecmd.js';
-
-const EasyScreenCastSettingsWidget = GObject.registerClass({
- GTypeName: 'EasyScreenCast_SettingsWidget',
-}, class EasyScreenCastSettingsWidget extends Gtk.Box {
- /**
- * @param {ExtensionPreferences} prefs the prefs instance
- */
- constructor(prefs) {
- super();
-
- this._prefs = prefs;
- this._settings = new Settings.Settings(this._prefs.getSettings());
- Lib.setDebugEnabled(this._settings.getOption('b', Settings.VERBOSE_DEBUG_SETTING_KEY));
- this.CtrlExe = new UtilExeCmd.ExecuteStuff(this);
- this.CtrlWebcam = new UtilWebcam.HelperWebcam(_('Unspecified webcam'));
-
- let cssProvider = new Gtk.CssProvider();
- cssProvider.load_from_path(`${prefs.path}/prefs.css`);
- Gtk.StyleContext.add_provider_for_display(
- Gdk.Display.get_default(),
- cssProvider,
- Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
-
- // creates the ui builder and add the main resource file
- let uiFilePath = `${this._prefs.path}/Options_UI.glade`;
- let builder = new Gtk.Builder();
- builder.set_translation_domain(this._prefs.metadata['gettext-domain']);
-
- if (builder.add_from_file(uiFilePath) === 0) {
- Lib.TalkativeLog(`-^-could not load the ui file: ${uiFilePath}`);
- let label = new Gtk.Label({
- label: _('Could not load the preferences UI file'),
- vexpand: true,
- });
-
- this.append(label);
- } else {
- Lib.TalkativeLog(`-^-UI file receive and load: ${uiFilePath}`);
-
- // gets the interesting builder objects
- let refBoxMainContainer = builder.get_object('Main_Container');
- this.append(refBoxMainContainer);
-
- // setup tab options
- this._initTabOptions(this, builder, this._settings._settings);
-
- // setup tab quality
- this._initTabQuality(this, builder, this._settings._settings);
-
- // setup tab webcam
- this._initTabWebcam(this, builder, this._settings._settings);
-
- // setup tab file
- this._initTabFile(this, builder, this._settings._settings);
-
- // setup tab support
- this._initTabSupport(this, builder, this._settings._settings);
-
- // setup tab info
- this._initTabInfo(this, builder);
-
- // @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
- // update GSP area
- this._setStateGSP(
- !this._settings.getOption('b', Settings.ACTIVE_CUSTOM_GSP_SETTING_KEY)
- );
-
- // update list view
- this._updateRowShortcut(
- this._settings.getOption('as', Settings.SHORTCUT_KEY_SETTING_KEY)[0]
- );
-
- // update webcam widget state
- this._updateStateWebcamOptions();
-
- // connect keywebcam signal
- this._settings._settings.connect(
- `changed::${Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY}`,
- () => {
- Lib.TalkativeLog('-^-webcam device changed');
-
- this._updateStateWebcamOptions();
- }
- );
- }
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @param {Gio.Settings} tmpS the current settings
- * @private
- */
- _initTabOptions(ctx, gtkDB, tmpS) {
- // implements show timer option
- let refSwitchShowNotifyAlert = gtkDB.get_object('swt_ShowNotifyAlert');
- tmpS.bind(
- Settings.SHOW_NOTIFY_ALERT_SETTING_KEY,
- refSwitchShowNotifyAlert,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements show area option
- let refSwitchShowAreaRec = gtkDB.get_object('swt_ShowAreaRec');
- tmpS.bind(
- Settings.SHOW_AREA_REC_SETTING_KEY,
- refSwitchShowAreaRec,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements show indicator option
- let refComboboxIndicatorsRec = gtkDB.get_object('cbt_StatusIndicatorsRec');
- tmpS.bind(
- Settings.STATUS_INDICATORS_SETTING_KEY,
- refComboboxIndicatorsRec,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements draw cursor option
- let refSwitchDrawCursorRec = gtkDB.get_object('swt_DrawCursorRec');
- tmpS.bind(
- Settings.DRAW_CURSOR_SETTING_KEY,
- refSwitchDrawCursorRec,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements enable keybinding option
- let refSwitchEnableShortcut = gtkDB.get_object('swt_KeyShortcut');
- tmpS.bind(
- Settings.ACTIVE_SHORTCUT_SETTING_KEY,
- refSwitchEnableShortcut,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements selecting alternative key combo
- let refTreeviewShortcut = gtkDB.get_object('treeview_KeyShortcut');
- refTreeviewShortcut.set_sensitive(true);
- ctx.Ref_liststore_Shortcut = gtkDB.get_object('liststore_KeyShortcut');
- ctx.Iter_ShortcutRow = ctx.Ref_liststore_Shortcut.append();
-
- let renderer = new Gtk.CellRendererAccel({
- editable: true,
- });
- renderer.connect(
- 'accel-edited',
- (_0, _1, key, mods, _2) => {
- Lib.TalkativeLog(`-^-edited key accel: key=${key} mods=${mods}`);
-
- let accel = Gtk.accelerator_name(key, mods);
-
- ctx._updateRowShortcut(accel);
- this._settings.setOption(Settings.SHORTCUT_KEY_SETTING_KEY, [accel]);
- }
- );
-
- renderer.connect('accel-cleared', () => {
- Lib.TalkativeLog('-^-cleared key accel');
-
- ctx._updateRowShortcut(null);
- this._settings.setOption(Settings.SHORTCUT_KEY_SETTING_KEY, []);
- });
-
- let column = new Gtk.TreeViewColumn();
- column.pack_start(renderer, true);
- column.add_attribute(
- renderer,
- 'accel-key',
- Settings.SHORTCUT_COLUMN_KEY
- );
- column.add_attribute(
- renderer,
- 'accel-mods',
- Settings.SHORTCUT_COLUMN_MODS
- );
-
- refTreeviewShortcut.append_column(column);
-
- // implements post execute command
- let refSwitchExecutePostCmd = gtkDB.get_object('swt_executepostcmd');
- tmpS.bind(
- Settings.ACTIVE_POST_CMD_SETTING_KEY,
- refSwitchExecutePostCmd,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- let refTexteditPostCmd = gtkDB.get_object('txe_postcmd');
- tmpS.bind(
- Settings.POST_CMD_SETTING_KEY,
- refTexteditPostCmd,
- 'text',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements pre execute command
- let refSwitchExecutePreCmd = gtkDB.get_object('swt_executeprecmd');
- tmpS.bind(
- Settings.ACTIVE_PRE_CMD_SETTING_KEY,
- refSwitchExecutePreCmd,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- let refTexteditPreCmd = gtkDB.get_object('txe_precmd');
- tmpS.bind(
- Settings.PRE_CMD_SETTING_KEY,
- refTexteditPreCmd,
- 'text',
- Gio.SettingsBindFlags.DEFAULT
- );
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @param {Gio.Settings} tmpS the current settings
- * @private
- */
- _initTabQuality(ctx, gtkDB, tmpS) {
- // implements FPS option
- let refSpinnerFrameRateRec = gtkDB.get_object('spb_FrameRateRec');
- // Create an adjustment to use for the second spinbutton
- let adjustment1 = new Gtk.Adjustment({
- value: 30,
- lower: 1,
- upper: 666,
- step_increment: 1,
- page_increment: 10,
- });
- refSpinnerFrameRateRec.configure(adjustment1, 10, 0);
- tmpS.bind(
- Settings.FPS_SETTING_KEY,
- refSpinnerFrameRateRec,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements command string rec option
- let refTexteditPipeline = gtkDB.get_object('txe_CommandStringRec');
- let refBufferPipeline = refTexteditPipeline.get_buffer();
- tmpS.bind(
- Settings.PIPELINE_REC_SETTING_KEY,
- refBufferPipeline,
- 'text',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements label description GSP
- let refLabelDescGSP = gtkDB.get_object('lbl_GSP_Description');
- refLabelDescGSP.set_text(
- UtilGSP.getDescr(
- this._settings.getOption('i', Settings.QUALITY_SETTING_KEY),
- this._settings.getOption('i', Settings.FILE_CONTAINER_SETTING_KEY)
- )
- );
- // update label description when container selection changed
- this._settings._settings.connect(`changed::${Settings.FILE_CONTAINER_SETTING_KEY}`, () => {
- Lib.TalkativeLog('-^- new setting for file container, update gps description');
- refLabelDescGSP.set_text(
- UtilGSP.getDescr(
- this._settings.getOption('i', Settings.QUALITY_SETTING_KEY),
- this._settings.getOption('i', Settings.FILE_CONTAINER_SETTING_KEY)
- )
- );
- });
-
-
- // implements quality scale option
- let refScaleQuality = gtkDB.get_object('scl_Quality');
- refScaleQuality.set_valign(Gtk.Align.START);
- let adjustment2 = new Gtk.Adjustment({
- value: 1,
- lower: 0,
- upper: 3,
- step_increment: 1,
- page_increment: 1,
- });
- refScaleQuality.set_adjustment(adjustment2);
- refScaleQuality.set_digits(1);
- let ind = 0;
- for (; ind < 4; ind++)
- refScaleQuality.add_mark(ind, Gtk.PositionType.BOTTOM, '');
-
-
- refScaleQuality.set_value(
- this._settings.getOption('i', Settings.QUALITY_SETTING_KEY)
- );
-
- let oldQualityValue = refScaleQuality.get_value();
- refScaleQuality.connect('value-changed', self => {
- // not logging by default - it's too much
- // Lib.TalkativeLog(`-^-value quality changed : ${self.get_value()}`);
-
- // round the value
- let roundTmp = parseInt(self.get_value().toFixed(0));
- // not logging by default - it's too much
- // Lib.TalkativeLog(`-^-value quality fixed : ${roundTmp}`);
-
- self.set_value(roundTmp);
-
- // only update labels for real changes
- if (oldQualityValue !== roundTmp) {
- oldQualityValue = roundTmp;
- this._settings.setOption(Settings.QUALITY_SETTING_KEY, roundTmp);
-
- // update label descr GSP
- refLabelDescGSP.set_text(
- UtilGSP.getDescr(
- roundTmp,
- this._settings.getOption('i', Settings.FILE_CONTAINER_SETTING_KEY)
- )
- );
-
- // update fps
- this._settings.setOption(
- Settings.FPS_SETTING_KEY,
- UtilGSP.getFps(
- roundTmp,
- this._settings.getOption('i', Settings.FILE_CONTAINER_SETTING_KEY)
- )
- );
- }
- });
-
- // implements image for scale widget
- let refImagePerformance = gtkDB.get_object('img_Performance');
- refImagePerformance.set_from_file(Lib.getImagePath(this._prefs.dir, 'Icon_Performance.svg'));
-
- let refImageQuality = gtkDB.get_object('img_Quality');
- refImageQuality.set_from_file(Lib.getImagePath(this._prefs.dir, 'Icon_Quality.svg'));
-
- // implements custom GSPipeline option
- let refSwitchCustomGSP = gtkDB.get_object('swt_EnableCustomGSP');
- tmpS.bind(
- Settings.ACTIVE_CUSTOM_GSP_SETTING_KEY,
- refSwitchCustomGSP,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
- refSwitchCustomGSP.connect('state-set', () => {
- // update GSP text area
- ctx._setStateGSP(this._settings.getOption('b', Settings.ACTIVE_CUSTOM_GSP_SETTING_KEY));
- });
-
- ctx.Ref_stack_Quality = gtkDB.get_object('stk_Quality');
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @param {Gio.Settings} tmpS the current settings
- * @private
- */
- _initTabWebcam(ctx, gtkDB, tmpS) {
- // implements webcam quality option: Type: GtkListStore
- ctx.Ref_ListStore_QualityWebCam = gtkDB.get_object(
- 'liststore_QualityWebCam'
- );
- let refTreeViewQualityWebCam = gtkDB.get_object(
- 'treeview_QualityWebam'
- );
- // create column data
- let capsColumn = new Gtk.TreeViewColumn({
- title: _('WebCam Caps'),
- });
- let normalColumn = new Gtk.CellRendererText();
- capsColumn.pack_start(normalColumn, true);
- capsColumn.add_attribute(normalColumn, 'text', 0);
-
- // insert caps column into treeview
- refTreeViewQualityWebCam.insert_column(capsColumn, 0);
-
- // setup selection liststore
- let capsSelection = refTreeViewQualityWebCam.get_selection();
-
- // connect selection signal
- capsSelection.connect('changed', self => {
- let [isSelected,, iter] = self.get_selected();
- if (isSelected) {
- let Caps = ctx.Ref_ListStore_QualityWebCam.get_value(iter, 0);
- Lib.TalkativeLog(`-^-treeview row selected : ${Caps}`);
-
- this._settings.setOption(Settings.QUALITY_WEBCAM_SETTING_KEY, Caps);
-
- // update label webcam caps
- ctx.Ref_Label_WebCamCaps.set_ellipsize(Pango.EllipsizeMode.END);
- ctx.Ref_Label_WebCamCaps.set_text(Caps);
- }
- });
-
- // fill combobox with quality option webcam
- ctx._updateWebCamCaps(this._settings.getOption('i', Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY));
-
- // implements webcam corner position option
- let refComboboxCornerWebCam = gtkDB.get_object('cbt_WebCamCorner');
- tmpS.bind(
- Settings.CORNER_POSITION_WEBCAM_SETTING_KEY,
- refComboboxCornerWebCam,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam margin x position option
- let refSpinnerMarginXWebCam = gtkDB.get_object('spb_WebCamMarginX');
- let adjustmentMarginX = new Gtk.Adjustment({
- value: 0,
- lower: 0,
- upper: 10000,
- step_increment: 1,
- page_increment: 10,
- });
- refSpinnerMarginXWebCam.configure(adjustmentMarginX, 10, 0);
- tmpS.bind(
- Settings.MARGIN_X_WEBCAM_SETTING_KEY,
- refSpinnerMarginXWebCam,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam margin y position option
- let refSpinnerMarginYWebCam = gtkDB.get_object('spb_WebCamMarginY');
- let adjustmentMarginY = new Gtk.Adjustment({
- value: 0,
- lower: 0,
- upper: 10000,
- step_increment: 1,
- page_increment: 10,
- });
- refSpinnerMarginYWebCam.configure(adjustmentMarginY, 10, 0);
- tmpS.bind(
- Settings.MARGIN_Y_WEBCAM_SETTING_KEY,
- refSpinnerMarginYWebCam,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam aplha channel option
- let refSpinnerAlphaWebCam = gtkDB.get_object('spb_WebCamAlpha');
- let adjustmentAlpha = new Gtk.Adjustment({
- value: 0.01,
- lower: 0.0,
- upper: 1.0,
- step_increment: 0.05,
- page_increment: 0.25,
- });
- refSpinnerAlphaWebCam.configure(adjustmentAlpha, 0.25, 2);
- tmpS.bind(
- Settings.ALPHA_CHANNEL_WEBCAM_SETTING_KEY,
- refSpinnerAlphaWebCam,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam type unit dimension option
- let refComboboxTypeUnitWebCam = gtkDB.get_object('cbt_WebCamUnitMeasure');
- tmpS.bind(
- Settings.TYPE_UNIT_WEBCAM_SETTING_KEY,
- refComboboxTypeUnitWebCam,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam width option
- let refSpinnerWidthWebCam = gtkDB.get_object('spb_WebCamWidth');
- let adjustmentWidth = new Gtk.Adjustment({
- value: 20,
- lower: 0,
- upper: 10000,
- step_increment: 1,
- page_increment: 10,
- });
- refSpinnerWidthWebCam.configure(adjustmentWidth, 10, 0);
- tmpS.bind(
- Settings.WIDTH_WEBCAM_SETTING_KEY,
- refSpinnerWidthWebCam,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam heigth option
- let refSpinnerHeightWebCam = gtkDB.get_object('spb_WebCamHeight');
- let adjustmentHeight = new Gtk.Adjustment({
- value: 10,
- lower: 0,
- upper: 10000,
- step_increment: 1,
- page_increment: 10,
- });
- refSpinnerHeightWebCam.configure(adjustmentHeight, 10, 0);
- tmpS.bind(
- Settings.HEIGHT_WEBCAM_SETTING_KEY,
- refSpinnerHeightWebCam,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements webcam stack menu chooser
- ctx.Ref_StackSwitcher_WebCam = gtkDB.get_object('sts_Webcam');
- // implements webcam stack obj
- ctx.Ref_StackObj_WebCam = gtkDB.get_object('stk_Webcam');
- // implements webcam stack menu chooser
- ctx.Ref_Label_WebCam = gtkDB.get_object('lbl_Webcam');
- // implements webcam caps stack menu chooser
- ctx.Ref_Label_WebCamCaps = gtkDB.get_object('lbl_WebcamCaps');
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @param {Gio.Settings} tmpS the current settings
- * @private
- */
- _initTabFile(ctx, gtkDB, tmpS) {
- // implements file name string rec option
- let refTexteditFileName = gtkDB.get_object('txe_FileNameRec');
- tmpS.bind(
- Settings.FILE_NAME_SETTING_KEY,
- refTexteditFileName,
- 'text',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements file container option
- let refComboboxContainer = gtkDB.get_object('cbt_FileContainer');
- tmpS.bind(
- Settings.FILE_CONTAINER_SETTING_KEY,
- refComboboxContainer,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements file container resolution
- let refStackFileResolution = gtkDB.get_object('stk_FileResolution');
-
- // implements file resolution preset spinner
- let refComboboxResolution = gtkDB.get_object('cbt_FileResolution');
- tmpS.bind(
- Settings.FILE_RESOLUTION_TYPE_SETTING_KEY,
- refComboboxResolution,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // intercept combobox res changed and update width/height value
- refComboboxResolution.connect('changed', self => {
- var activeRes = self.active;
- Lib.TalkativeLog(`-^-preset combobox changed: ${activeRes}`);
- if (activeRes >= 0 && activeRes < 15) {
- var [h, w] = ctx._getResolutionPreset(activeRes);
-
- // update width/height
- this._settings.setOption(Settings.FILE_RESOLUTION_HEIGHT_SETTING_KEY, h);
- this._settings.setOption(Settings.FILE_RESOLUTION_WIDTH_SETTING_KEY, w);
- Lib.TalkativeLog(`-^-Res changed h: ${h} w: ${w}`);
- }
- });
-
- // load file resolution pref and upadte UI
- var tmpRes = this._settings.getOption('i', Settings.FILE_RESOLUTION_TYPE_SETTING_KEY);
- if (tmpRes < 0)
- refStackFileResolution.set_visible_child_name('native');
- else if (tmpRes === 999)
- refStackFileResolution.set_visible_child_name('custom');
- else
- refStackFileResolution.set_visible_child_name('preset');
-
-
- // setup event on stack switcher
- refStackFileResolution.connect('notify::visible-child-name', () => {
- Lib.TalkativeLog('-^-stack_FR event grab');
- var page = refStackFileResolution.get_visible_child_name();
- Lib.TalkativeLog(`-^-active page -> ${page}`);
-
- if (page === 'native') {
- // set option to -1
- this._settings.setOption(Settings.FILE_RESOLUTION_TYPE_SETTING_KEY, -1);
- } else if (page === 'preset') {
- // set option to fullHD 16:9
- this._settings.setOption(Settings.FILE_RESOLUTION_TYPE_SETTING_KEY, 8);
- } else if (page === 'custom') {
- // set option to 99
- this._settings.setOption(Settings.FILE_RESOLUTION_TYPE_SETTING_KEY, 999);
- } else {
- Lib.TalkativeLog('-^-page error');
- }
- });
-
- // implements file width option
- let refSpinnerWidthRes = gtkDB.get_object('spb_ResWidth');
- let adjustmentResWidth = new Gtk.Adjustment({
- value: 640,
- lower: 640,
- upper: 3840,
- step_increment: 1,
- page_increment: 100,
- });
- refSpinnerWidthRes.configure(adjustmentResWidth, 10, 0);
- tmpS.bind(
- Settings.FILE_RESOLUTION_WIDTH_SETTING_KEY,
- refSpinnerWidthRes,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements file heigth option
- let refSpinnerHeightRes = gtkDB.get_object('spb_ResHeight');
- let adjustmentResHeight = new Gtk.Adjustment({
- value: 480,
- lower: 480,
- upper: 2160,
- step_increment: 1,
- page_increment: 100,
- });
- refSpinnerHeightRes.configure(adjustmentResHeight, 10, 0);
- tmpS.bind(
- Settings.FILE_RESOLUTION_HEIGHT_SETTING_KEY,
- refSpinnerHeightRes,
- 'value',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements keep aspect ratio check box
- let refCheckboxKeepAspectRatio = gtkDB.get_object('chb_FileResolution_kar');
- tmpS.bind(
- Settings.FILE_RESOLUTION_KAR_SETTING_KEY,
- refCheckboxKeepAspectRatio,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
-
- // implements resolution width scale option
- let refScaleWidthRes = gtkDB.get_object('scl_ResWidth');
- refScaleWidthRes.set_valign(Gtk.Align.START);
- refScaleWidthRes.set_adjustment(adjustmentResWidth);
- refScaleWidthRes.set_digits(0);
- refScaleWidthRes.set_value(this._settings.getOption('i', Settings.FILE_RESOLUTION_WIDTH_SETTING_KEY));
-
- // implements resolution height scale option
- let refScaleHeightRes = gtkDB.get_object('scl_ResHeight');
- refScaleHeightRes.set_valign(Gtk.Align.START);
- refScaleHeightRes.set_adjustment(adjustmentResHeight);
- refScaleHeightRes.set_digits(0);
- refScaleHeightRes.set_value(this._settings.getOption('i', Settings.FILE_RESOLUTION_HEIGHT_SETTING_KEY));
-
- // add marks on width/height file resolution
- let ind = 0;
- for (; ind < 13; ind++) {
- var [h, w] = ctx._getResolutionPreset(ind);
- refScaleWidthRes.add_mark(w, Gtk.PositionType.BOTTOM, '');
- refScaleHeightRes.add_mark(h, Gtk.PositionType.BOTTOM, '');
- }
-
- // implements file folder string rec option
- let refFilechooserFileFolder = gtkDB.get_object('fcb_FilePathRec');
- // check state initial value
- var tmpFolder = this._settings.getOption('s', Settings.FILE_FOLDER_SETTING_KEY);
- Lib.TalkativeLog(`-^-folder for screencast: ${tmpFolder}`);
- if (tmpFolder === '' || tmpFolder === null || tmpFolder === undefined) {
- let result = null;
- ctx.CtrlExe.Execute(
- 'xdg-user-dir VIDEOS',
- true,
- (success, out) => {
- Lib.TalkativeLog(`-^-CALLBACK sync S: ${success} out: ${out}`);
- if (success && out !== '' && out !== undefined)
- result = out.replace(/(\n)/g, '');
- },
- null
- );
-
- if (result !== null) {
- Lib.TalkativeLog(`-^-xdg-user video: ${result}`);
- tmpFolder = result;
- } else {
- Lib.TalkativeLog('-^-NOT SET xdg-user video');
-
- ctx.CtrlExe.Execute(
- '/usr/bin/sh -c "echo $HOME"',
- true,
- (success, out) => {
- Lib.TalkativeLog(`-^-CALLBACK sync S: ${success} out: ${out}`);
- if (success && out !== '' && out !== undefined)
- tmpFolder = out.replace(/(\n)/g, '');
- },
- null
- );
- }
-
- // connect keywebcam signal
- this._settings._settings.connect(
- `changed::${Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY}`,
- () => {
- Lib.TalkativeLog('-^-webcam device changed');
- this._refreshWebcamOptions();
- }
- );
- }
-
- refFilechooserFileFolder.set_label(`Selected: ${tmpFolder}`);
-
- refFilechooserFileFolder.connect('clicked', () => {
- Lib.TalkativeLog('-^- file chooser button clicked...');
-
- let dialog = new Gtk.FileChooserNative({
- 'title': 'Select folder',
- 'transient-for': refFilechooserFileFolder.get_root(),
- 'action': Gtk.FileChooserAction.SELECT_FOLDER,
- 'accept-label': 'Ok',
- 'cancel-label': 'Cancel',
- });
- dialog.connect('response', (self, response) => {
- if (response === Gtk.ResponseType.ACCEPT) {
- var tmpPathFolder = self.get_file().get_path();
- Lib.TalkativeLog(`-^-file path get from widget : ${tmpPathFolder}`);
- this._settings.setOption(
- Settings.FILE_FOLDER_SETTING_KEY,
- tmpPathFolder
- );
- refFilechooserFileFolder.set_label(`Selected: ${tmpPathFolder}`);
- }
- ctx.fileChooserDialog = null;
- });
- dialog.show();
- ctx.fileChooserDialog = dialog; // keep a reference to the dialog alive
- });
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @param {Gio.Settings} tmpS the current settings
- * @private
- */
- _initTabSupport(ctx, gtkDB, tmpS) {
- // implements textentry log
- let refTextViewEscLog = gtkDB.get_object('txe_ContainerLog');
- let refBufferLog = refTextViewEscLog.get_buffer();
-
- // implements verbose debug option
- let refSwitchVerboseDebug = gtkDB.get_object('swt_VerboseDebug');
- tmpS.bind(
- Settings.VERBOSE_DEBUG_SETTING_KEY,
- refSwitchVerboseDebug,
- 'active',
- Gio.SettingsBindFlags.DEFAULT
- );
- this._settings._settings.connect(
- `changed::${Settings.VERBOSE_DEBUG_SETTING_KEY}`,
- () => {
- Lib.setDebugEnabled(this._settings.getOption('b', Settings.VERBOSE_DEBUG_SETTING_KEY));
- }
- );
-
- refSwitchVerboseDebug.connect('state-set', self => {
- // update log display widgets
- refTextViewEscLog.sensistive = self.active;
- refComboboxLogChooser.sensitive = self.active;
- });
-
- // implements file resolution preset spinner
- let refComboboxLogChooser = gtkDB.get_object('cbt_LogChooser');
-
- // intercept combobox res changed and update width/height value
- refComboboxLogChooser.connect('changed', self => {
- const activeLog = self.active;
- Lib.TalkativeLog(`-^-log combobox changed: ${activeLog}`);
- switch (activeLog) {
- case 0:
- // clear buffer
- refBufferLog.delete(
- refBufferLog.get_start_iter(),
- refBufferLog.get_end_iter()
- );
-
- ctx.CtrlExe.Execute(
- 'journalctl --since "15 min ago" --output=cat --no-pager',
- false,
- success => {
- Lib.TalkativeLog(`-^-CALLBACK async S= ${success}`);
- },
- line => {
- let esc = line.indexOf('[ESC]');
- if (
- line !== '' &&
- line !== undefined &&
- esc !== -1
- ) {
- line += '\n';
- refBufferLog.insert(
- refBufferLog.get_end_iter(),
- line,
- line.length
- );
- }
- }
- );
- break;
- case 1:
- // clear buffer
- refBufferLog.delete(
- refBufferLog.get_start_iter(),
- refBufferLog.get_end_iter()
- );
-
- ctx.CtrlExe.Execute(
- 'journalctl --since "15 min ago" --output=cat --no-pager',
- false,
- success => {
- Lib.TalkativeLog(`-^-CALLBACK async S= ${success}`);
- if (success) {
- if (refBufferLog.get_line_count() > 0) {
- let strNOgsp = _(
- 'No Gstreamer pipeline found'
- );
- refBufferLog.insert(
- refBufferLog.get_end_iter(),
- strNOgsp,
- strNOgsp.length
- );
- }
- }
- },
- line => {
- let esc = line.indexOf('-§-final GSP :');
- if (
- line !== '' &&
- line !== undefined &&
- esc !== -1
- ) {
- line += '\n';
- refBufferLog.insert(
- refBufferLog.get_end_iter(),
- line,
- line.length
- );
- }
- }
- );
- break;
- case 2:
- // clear buffer
- refBufferLog.delete(
- refBufferLog.get_start_iter(),
- refBufferLog.get_end_iter()
- );
-
- ctx.CtrlExe.Execute(
- 'journalctl /usr/bin/gnome-shell --since "15 min ago" --output=cat --no-pager',
- false,
- success => {
- Lib.TalkativeLog(`-^-CALLBACK async S= ${success}`);
- },
- line => {
- if (line !== '' && line !== undefined) {
- line += '\n';
- refBufferLog.insert(
- refBufferLog.get_end_iter(),
- line,
- line.length
- );
- }
- }
- );
- break;
- default:
- break;
- }
- });
-
- // update state of get log
- refComboboxLogChooser.sensistive = this._settings.getOption('b', Settings.VERBOSE_DEBUG_SETTING_KEY);
-
- // implements default button action
- let refButtonSetDefaultSettings = gtkDB.get_object('btn_DefaultOption');
- refButtonSetDefaultSettings.connect('clicked', () =>
- ctx._setDefaultsettings()
- );
- }
-
- /**
- * @param {EasyScreenCastSettingsWidget} ctx the prefs/settings widget
- * @param {Gtk.Builder} gtkDB the builder that loaded the UI glade file
- * @private
- */
- _initTabInfo(ctx, gtkDB) {
- // implements info img extension
- let refImageEsc = gtkDB.get_object('img_ESC');
- refImageEsc.set_from_file(Lib.getImagePath(this._prefs.dir, 'Icon_Info.png'));
-
- // implements info version label
- let refLabelVersion = gtkDB.get_object('lbl_Version');
- refLabelVersion.set_markup(`${_('Version: ')}${this._prefs.metadata.version} (${Lib.getFullVersion()})`);
- }
-
- /**
- * @param {number} device device index
- * @private
- */
- _updateWebCamCaps(device) {
- Lib.TalkativeLog(`-^-webcam device index: ${device}`);
-
- if (device > 0) {
- this._initializeWebcamHelper();
- var listCaps = this.CtrlWebcam.getListCapsDevice(device - 1);
- Lib.TalkativeLog(`-^-webcam caps: ${listCaps.length}`);
- if (listCaps !== null && listCaps !== undefined) {
- this.Ref_ListStore_QualityWebCam.clear();
- for (var index in listCaps) {
- this.Ref_ListStore_QualityWebCam.set(
- this.Ref_ListStore_QualityWebCam.append(),
- [0],
- [listCaps[index]]
- );
- }
- } else {
- Lib.TalkativeLog('-^-NO List Caps Webcam');
- this.Ref_ListStore_QualityWebCam.clear();
- this._settings.setOption(Settings.QUALITY_WEBCAM_SETTING_KEY, '');
- }
- } else {
- Lib.TalkativeLog('-^-NO Webcam recording');
- this.Ref_ListStore_QualityWebCam.clear();
- this._settings.setOption(Settings.QUALITY_WEBCAM_SETTING_KEY, '');
- }
- }
-
- /**
- * Refreshes the webcam settings.
- *
- * @private
- */
- _refreshWebcamOptions() {
- Lib.TalkativeLog('-^-refresh webcam options');
- this._initializeWebcamHelper();
-
- // fill combobox with quality option webcam
- this._updateWebCamCaps(this._settings.getOption('i', Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY));
-
- // update webcam widget state
- this._updateStateWebcamOptions();
- }
-
- /**
- * Initializes this.CtrlWebcam if it is null.
- *
- * @private
- */
- _initializeWebcamHelper() {
- if (this.CtrlWebcam === null)
- this.CtrlWebcam = new UtilWebcam.HelperWebcam(_('Unspecified webcam'));
- }
-
- /**
- * @param {string} accel accelerator string parsable by Gtk.accelerator_parse, e.g. "<Super>E"
- * @private
- */
- _updateRowShortcut(accel) {
- Lib.TalkativeLog(`-^-update row combo key accel: ${accel}`);
-
- let [key, mods] = [0, 0];
-
- if (accel !== null && accel !== undefined) {
- let ok;
- [ok, key, mods] = Gtk.accelerator_parse(accel);
-
- if (ok !== true) {
- Lib.TalkativeLog('-^-couldn\'t parse accel');
- key = 0;
- mods = 0;
- }
- }
-
- Lib.TalkativeLog(`-^-key: ${key} mods: ${mods}`);
- this.Ref_liststore_Shortcut.set(
- this.Iter_ShortcutRow,
- [Settings.SHORTCUT_COLUMN_KEY, Settings.SHORTCUT_COLUMN_MODS],
- [key, mods]
- );
- }
-
- /**
- * @param {boolean} active custom or not custom GStream pipeline
- * @private
- */
- _setStateGSP(active) {
- // update GSP text area
- if (!active) {
- Lib.TalkativeLog('-^-custom GSP');
-
- this.Ref_stack_Quality.set_visible_child_name('pg_Custom');
- } else {
- Lib.TalkativeLog('-^-NOT custom GSP');
-
- this.Ref_stack_Quality.set_visible_child_name('pg_Preset');
-
- var audio = false;
- if (this._settings.getOption('i', Settings.INPUT_AUDIO_SOURCE_SETTING_KEY) > 0)
- audio = true;
-
- this._settings.setOption(
- Settings.PIPELINE_REC_SETTING_KEY,
- Settings.getGSPstd(audio)
- );
- }
- }
-
- /**
- * @private
- */
- _updateStateWebcamOptions() {
- Lib.TalkativeLog('-^-update webcam option widgets');
-
- var tmpDev = this._settings.getOption(
- 'i',
- Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY
- );
- this._updateWebCamCaps(tmpDev);
- if (tmpDev > 0) {
- var arrDev = this.CtrlWebcam.getNameDevices();
- this.Ref_Label_WebCam.set_text(arrDev[tmpDev - 1]);
-
- // setup label webcam caps
- var tmpCaps = this._settings.getOption(
- 's',
- Settings.QUALITY_WEBCAM_SETTING_KEY
- );
- if (tmpCaps === '') {
- this.Ref_Label_WebCamCaps.use_markup = true;
- this.Ref_Label_WebCamCaps.set_markup(
- _(
- 'No Caps selected, please select one from the caps list'
- )
- );
- } else {
- this.Ref_Label_WebCamCaps.set_text(tmpCaps);
- }
-
- // webcam recording show widget
- this.Ref_StackSwitcher_WebCam.set_sensitive(true);
- this.Ref_StackObj_WebCam.set_sensitive(true);
- } else {
- this.Ref_Label_WebCam.set_text(_('No webcam device selected'));
- // setup label webcam caps
- this.Ref_Label_WebCamCaps.set_text(_('-'));
- // webcam NOT recording hide widget
- this.Ref_StackSwitcher_WebCam.set_sensitive(false);
- this.Ref_StackObj_WebCam.set_sensitive(false);
- }
- }
-
- /**
- * @param {number} index index of the predefined resolutions
- * @returns {Array}
- * @private
- */
- _getResolutionPreset(index) {
- var arrRes = [
- [480, 640],
- [480, 854],
- [600, 800],
- [720, 960],
- [720, 1280],
- [768, 1024],
- [768, 1366],
- [1024, 1280],
- [1080, 1920],
- [1200, 1600],
- [1440, 2560],
- [2048, 2560],
- [2160, 3840],
- ];
- if (index >= 0 && index < arrRes.length)
- return arrRes[index];
- else
- return null;
- }
-
- /**
- * function to restore default value of the settings
- *
- * @private
- */
- _setDefaultsettings() {
- Lib.TalkativeLog('-^-restore default option');
-
- this._settings.setOption(Settings.SHOW_NOTIFY_ALERT_SETTING_KEY, true);
- this._settings.setOption(Settings.SHOW_AREA_REC_SETTING_KEY, false);
- this._settings.setOption(Settings.STATUS_INDICATORS_SETTING_KEY, 1);
- this._settings.setOption(Settings.DRAW_CURSOR_SETTING_KEY, true);
- this._settings.setOption(Settings.VERBOSE_DEBUG_SETTING_KEY, false);
- this._settings.setOption(Settings.ACTIVE_CUSTOM_GSP_SETTING_KEY, false);
-
- this._settings.setOption(Settings.FPS_SETTING_KEY, 30);
- this._settings.setOption(Settings.X_POS_SETTING_KEY, 0);
- this._settings.setOption(Settings.Y_POS_SETTING_KEY, 0);
- this._settings.setOption(Settings.WIDTH_SETTING_KEY, 600);
- this._settings.setOption(Settings.HEIGHT_SETTING_KEY, 400);
-
- this._settings.setOption(Settings.FILE_NAME_SETTING_KEY, 'Screencast_%d_%t');
- this._settings.setOption(Settings.FILE_FOLDER_SETTING_KEY, '');
- this._settings.setOption(Settings.ACTIVE_POST_CMD_SETTING_KEY, false);
- this._settings.setOption(Settings.ACTIVE_PRE_CMD_SETTING_KEY, false);
- this._settings.setOption(Settings.POST_CMD_SETTING_KEY, 'xdg-open _fpath &');
- this._settings.setOption(Settings.INPUT_AUDIO_SOURCE_SETTING_KEY, 0);
- this._settings.setOption(Settings.DEVICE_INDEX_WEBCAM_SETTING_KEY, 0);
- this._settings.setOption(Settings.DEVICE_WEBCAM_SETTING_KEY, '');
-
- this._settings.setOption(Settings.TIME_DELAY_SETTING_KEY, 0);
- this._settings.setOption(Settings.FILE_CONTAINER_SETTING_KEY, 0);
- this._settings.setOption(Settings.FILE_RESOLUTION_TYPE_SETTING_KEY, -1);
- this._settings.setOption(Settings.QUALITY_SETTING_KEY, 1);
- this._settings.setOption(Settings.QUALITY_WEBCAM_SETTING_KEY, '');
- this._settings.setOption(Settings.WIDTH_WEBCAM_SETTING_KEY, 20);
- this._settings.setOption(Settings.HEIGHT_WEBCAM_SETTING_KEY, 10);
- this._settings.setOption(Settings.TYPE_UNIT_WEBCAM_SETTING_KEY, 0);
- this._settings.setOption(Settings.MARGIN_X_WEBCAM_SETTING_KEY, 0);
- this._settings.setOption(Settings.MARGIN_Y_WEBCAM_SETTING_KEY, 0);
- this._settings.setOption(Settings.ALPHA_CHANNEL_WEBCAM_SETTING_KEY, 0.75);
- this._settings.setOption(Settings.CORNER_POSITION_WEBCAM_SETTING_KEY, 0);
- }
-});
-
-
-export default class EasyScreenCastPreferences extends ExtensionPreferences {
- /**
- * @param {Adw.PreferencesWindow} window preferences window?
- * @returns {EasyScreenCastSettingsWidget}
- */
- fillPreferencesWindow(window) {
- window._settings = this.getSettings();
-
- Lib.TalkativeLog('-^-Init pref widget');
-
- const page = new Adw.PreferencesPage();
-
- const group = new Adw.PreferencesGroup({
- title: _('EasyScreenCast'),
- });
- page.add(group);
-
- const widget = new EasyScreenCastSettingsWidget(this);
- group.add(widget);
-
- window.add(page);
- }
-}
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/gschemas.compiled b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/gschemas.compiled
deleted file mode 100644
index 362d39e..0000000
Binary files a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/gschemas.compiled and /dev/null differ
diff --git a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/org.gnome.shell.extensions.easyscreencast.gschema.xml b/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/org.gnome.shell.extensions.easyscreencast.gschema.xml
deleted file mode 100644
index 51bbf18..0000000
--- a/gnome/.local/share/gnome-shell/extensions/EasyScreenCast@iacopodeenosee.gmail.com/schemas/org.gnome.shell.extensions.easyscreencast.gschema.xml
+++ /dev/null
@@ -1,200 +0,0 @@
-video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
- * This encodes a single capability (fixed), but there might also be capabilities which represent options, e.g.
- * video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction) { 30/1, 25/1, 20/1 }.
- *
- * The code here will take always the first option and unroll the options for framerate.
- *
- * @param {Gst.Caps} tmpCaps capabilities of a device
- * @returns {string[]}
- */
- getCapsForIV(tmpCaps) {
- Lib.TalkativeLog('-@-get all caps from a input video');
- Lib.TalkativeLog(`-@-caps available before filtering for video/x-raw: ${tmpCaps.get_size()}`);
-
- let cleanCaps = [];
- for (let i = 0; i < tmpCaps.get_size(); i++) {
- let capsStructure = tmpCaps.get_structure(i);
-
- // only consider "video/x-raw"
- if (capsStructure.get_name() === 'video/x-raw') {
- Lib.TalkativeLog(`-@-cap : ${i} : original : ${capsStructure.to_string()}`);
-
- let tmpStr = 'video/x-raw';
- let result, number, fraction;
- result = capsStructure.get_string('format');
- if (result !== null)
- tmpStr += `, format=(string)${result}`;
- [result, number] = capsStructure.get_int('width');
- if (result === true)
- tmpStr += `, width=(int)${number}`;
- [result, number] = capsStructure.get_int('height');
- if (result === true)
- tmpStr += `, height=(int)${number}`;
- [result, number, fraction] = capsStructure.get_fraction('pixel-aspect-ratio');
- if (result === true)
- tmpStr += `, pixel-aspect-ratio=(fraction)${number}/${fraction}`;
-
-
- if (capsStructure.has_field('framerate')) {
- [result, number, fraction] = capsStructure.get_fraction('framerate');
- if (result === true) {
- // a single framerate
- this._addAndLogCapability(cleanCaps, i, `${tmpStr}, framerate=(fraction)${number}/${fraction}`);
- } else {
- // multiple framerates
-
- // unfortunately GstValueList is not supported in this gjs-binding
- // "Error: Don't know how to convert GType GstValueList to JavaScript object"
- // -> capsStructure.get_value('framerate') <- won't work
- // -> capsStructure.get_list('framerate') <- only returns the numerator of the fraction
- //
- // therefore manually parsing the framerate values from the string representation
- let framerates = capsStructure.to_string();
- framerates = framerates.substring(framerates.indexOf('framerate=(fraction){') + 21);
- framerates = framerates.substring(0, framerates.indexOf('}'));
- framerates.split(',').forEach(element => {
- let [numerator, denominator] = element.split('/', 2);
- this._addAndLogCapability(cleanCaps, i, `${tmpStr}, framerate=(fraction)${numerator.trim()}/${denominator.trim()}`);
- });
- }
- } else {
- // no framerate at all
- this._addAndLogCapability(cleanCaps, i, tmpStr);
- }
- } else {
- Lib.TalkativeLog(`-@-cap : ${i} : skipped : ${capsStructure.to_string()}`);
- }
- }
- return cleanCaps;
- }
-
- /**
- * Adds the capability str to the array caps, if it is not already there. Avoids duplicates.
- *
- * @param {Array} caps the list of capabilities
- * @param {int} originalIndex index of the original capabilities list from the device
- * @param {string} str the capability string to add
- */
- _addAndLogCapability(caps, originalIndex, str) {
- if (caps.indexOf(str) === -1) {
- caps.push(str);
- Lib.TalkativeLog(`-@-cap : ${originalIndex} : added cap : ${str}`);
- } else {
- Lib.TalkativeLog(`-@-cap : ${originalIndex} : ignore duplicated cap : ${str}`);
- }
- }
-
- /**
- * get devices IV
- *
- * @returns {Gst.Device[]}
- */
- getDevicesIV() {
- Lib.TalkativeLog('-@-get devices');
-
- var list = this.deviceMonitor.get_devices();
- Lib.TalkativeLog(`-@-devices number: ${list.length}`);
-
- // Note:
- // Although the computer may have just one webcam connected to
- // it, more than one GstDevice may be listed and all pointing to
- // the same video device (for example /dev/video0. Each
- // GstDevice is supposed to be used with a specific source, for
- // example, a pipewiresrc or a v4l2src. For now, we are only
- // using v4l2src.
- // See also: Gst.DeviceMonitor.get_providers: pipewiredeviceprovider,decklinkdeviceprovider,v4l2deviceprovider
- // CLI: "/usr/bin/gst-device-monitor-1.0 Video/Source"
- //
- // So, here we filter the devices, that have a device.path property, which
- // means, these are only v4l2 devices
-
- var filtered = list.filter(device => {
- let props = device.get_properties();
- let hasDevice = props != null && props.get_string('device.path') !== null;
- if (props != null)
- props.free();
- return hasDevice;
- });
- Lib.TalkativeLog(`-@-devices number after filtering for v4l2: ${filtered.length}`);
-
- return filtered;
- }
-
- /**
- * get array name devices IV
- *
- * @returns {Array}
- */
- getNameDevices() {
- Lib.TalkativeLog('-@-get name devices');
- let tmpArray = [];
-
- for (var index in this._listDevices) {
- var wcName = this._unspecified_webcam_text;
-
- if (this._listDevices[index].display_name !== '')
- wcName = this._listDevices[index].display_name;
-
- tmpArray.push(wcName);
- }
-
- Lib.TalkativeLog(`-@-list devices name: ${tmpArray}`);
- return tmpArray;
- }
-
- /**
- * get array caps
- *
- * @param {int} index device
- * @returns {string[]}
- */
- getListCapsDevice(index) {
- const tmpArray = this._listCaps[index];
- Lib.TalkativeLog(`-@-list caps of device: ${tmpArray}`);
- return tmpArray;
- }
-
- /**
- * start listening
- */
- startMonitor() {
- Lib.TalkativeLog('-@-start video devicemonitor');
- this.deviceMonitor.start();
- }
-
- /**
- * Stop listening
- */
- stopMonitor() {
- Lib.TalkativeLog('-@-stop video devicemonitor');
- this.disconnectSourceBus();
- this.deviceMonitor.stop();
- }
-
- /**
- * disconect bus
- */
- disconnectSourceBus() {
- if (this.dmBusId) {
- this.dmBus.disconnect(this.dmBusId);
- this.dmBusId = 0;
- }
- }
-});
diff --git a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/locale/fr/LC_MESSAGES/vitals.mo b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/locale/fr/LC_MESSAGES/vitals.mo
index 5eb2d78..1260f3d 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/locale/fr/LC_MESSAGES/vitals.mo and b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/locale/fr/LC_MESSAGES/vitals.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/metadata.json b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/metadata.json
index bef804f..47a1c75 100644
--- a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/metadata.json
+++ b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/metadata.json
@@ -11,9 +11,10 @@
"45",
"46",
"47",
- "48"
+ "48",
+ "49"
],
"url": "https://github.com/corecoding/Vitals",
"uuid": "Vitals@CoreCoding.com",
- "version": 71
+ "version": 73
}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/sensors.js b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/sensors.js
index fa49d41..f310161 100644
--- a/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/sensors.js
+++ b/gnome/.local/share/gnome-shell/extensions/Vitals@CoreCoding.com/sensors.js
@@ -230,16 +230,20 @@ export const Sensors = GObject.registerClass({
let hertz = (sum / freqs.length) * 1000 * 1000;
this._returnValue(callback, 'Frequency', hertz, 'processor', 'hertz');
- //let max_hertz = Math.getMaxOfArray(freqs) * 1000 * 1000;
- //this._returnValue(callback, 'Boost', max_hertz, 'processor', 'hertz');
+ let max_hertz = freqs.reduce((a, b) => Math.max(a, b)) * 1000 * 1000;
+ this._returnValue(callback, 'Max frequency', max_hertz, 'processor', 'hertz');
+ let min_hertz = freqs.reduce((a, b) => Math.min(a, b)) * 1000 * 1000;
+ this._returnValue(callback, 'Min frequency', min_hertz, 'processor', 'hertz');
}).catch(err => { });
// if frequency scaling is enabled, cpu-freq reports
} else if (Object.values(this._last_processor['speed']).length > 0) {
let sum = this._last_processor['speed'].reduce((a, b) => a + b);
let hertz = (sum / this._last_processor['speed'].length) * 1000;
this._returnValue(callback, 'Frequency', hertz, 'processor', 'hertz');
- //let max_hertz = Math.getMaxOfArray(this._last_processor['speed']) * 1000;
- //this._returnValue(callback, 'Boost', max_hertz, 'processor', 'hertz');
+ let max_hertz = this._last_processor['speed'].reduce((a, b) => Math.max(a, b)) * 1000;
+ this._returnValue(callback, 'Max frequency', max_hertz, 'processor', 'hertz');
+ let min_hertz = this._last_processor['speed'].reduce((a, b) => Math.min(a, b)) * 1000;
+ this._returnValue(callback, 'Min frequency', min_hertz, 'processor', 'hertz');
}
}
@@ -455,7 +459,7 @@ export const Sensors = GObject.registerClass({
this._returnValue(callback, 'Energy (now)', output['ENERGY_NOW'], 'battery', 'watt-hour');
}
- if ('ENERGY_FULL' in output && 'ENERGY_NOW' in output && 'POWER_NOW' in output && output['POWER_NOW'] > 0 && 'STATUS' in output && (output['STATUS'] == 'Charging' || output['STATUS'] == 'Discharging')) {
+ if ('ENERGY_FULL' in output && 'ENERGY_NOW' in output && 'POWER_NOW' in output && output['POWER_NOW'] !== 0 && 'STATUS' in output && (output['STATUS'] == 'Charging' || output['STATUS'] == 'Discharging')) {
let timeLeft = 0;
@@ -463,7 +467,7 @@ export const Sensors = GObject.registerClass({
if (output['STATUS'] == 'Charging') {
timeLeft = ((output['ENERGY_FULL'] - output['ENERGY_NOW']) / output['POWER_NOW']);
} else {
- timeLeft = (output['ENERGY_NOW'] / output['POWER_NOW']);
+ timeLeft = (output['ENERGY_NOW'] / Math.abs(output['POWER_NOW']));
}
// don't process Infinity values
@@ -644,7 +648,7 @@ export const Sensors = GObject.registerClass({
if(vendor === "0x1002") {
// read GPU usage and create group lebel for card
new FileModule.File('/sys/class/drm/card'+i+'/device/gpu_busy_percent').read().then(value => {
- // create group
+ // create group
this._returnGpuValue(callback, 'Graphics', parseInt(value) * 0.01, typeName + '-group', 'percent');
this._returnGpuValue(callback, 'Vendor', "AMD", typeName, 'string');
this._returnGpuValue(callback, 'Usage', parseInt(value) * 0.01, typeName, 'percent');
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/custom-icons-symbolic.svg b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/custom-icons-symbolic.svg
new file mode 100644
index 0000000..bfc3698
--- /dev/null
+++ b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/custom-icons-symbolic.svg
@@ -0,0 +1,46 @@
+
+
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/general-preferences-symbolic.svg b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/general-preferences-symbolic.svg
new file mode 100644
index 0000000..6334430
--- /dev/null
+++ b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/icons/hicolor/scalable/actions/general-preferences-symbolic.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ar/LC_MESSAGES/AppIndicatorExtension.mo b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ar/LC_MESSAGES/AppIndicatorExtension.mo
new file mode 100644
index 0000000..6c73616
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ar/LC_MESSAGES/AppIndicatorExtension.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/cs/LC_MESSAGES/AppIndicatorExtension.mo b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/cs/LC_MESSAGES/AppIndicatorExtension.mo
index 93c4c6d..4cedb41 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/cs/LC_MESSAGES/AppIndicatorExtension.mo and b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/cs/LC_MESSAGES/AppIndicatorExtension.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ka/LC_MESSAGES/AppIndicatorExtension.mo b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ka/LC_MESSAGES/AppIndicatorExtension.mo
new file mode 100644
index 0000000..0773c28
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ka/LC_MESSAGES/AppIndicatorExtension.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ru/LC_MESSAGES/AppIndicatorExtension.mo b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ru/LC_MESSAGES/AppIndicatorExtension.mo
index 46e5781..b4dfbe5 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ru/LC_MESSAGES/AppIndicatorExtension.mo and b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/locale/ru/LC_MESSAGES/AppIndicatorExtension.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/metadata.json b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/metadata.json
index 898dc6c..15be423 100644
--- a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/metadata.json
+++ b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/metadata.json
@@ -8,9 +8,10 @@
"45",
"46",
"47",
- "48"
+ "48",
+ "49"
],
"url": "https://github.com/ubuntu/gnome-shell-extension-appindicator",
"uuid": "appindicatorsupport@rgcjonas.gmail.com",
- "version": 60
+ "version": 61
}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/customIconPage.js b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/customIconPage.js
new file mode 100644
index 0000000..b132562
--- /dev/null
+++ b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/customIconPage.js
@@ -0,0 +1,240 @@
+/* exported GeneralPage*/
+
+import Adw from 'gi://Adw';
+import Gtk from 'gi://Gtk';
+import GObject from 'gi://GObject';
+import Gio from 'gi://Gio';
+import GLib from 'gi://GLib';
+import {gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
+
+const IconData = GObject.registerClass({
+ GTypeName: 'IconData',
+ Properties: {
+ 'id': GObject.ParamSpec.string(
+ 'id',
+ 'Id',
+ 'A read and write string property',
+ GObject.ParamFlags.READWRITE,
+ ''
+ ),
+ 'name': GObject.ParamSpec.string(
+ 'name',
+ 'Name',
+ 'A read and write string property',
+ GObject.ParamFlags.READWRITE,
+ ''
+ ),
+ 'at-name': GObject.ParamSpec.string(
+ 'at-name',
+ 'At Name',
+ 'A read and write string property',
+ GObject.ParamFlags.READWRITE,
+ ''
+ ),
+
+ },
+}, class IconData extends GObject.Object {
+ constructor(props = {}) {
+ super(props);
+ }
+
+ get id() {
+ if (this._id === 'undefined')
+ this._id = null;
+ return this._id;
+ }
+
+ set id(value) {
+ if (this.id === value)
+ return;
+
+ this._id = value;
+ this.notify('id');
+ }
+
+ get name() {
+ if (this._name === 'undefined')
+ this._name = null;
+ return this._name;
+ }
+
+ set name(value) {
+ if (this.name === value)
+ return;
+
+ this._name = value;
+ this.notify('name');
+ }
+
+ get atName() {
+ if (this._atName === 'undefined')
+ this._atName = null;
+ return this._atName;
+ }
+
+ set atName(value) {
+ if (this.atName === value)
+ return;
+
+ this._atName = value;
+ this.notify('at-name');
+ }
+});
+
+export var CustomIconPage = GObject.registerClass(
+class AppIndicatorCustomIconPage extends Adw.PreferencesPage {
+ _init(settings, settingsKey) {
+ super._init({
+ title: _('Custom Icons'),
+ icon_name: 'custom-icons-symbolic',
+ name: 'Custom Icons Page',
+ });
+ this._settings = settings;
+ this._settingsKey = settingsKey;
+
+ this.group = new Adw.PreferencesGroup();
+
+ this.container = new Gtk.Box({
+ halign: Gtk.Align.FILL,
+ hexpand: true,
+ orientation: Gtk.Orientation.VERTICAL,
+ });
+
+ this.listStore = new Gio.ListStore({
+ item_type: IconData,
+ });
+
+ const initList = this._settings.get_value(this._settingsKey.CUSTOM_ICONS).deep_unpack();
+ initList.forEach(pair => {
+ let data = new IconData({
+ id: pair[0],
+ name: pair[1],
+ atName: pair[2],
+ });
+ this.listStore.append(data);
+ });
+
+ this.listStore.append(new IconData({id: '', name: '', atName: ''}));
+
+ this.selectionModel = new Gtk.SingleSelection({
+ model: this.listStore,
+ });
+
+ this.columnView = new Gtk.ColumnView({
+ hexpand: true,
+ model: this.selectionModel,
+ reorderable: false,
+ });
+
+ const columnTitles = [
+ _('Indicator ID'),
+ _('Icon Name'),
+ _('Attention Icon Name'),
+ ];
+ const indicatorIdColumn = new Gtk.ColumnViewColumn({
+ title: columnTitles[0],
+ expand: true,
+ });
+ const iconNameColumn = new Gtk.ColumnViewColumn({
+ title: columnTitles[1],
+ expand: true,
+ });
+ const attentionIconNameColumn = new Gtk.ColumnViewColumn({
+ title: columnTitles[2],
+ expand: true,
+ });
+
+
+ const factoryId = new Gtk.SignalListItemFactory();
+ factoryId.connect('setup', (_widget, item) => {
+ const label = new Gtk.EditableLabel({text: ''});
+ item.set_child(label);
+ });
+ factoryId.connect('bind', (_widget, item) => {
+ const label = item.get_child();
+ const data = item.get_item();
+ label.set_text(data.id);
+ label.bind_property('text', data, 'id', GObject.BindingFlags.SYNC_CREATE);
+ label.connect('changed', () => this._autoSave(item));
+ });
+
+ const factoryName = new Gtk.SignalListItemFactory();
+ factoryName.connect('setup', (_widget, item) => {
+ const label = new Gtk.EditableLabel({text: ''});
+ item.set_child(label);
+ });
+ factoryName.connect('bind', (_widget, item) => {
+ const label = item.get_child();
+ const data = item.get_item();
+ label.set_text(data.name);
+ label.bind_property('text', data, 'name', GObject.BindingFlags.SYNC_CREATE);
+ label.connect('changed', () => this._autoSave(item));
+ });
+
+ const factoryItName = new Gtk.SignalListItemFactory();
+ factoryItName.connect('setup', (_widget, item) => {
+ const label = new Gtk.EditableLabel({text: ''});
+ item.set_child(label);
+ });
+ factoryItName.connect('bind', (_widget, item) => {
+ const label = item.get_child();
+ const data = item.get_item();
+ label.set_text(data.atName);
+ label.bind_property('text', data, 'at-name', GObject.BindingFlags.SYNC_CREATE);
+ label.connect('changed', () => this._autoSave(item));
+ });
+
+ indicatorIdColumn.set_factory(factoryId);
+ iconNameColumn.set_factory(factoryName);
+ attentionIconNameColumn.set_factory(factoryItName);
+
+ this.columnView.append_column(indicatorIdColumn);
+ this.columnView.append_column(iconNameColumn);
+ this.columnView.append_column(attentionIconNameColumn);
+
+ this.container.append(this.columnView);
+
+ this.group.add(this.container);
+ this.add(this.group);
+ }
+
+ _autoSave(item) {
+ const storeLength = this.listStore.get_n_items();
+ const newStore = [];
+
+ for (let i = 0; i < storeLength; i++) {
+ const currentItem = this.listStore.get_item(i);
+ const id = currentItem.id;
+ const name = currentItem.name;
+ const atName = currentItem.atName;
+ if (id && name)
+ newStore.push([id, name, atName || '']);
+ }
+
+ this._settings.set_value(this._settingsKey.CUSTOM_ICONS,
+ new GLib.Variant('a(sss)', newStore));
+
+ const id = item.get_item().id;
+ const name = item.get_item().name;
+
+ /* dynamic new entry*/
+ if (storeLength === 1 && (id || name))
+ this.listStore.append(new IconData({id: '', name: '', atName: ''}));
+
+ if (storeLength > 1) {
+ if ((id || name) && item.get_position() >= storeLength - 1)
+ this.listStore.append(new IconData({id: '', name: '', atName: ''}));
+ }
+ }
+
+ _autoDelete(item) {
+ const storeLength = this.listStore.get_n_items();
+ const id = item.get_item().id;
+ const name = item.get_item().name;
+ if (storeLength > 1 && !id && !name &&
+ item.get_position() < storeLength - 1)
+ this.listStore.remove(item.get_position());
+ }
+});
+
+
diff --git a/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/generalPage.js b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/generalPage.js
new file mode 100644
index 0000000..d699141
--- /dev/null
+++ b/gnome/.local/share/gnome-shell/extensions/appindicatorsupport@rgcjonas.gmail.com/preferences/generalPage.js
@@ -0,0 +1,141 @@
+/* exported GeneralPage*/
+
+import Adw from 'gi://Adw';
+import Gtk from 'gi://Gtk';
+import GObject from 'gi://GObject';
+import {gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
+
+
+export var GeneralPage = GObject.registerClass(
+class AppIndicatorGeneralPage extends Adw.PreferencesPage {
+ _init(settings, settingsKey) {
+ super._init({
+ title: _('General'),
+ icon_name: 'general-preferences-symbolic',
+ name: 'General Page',
+ });
+
+ this._settings = settings;
+ this._settingsKey = settingsKey;
+
+ this.group = new Adw.PreferencesGroup(); // no title since only single group
+
+ const legacyTraySwitch = new Adw.SwitchRow({
+ title: _('Enable Legacy Tray Icons support'),
+ subtitle: _('Add X11 legacy tray icons to the panel area'),
+ active: this._settings.get_boolean(this._settingsKey.LEGACY_TRAY_ENABLED),
+ });
+
+ legacyTraySwitch.connect('notify::active', widget =>
+ this._settings.set_boolean(this._settingsKey.LEGACY_TRAY_ENABLED,
+ widget.get_active()));
+
+ this.group.add(legacyTraySwitch);
+
+ this._createSpinRow({
+ title: _('Opacity'),
+ settingsKey: this._settingsKey.ICON_OPACITY,
+ from: 0,
+ to: 255,
+ step: 1,
+ round: true,
+ });
+
+ this._createSpinRow({
+ title: _('Desaturation'),
+ settingsKey: this._settingsKey.ICON_SATURATION,
+ from: 0.0,
+ to: 1.0,
+ step: 0.1,
+ });
+
+ this._createSpinRow({
+ title: _('Brightness'),
+ settingsKey: this._settingsKey.ICON_BRIGHTNESS,
+ from: -1.0,
+ to: 1.0,
+ step: 0.1,
+ });
+
+ this._createSpinRow({
+ title: _('Contrast'),
+ settingsKey: this._settingsKey.ICON_CONTRAST,
+ from: -1.0,
+ to: 1.0,
+ step: 0.1,
+ });
+
+ this._createSpinRow({
+ title: _('Icon Size'),
+ settingsKey: this._settingsKey.ICON_SIZE,
+ from: 0,
+ to: 96,
+ step: 2,
+ round: true,
+ });
+
+ const alignmentList = new Gtk.StringList();
+ const comboItems = [
+ {pos: 'center', label: _('Center')},
+ {pos: 'left', label: _('Left')},
+ {pos: 'right', label: _('Right')},
+ ];
+
+ comboItems.forEach(item => alignmentList.append(item.label));
+
+ const combo = new Adw.ComboRow({
+ title: _('Tray Horizontal Alignment'),
+ model: alignmentList,
+ });
+ const trayPos = this._settings.get_string(this._settingsKey.TRAY_POS);
+ combo.set_selected(comboItems.findIndex(item => trayPos === item.pos));
+
+ combo.connect('notify::selected', widget => this._settings.set_string(
+ this._settingsKey.TRAY_POS, comboItems[widget.get_selected()].pos));
+
+ this.group.add(combo);
+ this.add(this.group);
+ }
+
+ _createSpinRow(args) {
+ let title = args.title || 'Default Title';
+ let subtitle = args.subtitle || null;
+ let settingsKey = args.settingsKey || '';
+ let from = args.from || 0;
+ let to = args.to || 100;
+ let step = args.step || 1;
+ let round = args.round || false;
+
+ let spin = Adw.SpinRow.new_with_range(from, to, step);
+ spin.title = title;
+ if (subtitle !== null)
+ spin.subtitle = subtitle;
+
+ if (round)
+ spin.set_value(this._settings.get_int(settingsKey));
+ else
+ spin.set_value(this._settings.get_int(settingsKey));
+
+
+ spin.connect('input', widget => {
+ if (round)
+ this._settings.set_int(settingsKey, parseInt(widget.get_value(), 10));
+ else
+ this._settings.set_double(settingsKey, widget.get_value());
+
+ return false;
+ });
+ spin.connect('output', widget => {
+ if (round)
+ this._settings.set_int(settingsKey, parseInt(widget.get_value(), 10));
+ else
+ this._settings.set_double(settingsKey, widget.get_value());
+
+ return false;
+ });
+
+ this.group.add(spin);
+ }
+});
+
+
diff --git a/gnome/.local/share/gnome-shell/extensions/auto-activities@CleoMenezesJr.github.io/metadata.json b/gnome/.local/share/gnome-shell/extensions/auto-activities@CleoMenezesJr.github.io/metadata.json
index d65512b..22f6ffd 100644
--- a/gnome/.local/share/gnome-shell/extensions/auto-activities@CleoMenezesJr.github.io/metadata.json
+++ b/gnome/.local/share/gnome-shell/extensions/auto-activities@CleoMenezesJr.github.io/metadata.json
@@ -11,10 +11,10 @@
"original-author": "mi-jan-sena@proton.me",
"settings-schema": "org.gnome.shell.extensions.auto-activities",
"shell-version": [
- "48"
+ "49"
],
"url": "https://github.com/CleoMenezesJr/auto-activities",
"uuid": "auto-activities@CleoMenezesJr.github.io",
- "version": 15,
- "version-name": "48.0"
+ "version": 16,
+ "version-name": "49.0"
}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js
index 4562106..a78317c 100644
--- a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js
+++ b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/components/panel.js
@@ -1,4 +1,5 @@
import St from 'gi://St';
+import GLib from 'gi://GLib';
import Meta from 'gi://Meta';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
@@ -83,23 +84,34 @@ export const PanelBlur = class PanelBlur {
}
blur_dtp_panels() {
- // FIXME when Dash to Panel changes its size, it seems it creates new
- // panels; but I can't get to delete old widgets
-
- // blur every panel found
- global.dashToPanel.panels.forEach(p => {
- this.maybe_blur_panel(p.panel);
+ // Defer the blurring to the next idle cycle.
+ // This is crucial to ensure the panel actors have been allocated their
+ // final size and position by the compositor, avoiding race conditions
+ // during extension startup.
+ GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
+ if (!global.dashToPanel?.panels) {
+ return GLib.SOURCE_REMOVE;
+ }
+
+ this._log("Blurring Dash to Panel panels after idle.");
+
+ // blur every panel found
+ global.dashToPanel.panels.forEach(p => {
+ this.maybe_blur_panel(p.panel);
+ });
+
+ // if main panel is not included in the previous panels, blur it
+ if (
+ !global.dashToPanel.panels
+ .map(p => p.panel)
+ .includes(Main.panel)
+ &&
+ this.settings.dash_to_panel.BLUR_ORIGINAL_PANEL
+ )
+ this.maybe_blur_panel(Main.panel);
+
+ return GLib.SOURCE_REMOVE;
});
-
- // if main panel is not included in the previous panels, blur it
- if (
- !global.dashToPanel.panels
- .map(p => p.panel)
- .includes(Main.panel)
- &&
- this.settings.dash_to_panel.BLUR_ORIGINAL_PANEL
- )
- this.maybe_blur_panel(Main.panel);
};
/// Blur a panel only if it is not already blurred (contained in the list)
@@ -438,11 +450,15 @@ export const PanelBlur = class PanelBlur {
let same_monitor = actors.monitor.index == window_monitor_i;
let window_vertical_pos = meta_window.get_frame_rect().y;
+ let window_vertical_bottom = window_vertical_pos + meta_window.get_frame_rect().height;
// if so, and if in the same monitor, then it overlaps
if (same_monitor
&&
- window_vertical_pos < panel_bottom + 5 * scale
+ // check if panel is on top
+ ((panel_top === 0 && window_vertical_pos < panel_bottom + 5 * scale) ||
+ // check if panel is at the bottom
+ (panel_top > 0 && window_vertical_bottom > panel_top - 5 * scale))
)
window_overlap_panel = true;
});
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo
index 9228b72..7fd4c31 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/af/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo
index ccb2bb2..05ebeaa 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ar/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo
index 4bfe928..2d37384 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/az/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo
index 818a7e2..6229b38 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/be/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo
index 1fc31e5..9d8da30 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/bg/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo
index c21daf4..71efa48 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ca/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo
index 799f757..8f46756 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/cs/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo
index 155dcbb..b44f3c8 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/da/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo
index 2b367d4..416e6ef 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/de/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo
index fc3ca9b..c671ffa 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/el/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo
index e7b9134..352d3bc 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/es/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo
index 2719fca..a92f357 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/et/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo
index 09c4422..4e50603 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fi/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo
index 1bb85eb..a3a72a3 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/fr/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo
index abb4ac0..a140ba0 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/he/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo
index ee819a7..d3801bb 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hi/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hr/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hr/LC_MESSAGES/blur-my-shell@aunetx.mo
index 7a2a318..45ed92c 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hr/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hr/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo
index f181edb..8ca7d7e 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/hu/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo
index cf71764..cad32d5 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/id/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo
index d4f5e58..b9f2303 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/it/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo
index ae09442..12d1d52 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ja/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo
index 8c7b510..f38aa09 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ka/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo
index c940d4b..9088bf3 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ko/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ml/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ml/LC_MESSAGES/blur-my-shell@aunetx.mo
new file mode 100644
index 0000000..6573c2c
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ml/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/mrh/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/mrh/LC_MESSAGES/blur-my-shell@aunetx.mo
new file mode 100644
index 0000000..cfd9fc9
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/mrh/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/my/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/my/LC_MESSAGES/blur-my-shell@aunetx.mo
new file mode 100644
index 0000000..9123894
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/my/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo
index 2436b7c..50cdf68 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nb_NO/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo
index fdca051..a1a3517 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nl/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo
index c872ad0..28f7c42 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/nn/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo
index 61ad499..0487afe 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pl/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo
index 8565f59..def333f 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo
index efcc800..a76994e 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/pt_BR/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo
index eb69073..74b52b7 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ro/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo
index 84960bb..f7ba1de 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ru/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sk/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sk/LC_MESSAGES/blur-my-shell@aunetx.mo
new file mode 100644
index 0000000..be8e9a4
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sk/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo
index 0ceab79..34b6505 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sl/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo
index 18fdfb2..a2db609 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/sv/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo
index 52334a7..8fc6e3d 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/ta/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo
index 3e9d533..04fce82 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/tr/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo
index 38b4c47..9957d99 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/uk/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo
index 38be0d0..385f8fa 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/vi/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_CN/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_CN/LC_MESSAGES/blur-my-shell@aunetx.mo
index 41b29f7..7b84952 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_CN/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_CN/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo
index 3a40372..20e60f5 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo and b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/locale/zh_TW/LC_MESSAGES/blur-my-shell@aunetx.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/metadata.json b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/metadata.json
index 7057c8d..6e059de 100644
--- a/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/metadata.json
+++ b/gnome/.local/share/gnome-shell/extensions/blur-my-shell@aunetx/metadata.json
@@ -18,9 +18,10 @@
"shell-version": [
"46",
"47",
- "48"
+ "48",
+ "49"
],
"url": "https://github.com/aunetx/blur-my-shell",
"uuid": "blur-my-shell@aunetx",
- "version": 68
+ "version": 70
}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json
index 1e32877..0d6c3c3 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/config/windows.json
@@ -8,8 +8,8 @@
{ "wmClass": "jetbrains-datagrip", "wmTitle": "splash", "mode": "float" },
{ "wmClass": "jetbrains-rubymine", "wmTitle": "splash", "mode": "float" },
{ "wmClass": "jetbrains-idea", "wmTitle": "splash", "mode": "float" },
- { "wmClass": "Com.github.amezin.ddterm", "mode": "float" },
- { "wmClass": "Com.github.donadigo.eddy", "mode": "float" },
+ { "wmClass": "com.github.amezin.ddterm", "mode": "float" },
+ { "wmClass": "com.github.donadigo.eddy", "mode": "float" },
{ "wmClass": "Conky", "mode": "float" },
{ "wmClass": "Gnome-initial-setup", "mode": "float" },
{ "wmClass": "org.gnome.Calculator", "mode": "float" },
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js
index 0fa2981..c7cf7fe 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/tree.js
@@ -831,6 +831,7 @@ export class Tree extends Node {
let metaWindow = next.nodeValue;
if (!metaWindow) return null;
+ const previousMetaWindow = this.extWm.focusMetaWindow;
if (metaWindow.minimized) {
next = this.focus(next, direction);
} else {
@@ -838,14 +839,18 @@ export class Tree extends Node {
metaWindow.focus(global.display.get_current_time());
metaWindow.activate(global.display.get_current_time());
+ const monitorArea = metaWindow.get_work_area_current_monitor();
+ const ptr = this.extWm.getPointer();
+ const pointerInside = Utils.rectContainsPoint(monitorArea, [ptr[0], ptr[1]]);
+ const monitorChanged =
+ !!previousMetaWindow &&
+ previousMetaWindow.get_monitor &&
+ previousMetaWindow.get_monitor() !== metaWindow.get_monitor();
+
if (this.settings.get_boolean("move-pointer-focus-enabled")) {
this.extWm.movePointerWith(next);
- } else {
- let monitorArea = metaWindow.get_work_area_current_monitor();
- let ptr = this.extWm.getPointer();
- if (!Utils.rectContainsPoint(monitorArea, [ptr[0], ptr[1]])) {
- this.extWm.movePointerWith(next);
- }
+ } else if (!pointerInside) {
+ this.extWm.movePointerWith(next, { force: monitorChanged });
}
}
return next;
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js
index b02d8d5..0126f16 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/extension/window.js
@@ -67,8 +67,7 @@ export class WindowManager extends GObject.Object {
this.prefsTitle = `Forge ${_("Settings")} - ${
!production ? "DEV" : `${PACKAGE_VERSION}-${ext.metadata.version}`
}`;
- this.windowProps = this.ext.configMgr.windowProps;
- this.windowProps.overrides = this.windowProps.overrides.filter((override) => !override.wmId);
+ this.reloadWindowOverrides();
this._kbd = this.ext.keybindings;
this._tree = new Tree(this);
this.eventQueue = new Queue();
@@ -98,11 +97,12 @@ export class WindowManager extends GObject.Object {
}
addFloatOverride(metaWindow, withWmId) {
- let overrides = this.windowProps.overrides;
+ let currentProps = this.ext.configMgr.windowProps;
+ let overrides = currentProps.overrides;
let wmClass = metaWindow.get_wm_class();
let wmId = metaWindow.get_id();
- for (let override in overrides) {
+ for (let override of overrides) {
// if the window is already floating
if (override.wmClass === wmClass && override.mode === "float" && !override.wmTitle) return;
}
@@ -111,12 +111,15 @@ export class WindowManager extends GObject.Object {
wmId: withWmId ? wmId : undefined,
mode: "float",
});
- this.windowProps.overrides = overrides;
- this.ext.configMgr.windowProps = this.windowProps;
+
+ // Save the updated overrides back to the ConfigManager
+ currentProps.overrides = overrides;
+ this.ext.configMgr.windowProps = currentProps;
}
removeFloatOverride(metaWindow, withWmId) {
- let overrides = this.windowProps.overrides;
+ let currentProps = this.ext.configMgr.windowProps;
+ let overrides = currentProps.overrides;
let wmClass = metaWindow.get_wm_class();
let wmId = metaWindow.get_id();
overrides = overrides.filter(
@@ -129,8 +132,9 @@ export class WindowManager extends GObject.Object {
)
);
- this.windowProps.overrides = overrides;
- this.ext.configMgr.windowProps = this.windowProps;
+ // Save the updated overrides back to the ConfigManager
+ currentProps.overrides = overrides;
+ this.ext.configMgr.windowProps = currentProps;
}
toggleFloatingMode(action, metaWindow) {
@@ -285,6 +289,11 @@ export class WindowManager extends GObject.Object {
settings.connect("changed", (_, settingName) => {
switch (settingName) {
+ case "window-overrides-reload-trigger":
+ // Reload window overrides when triggered by preferences
+ // This prevents the main extension from overwriting changes made by preferences
+ this.reloadWindowOverrides();
+ break;
case "focus-border-toggle":
this.renderTree(settingName);
break;
@@ -951,9 +960,16 @@ export class WindowManager extends GObject.Object {
move(metaWindow, rect) {
if (!metaWindow) return;
if (metaWindow.grabbed) return;
- metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
- metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
- metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+ try {
+ // GNOME 49+
+ metaWindow.set_unmaximize_flags(Meta.MaximizeFlags.BOTH);
+ metaWindow.unmaximize();
+ } catch (e) {
+ // pre-49 fallback
+ metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
+ metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
+ metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+ }
let windowActor = metaWindow.get_compositor_private();
if (!windowActor) return;
@@ -1235,7 +1251,13 @@ export class WindowManager extends GObject.Object {
let tilingModeEnabled = this.ext.settings.get_boolean("tiling-mode-enabled");
let gap = this.calculateGaps(nodeWindow);
let maximized = () => {
- return metaWindow.get_maximized() === 3 || metaWindow.is_fullscreen() || gap === 0;
+ try {
+ // GNOME 49+
+ return metaWindow.is_maximized() || metaWindow.is_fullscreen() || gap === 0;
+ } catch (e) {
+ // pre-49 fallback
+ return metaWindow.get_maximized() === 3 || metaWindow.is_fullscreen() || gap === 0;
+ }
};
let monitorCount = global.display.get_n_monitors();
let tiledChildren = this.tree.getTiledChildren(nodeWindow.parentNode.childNodes);
@@ -1287,7 +1309,18 @@ export class WindowManager extends GObject.Object {
}
}
- if (gap === 0 || metaWindow.get_maximized() === 1 || metaWindow.get_maximized() === 2) {
+ if (
+ gap === 0 ||
+ (() => {
+ try {
+ // GNOME 49+
+ return metaWindow.is_maximized();
+ } catch (e) {
+ // pre-49 fallback
+ return metaWindow.get_maximized() === 1 || metaWindow.get_maximized() === 2;
+ }
+ })()
+ ) {
inset = 0;
}
@@ -1506,9 +1539,16 @@ export class WindowManager extends GObject.Object {
{
name: "window-create-queue",
callback: () => {
- metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
- metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
- metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+ try {
+ // GNOME 49+
+ metaWindow.set_unmaximize_flags(Meta.MaximizeFlags.BOTH);
+ metaWindow.unmaximize();
+ } catch (e) {
+ // pre-49 fallback
+ metaWindow.unmaximize(Meta.MaximizeFlags.HORIZONTAL);
+ metaWindow.unmaximize(Meta.MaximizeFlags.VERTICAL);
+ metaWindow.unmaximize(Meta.MaximizeFlags.BOTH);
+ }
this.renderTree("window-create", true);
},
},
@@ -1727,7 +1767,17 @@ export class WindowManager extends GObject.Object {
this._handleMoving(focusNodeWindow);
}
} else {
- if (focusMetaWindow.get_maximized() === 0) {
+ if (
+ (() => {
+ try {
+ // GNOME 49+
+ return !focusMetaWindow.is_maximized();
+ } catch (e) {
+ // pre-49 fallback
+ return focusMetaWindow.get_maximized() === 0;
+ }
+ })()
+ ) {
this.renderTree(from);
}
}
@@ -1765,9 +1815,18 @@ export class WindowManager extends GObject.Object {
let monWsNoMaxWindows = activeWsNode.getNodeByType(NODE_TYPES.MONITOR).filter((monitor) => {
return (
monitor.getNodeByType(NODE_TYPES.WINDOW).filter((w) => {
- return (
- w.nodeValue.get_maximized() === Meta.MaximizeFlags.BOTH || w.nodeValue.is_fullscreen()
- );
+ return (() => {
+ try {
+ // GNOME 49+
+ return w.nodeValue.is_maximized() || w.nodeValue.is_fullscreen();
+ } catch (e) {
+ // pre-49 fallback
+ return (
+ w.nodeValue.get_maximized() === Meta.MaximizeFlags.BOTH ||
+ w.nodeValue.is_fullscreen()
+ );
+ }
+ })();
}).length === 0
);
});
@@ -1814,9 +1873,10 @@ export class WindowManager extends GObject.Object {
* This is useful for making sure that Forge calculates the attachNode
* properly
*/
- movePointerWith(nodeWindow) {
+ movePointerWith(nodeWindow, { force = false } = {}) {
if (!nodeWindow || !nodeWindow._data) return;
- if (this.ext.settings.get_boolean("move-pointer-focus-enabled")) {
+ const shouldWarp = force || this.ext.settings.get_boolean("move-pointer-focus-enabled");
+ if (shouldWarp) {
this.storePointerLastPosition(this.lastFocusedWindow);
if (this.canMovePointerInsideNodeWindow(nodeWindow)) {
this.warpPointerToNodeWindow(nodeWindow);
@@ -2410,7 +2470,17 @@ export class WindowManager extends GObject.Object {
}
this._grabCleanup(focusNodeWindow);
- if (focusMetaWindow.get_maximized() === 0) {
+ if (
+ (() => {
+ try {
+ // GNOME 49+
+ return !focusMetaWindow.is_maximized();
+ } catch (e) {
+ // pre-49 fallback
+ return focusMetaWindow.get_maximized() === 0;
+ }
+ })()
+ ) {
this.renderTree("grab-op-end");
}
@@ -2708,6 +2778,20 @@ export class WindowManager extends GObject.Object {
return `mo${display.get_current_monitor()}`;
}
+ /**
+ * Reload window overrides from the configuration file
+ * This is called when the preferences page modifies the overrides
+ */
+ reloadWindowOverrides() {
+ // Get fresh data from the ConfigManager
+ const freshProps = this.ext.configMgr.windowProps;
+ if (freshProps) {
+ this.windowProps = freshProps;
+ this.windowProps.overrides = this.windowProps.overrides.filter((override) => !override.wmId);
+ Logger.info(`Reloaded ${this.windowProps.overrides.length} window overrides from file`);
+ }
+ }
+
floatAllWindows() {
this.tree.getNodeByType(NODE_TYPES.WINDOW).forEach((w) => {
if (w.isFloat()) {
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js
index 786ebaa..5a048cf 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/appearance.js
@@ -8,7 +8,6 @@ import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensio
// Shared state
import { ConfigManager } from "../shared/settings.js";
-
import { PrefsThemeManager } from "./prefs-theme-manager.js";
// Prefs UI
@@ -42,8 +41,8 @@ export class AppearancePage extends PreferencesPage {
constructor({ settings, dir }) {
super({ title: _("Appearance"), icon_name: "brush-symbolic" });
this.settings = settings;
- this.configMgr = new ConfigManager({ dir });
- this.themeMgr = new PrefsThemeManager(this);
+ let configMgr = new ConfigManager({ dir });
+ this.themeMgr = new PrefsThemeManager({ configMgr: configMgr, settings: settings });
this.add_group({
title: _("Gaps"),
description: _("Change the gap size between windows"),
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/floating.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/floating.js
new file mode 100644
index 0000000..0206c8f
--- /dev/null
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/floating.js
@@ -0,0 +1,82 @@
+// Gtk imports
+import Gtk from "gi://Gtk";
+import GObject from "gi://GObject";
+
+// Gnome imports
+import { gettext as _ } from "resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js";
+
+// Extension imports
+import { PreferencesPage, RemoveItemRow, ResetButton } from "./widgets.js";
+import { ConfigManager } from "../shared/settings.js";
+
+export class FloatingPage extends PreferencesPage {
+ static {
+ GObject.registerClass(this);
+ }
+
+ constructor({ settings, dir }) {
+ super({ title: _("Windows"), icon_name: "window-symbolic" });
+
+ this.settings = settings;
+ this.configMgr = new ConfigManager({ dir });
+
+ let overrides = this.configMgr.windowProps.overrides;
+ this.rows = this.loadItemsFromConfig(overrides);
+
+ this.floatingWindowGroup = this.add_group({
+ title: _("Floating Windows"),
+ description: _("Windows that will not be tiled"),
+ header_suffix: new ResetButton({ onReset: () => this.onResetHandler() }),
+ children: this.rows,
+ });
+ }
+
+ loadItemsFromConfig(overrides) {
+ let children = [];
+ for (let override of overrides) {
+ if (override.mode === "float") {
+ let itemrow = new RemoveItemRow({
+ title: override.wmTitle ?? override.wmClass,
+ subtitle: override.wmClass,
+ onRemove: (item, parent) => this.onRemoveHandler(item, parent),
+ });
+ children.push(itemrow);
+ }
+ }
+ return children;
+ }
+
+ onRemoveHandler(item, parent) {
+ this.floatingWindowGroup.remove(parent);
+ this.rows = this.rows.filter((row) => row != parent);
+ const existing = this.configMgr.windowProps.overrides;
+ const modified = existing.filter((row) => item != row.wmClass);
+ this.saveOverrides(modified);
+ }
+
+ saveOverrides(modified) {
+ if (modified) {
+ this.configMgr.windowProps = {
+ overrides: modified,
+ };
+ // Signal the main extension to reload floating overrides
+ const changed = Math.floor(Date.now() / 1000);
+ this.settings.set_uint("window-overrides-reload-trigger", changed);
+ }
+ }
+
+ onResetHandler() {
+ const defaultWindowProps = this.configMgr.loadDefaultWindowConfigContents();
+ const original = defaultWindowProps.overrides;
+ this.saveOverrides(original);
+
+ for (const child of this.rows) {
+ this.floatingWindowGroup.remove(child);
+ }
+
+ this.rows = this.loadItemsFromConfig(original);
+ for (const item of this.rows) {
+ this.floatingWindowGroup.add(item);
+ }
+ }
+}
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js
index 6f68f70..e90a640 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/settings.js
@@ -17,6 +17,7 @@ import { PACKAGE_VERSION } from "resource:///org/gnome/Shell/Extensions/js/misc/
import { developers } from "./metadata.js";
function showAboutWindow(parent, { version, description: comments }) {
+ version = version ?? "development";
const abt = new Adw.AboutWindow({
...(parent && { transient_for: parent }),
// TODO: fetch these from github at build time
@@ -136,7 +137,7 @@ export class SettingsPage extends PreferencesPage {
title: _("Logger"),
children: [
new DropDownRow({
- title: _("Logger Level"),
+ title: _("Log level"),
settings,
bind: "log-level",
items: Object.entries(Logger.LOG_LEVELS).map(([name, id]) => ({ id, name })),
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js
index 808c540..b4c7301 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/prefs/widgets.js
@@ -22,6 +22,7 @@ export class PreferencesPage extends Adw.PreferencesPage {
for (const child of children) group.add(child);
if (header_suffix) group.set_header_suffix(header_suffix);
this.add(group);
+ return group;
}
}
@@ -87,7 +88,7 @@ export class SpinButtonRow extends Adw.ActionRow {
}) {
super({ title, subtitle });
const gspin = Gtk.SpinButton.new_with_range(low, high, step);
- gspin.valign = Gtk.Align.CENTER;
+ gspin.xalign = 1;
if (bind && settings) {
settings.bind(bind, gspin, "value", Gio.SettingsBindFlags.DEFAULT);
} else if (init) {
@@ -97,6 +98,7 @@ export class SpinButtonRow extends Adw.ActionRow {
});
}
this.add_suffix(gspin);
+ this.set_css_classes(["spin"]);
this.activatable_widget = gspin;
}
}
@@ -211,15 +213,32 @@ export class DropDownRow extends Adw.ActionRow {
}
}
+export class ClearButton extends Gtk.Button {
+ static {
+ GObject.registerClass(this);
+ }
+ constructor({ settings = undefined, bind = undefined, onClear }) {
+ super({
+ icon_name: "edit-clear-symbolic",
+ tooltip_text: _("Clear shortcut"),
+ css_classes: ["flat", "circular"],
+ valign: Gtk.Align.CENTER,
+ });
+ this.connect("clicked", () => {
+ onClear?.();
+ });
+ }
+}
+
export class ResetButton extends Gtk.Button {
static {
GObject.registerClass(this);
}
-
constructor({ settings = undefined, bind = undefined, onReset }) {
super({
icon_name: "edit-undo-symbolic",
- tooltip_text: _("Reset"),
+ tooltip_text: _("Reset to default"),
+ css_classes: ["flat", "circular"],
valign: Gtk.Align.CENTER,
});
this.connect("clicked", () => {
@@ -229,6 +248,23 @@ export class ResetButton extends Gtk.Button {
}
}
+export class RemoveButton extends Gtk.Button {
+ static {
+ GObject.registerClass(this);
+ }
+ constructor({ item, parent, onRemove }) {
+ super({
+ icon_name: "edit-delete-symbolic",
+ tooltip_text: _("Remove Item"),
+ css_classes: ["flat", "circular"],
+ valign: Gtk.Align.CENTER,
+ });
+ this.connect("clicked", () => {
+ onRemove?.(item, parent);
+ });
+ }
+}
+
export class EntryRow extends Adw.EntryRow {
static {
GObject.registerClass(this);
@@ -247,6 +283,15 @@ export class EntryRow extends Adw.EntryRow {
});
const current = map ? map.from(settings, bind) : settings.get_string(bind);
this.set_text(current ?? "");
+ this.add_suffix(
+ new ClearButton({
+ settings,
+ bind,
+ onClear: () => {
+ this.set_text("");
+ },
+ })
+ );
this.add_suffix(
new ResetButton({
settings,
@@ -266,7 +311,7 @@ export class RadioRow extends Adw.ActionRow {
static orientation = Gtk.Orientation.HORIZONTAL;
- static spacing = 10;
+ static spacing = 3;
static valign = Gtk.Align.CENTER;
@@ -281,6 +326,7 @@ export class RadioRow extends Adw.ActionRow {
const toggle = new Gtk.ToggleButton({ label, ...(group && { group }) });
group ||= toggle;
toggle.active = key === current;
+ toggle.set_css_classes(["flat"]);
toggle.connect("clicked", () => {
if (toggle.active) {
settings.set_string(bind, labels[toggle.label]);
@@ -291,3 +337,20 @@ export class RadioRow extends Adw.ActionRow {
this.add_suffix(hbox);
}
}
+
+export class RemoveItemRow extends Adw.ActionRow {
+ static {
+ GObject.registerClass(this);
+ }
+
+ constructor({ title, subtitle = "", onRemove = undefined }) {
+ super({ title, subtitle });
+ const rmbutton = new RemoveButton({
+ item: subtitle,
+ parent: this,
+ onRemove: onRemove,
+ });
+
+ this.add_suffix(rmbutton);
+ }
+}
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js
index e92ae35..f093210 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/lib/shared/settings.js
@@ -51,7 +51,6 @@ export class ConfigManager extends GObject.Object {
if (defaultStylesheetFile.query_exists(null)) {
return defaultStylesheetFile;
}
-
return null;
}
@@ -75,7 +74,17 @@ export class ConfigManager extends GObject.Object {
if (defaultWindowConfigFile.query_exists(null)) {
return defaultWindowConfigFile;
}
+ return null;
+ }
+ loadDefaultWindowConfigContents() {
+ const defaultSettingFile = this.defaultWindowConfigFile;
+ if (defaultSettingFile) {
+ const contents = this.loadFileContents(defaultSettingFile);
+ if (contents) {
+ return JSON.parse(contents);
+ }
+ }
return null;
}
@@ -119,7 +128,8 @@ export class ConfigManager extends GObject.Object {
get windowProps() {
let windowConfigFile = this.windowConfigFile;
let windowProps = null;
- if (!windowConfigFile || !production) {
+ // if (!windowConfigFile || !production) {
+ if (!windowConfigFile) {
windowConfigFile = this.defaultWindowConfigFile;
}
@@ -134,7 +144,8 @@ export class ConfigManager extends GObject.Object {
set windowProps(props) {
let windowConfigFile = this.windowConfigFile;
- if (!windowConfigFile || !production) {
+ // if (!windowConfigFile || !production) {
+ if (!windowConfigFile) {
windowConfigFile = this.defaultWindowConfigFile;
}
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo
index 0d43612..bc5c6ec 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/es/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo
index f704565..3b9a703 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/fr/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo
index 9b270f2..7b6d8b5 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/it/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo
index ad876d9..c1495f6 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/nl/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo
index 9a0bb04..7745013 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/pt_BR/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/tr/LC_MESSAGES/forge.mo b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/tr/LC_MESSAGES/forge.mo
new file mode 100644
index 0000000..a6434b5
Binary files /dev/null and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/locale/tr/LC_MESSAGES/forge.mo differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json
index 0931fb2..6a2100d 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/metadata.json
@@ -1,6 +1,6 @@
{
"_generated": "Generated by SweetTooth, do not edit",
- "description": "Tiling and window manager for GNOME\n\nPlease report bugs/issues on https://github.com/forge-ext/forge/issues",
+ "description": "Tiling and window manager for GNOME\n- Please report bugs/issues on https://github.com/forge-ext/forge/issues\n- Needs a new maintainer.",
"gettext-domain": "forge",
"name": "Forge",
"session-modes": [
@@ -12,9 +12,10 @@
"45",
"46",
"47",
- "48"
+ "48",
+ "49"
],
"url": "https://github.com/forge-ext/forge",
"uuid": "forge@jmmaranan.com",
- "version": 88
+ "version": 89
}
\ No newline at end of file
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js
index 7543127..21067a6 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/prefs.js
@@ -25,6 +25,7 @@ import { ExtensionPreferences } from "resource:///org/gnome/Shell/Extensions/js/
import { KeyboardPage } from "./lib/prefs/keyboard.js";
import { AppearancePage } from "./lib/prefs/appearance.js";
import { SettingsPage } from "./lib/prefs/settings.js";
+import { FloatingPage } from "./lib/prefs/floating.js";
export default class ForgeExtensionPreferences extends ExtensionPreferences {
settings = this.getSettings();
@@ -45,6 +46,7 @@ export default class ForgeExtensionPreferences extends ExtensionPreferences {
window.add(new SettingsPage(this));
window.add(new AppearancePage(this));
window.add(new KeyboardPage(this));
+ window.add(new FloatingPage(this));
window.search_enabled = true;
window.can_navigate_back = true;
}
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled
index 8ac4d75..a49fd6a 100644
Binary files a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled and b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/gschemas.compiled differ
diff --git a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml
index 3a7fb9c..c019edc 100644
--- a/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml
+++ b/gnome/.local/share/gnome-shell/extensions/forge@jmmaranan.com/schemas/org.gnome.shell.extensions.forge.gschema.xml
@@ -37,7 +37,7 @@