summaryrefslogtreecommitdiffstats
path: root/extensions/44/vertical-workspaces/lib/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/44/vertical-workspaces/lib/settings.js')
-rw-r--r--extensions/44/vertical-workspaces/lib/settings.js300
1 files changed, 185 insertions, 115 deletions
diff --git a/extensions/44/vertical-workspaces/lib/settings.js b/extensions/44/vertical-workspaces/lib/settings.js
index 66f3a45..cbb74f2 100644
--- a/extensions/44/vertical-workspaces/lib/settings.js
+++ b/extensions/44/vertical-workspaces/lib/settings.js
@@ -9,25 +9,15 @@
'use strict';
-const { GLib } = imports.gi;
+const GLib = imports.gi.GLib;
-const Config = imports.misc.config;
-
-const ExtensionUtils = imports.misc.extensionUtils;
-const Me = ExtensionUtils.getCurrentExtension();
-
-var shellVersion = parseFloat(Config.PACKAGE_VERSION);
-
-const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
-var _ = Gettext.gettext;
-const _schema = Me.metadata['settings-schema'];
-
-// common instance of Options accessible from all modules
-var opt;
+let Me;
var Options = class Options {
- constructor() {
- this._gsettings = ExtensionUtils.getSettings(_schema);
+ constructor(me) {
+ Me = me;
+
+ this._gsettings = Me.gSettings;
this._connectionIds = [];
this._writeTimeoutId = 0;
this._gsettings.delay();
@@ -51,8 +41,8 @@ var Options = class Options {
wsMaxSpacing: ['int', 'ws-max-spacing'],
wsPreviewScale: ['int', 'ws-preview-scale'],
secWsPreviewScale: ['int', 'secondary-ws-preview-scale'],
- secWsPreviewShift: ['bool', 'secondary-ws-preview-shift'],
- wsThumbnailsFull: ['bool', 'ws-thumbnails-full'],
+ secWsPreviewShift: ['boolean', 'secondary-ws-preview-shift'],
+ wsThumbnailsFull: ['boolean', 'ws-thumbnails-full'],
secWsThumbnailsPosition: ['int', 'secondary-ws-thumbnails-position'],
dashPosition: ['int', 'dash-position'],
dashPositionAdjust: ['int', 'dash-position-adjust'],
@@ -64,6 +54,7 @@ var Options = class Options {
dashMaxIconSize: ['int', 'dash-max-icon-size'],
dashShowWindowsIcon: ['int', 'dash-show-windows-icon'],
dashShowRecentFilesIcon: ['int', 'dash-show-recent-files-icon'],
+ dashShowExtensionsIcon: ['int', 'dash-show-extensions-icon'],
centerDashToWs: ['boolean', 'center-dash-to-ws'],
showAppsIconPosition: ['int', 'show-app-icon-position'],
wsThumbnailScale: ['int', 'ws-thumbnail-scale'],
@@ -73,13 +64,17 @@ var Options = class Options {
centerSearch: ['boolean', 'center-search'],
centerAppGrid: ['boolean', 'center-app-grid'],
dashBgOpacity: ['int', 'dash-bg-opacity'],
+ dashBgColor: ['int', 'dash-bg-color'],
dashBgRadius: ['int', 'dash-bg-radius'],
+ dashBgGS3Style: ['boolean', 'dash-bg-gs3-style'],
+ runningDotStyle: ['int', 'running-dot-style'],
enablePageShortcuts: ['boolean', 'enable-page-shortcuts'],
showWsSwitcherBg: ['boolean', 'show-ws-switcher-bg'],
showWsPreviewBg: ['boolean', 'show-ws-preview-bg'],
wsPreviewBgRadius: ['int', 'ws-preview-bg-radius'],
showBgInOverview: ['boolean', 'show-bg-in-overview'],
overviewBgBrightness: ['int', 'overview-bg-brightness'],
+ searchBgBrightness: ['int', 'search-bg-brightness'],
overviewBgBlurSigma: ['int', 'overview-bg-blur-sigma'],
appGridBgBlurSigma: ['int', 'app-grid-bg-blur-sigma'],
smoothBlurTransitions: ['boolean', 'smooth-blur-transitions'],
@@ -87,9 +82,8 @@ var Options = class Options {
searchViewAnimation: ['int', 'search-view-animation'],
workspaceAnimation: ['int', 'workspace-animation'],
animationSpeedFactor: ['int', 'animation-speed-factor'],
- fixUbuntuDock: ['boolean', 'fix-ubuntu-dock'],
winPreviewIconSize: ['int', 'win-preview-icon-size'],
- alwaysShowWinTitles: ['boolean', 'always-show-win-titles'],
+ winTitlePosition: ['int', 'win-title-position'],
startupState: ['int', 'startup-state'],
overviewMode: ['int', 'overview-mode'],
workspaceSwitcherAnimation: ['int', 'workspace-switcher-animation'],
@@ -105,17 +99,18 @@ var Options = class Options {
appGridContent: ['int', 'app-grid-content'],
appGridIncompletePages: ['boolean', 'app-grid-incomplete-pages'],
appGridOrder: ['int', 'app-grid-order'],
+ appFolderOrder: ['int', 'app-folder-order'],
appGridNamesMode: ['int', 'app-grid-names'],
appGridActivePreview: ['boolean', 'app-grid-active-preview'],
appGridFolderCenter: ['boolean', 'app-grid-folder-center'],
appGridPageWidthScale: ['int', 'app-grid-page-width-scale'],
appGridSpacing: ['int', 'app-grid-spacing'],
- searchWindowsEnable: ['boolean', 'search-windows-enable'],
- searchRecentFilesEnable: ['boolean', 'search-recent-files-enable'],
+ searchWindowsOrder: ['int', 'search-windows-order'],
searchFuzzy: ['boolean', 'search-fuzzy'],
searchMaxResultsRows: ['int', 'search-max-results-rows'],
dashShowWindowsBeforeActivation: ['int', 'dash-show-windows-before-activation'],
dashIconScroll: ['int', 'dash-icon-scroll'],
+ dashIsolateWorkspaces: ['boolean', 'dash-isolate-workspaces'],
searchWindowsIconScroll: ['int', 'search-windows-icon-scroll'],
panelVisibility: ['int', 'panel-visibility'],
panelPosition: ['int', 'panel-position'],
@@ -123,6 +118,8 @@ var Options = class Options {
wsSwPopupHPosition: ['int', 'ws-sw-popup-h-position'],
wsSwPopupVPosition: ['int', 'ws-sw-popup-v-position'],
wsSwPopupMode: ['int', 'ws-sw-popup-mode'],
+ wsSwitcherWraparound: ['boolean', 'ws-switcher-wraparound'],
+ wsSwitcherIgnoreLast: ['boolean', 'ws-switcher-ignore-last'],
favoritesNotify: ['int', 'favorites-notify'],
notificationPosition: ['int', 'notification-position'],
osdPosition: ['int', 'osd-position'],
@@ -131,17 +128,26 @@ var Options = class Options {
hotCornerFullscreen: ['boolean', 'hot-corner-fullscreen'],
hotCornerRipples: ['boolean', 'hot-corner-ripples'],
alwaysActivateSelectedWindow: ['boolean', 'always-activate-selected-window'],
- windowIconClickSearch: ['boolean', 'window-icon-click-search'],
+ winPreviewSecBtnAction: ['int', 'win-preview-sec-mouse-btn-action'],
+ winPreviewMidBtnAction: ['int', 'win-preview-mid-mouse-btn-action'],
+ winPreviewShowCloseButton: ['boolean', 'win-preview-show-close-button'],
+ windowIconClickAction: ['int', 'window-icon-click-action'],
+ overlayKeyPrimary: ['int', 'overlay-key-primary'],
overlayKeySecondary: ['int', 'overlay-key-secondary'],
+ overviewEscBehavior: ['int', 'overview-esc-behavior'],
+ newWindowFocusFix: ['boolean', 'new-window-focus-fix'],
+ appGridPerformance: ['boolean', 'app-grid-performance'],
+ windowThumbnailScale: ['int', 'window-thumbnail-scale'],
- workspaceThumbnailsModule: ['boolean', 'workspace-thumbnails-module'],
workspaceSwitcherPopupModule: ['boolean', 'workspace-switcher-popup-module'],
workspaceAnimationModule: ['boolean', 'workspace-animation-module'],
workspaceModule: ['boolean', 'workspace-module'],
windowManagerModule: ['boolean', 'window-manager-module'],
windowPreviewModule: ['boolean', 'window-preview-module'],
- winAttentionHandlerModule: ['boolean', 'win-attention-handler-module'],
+ windowAttentionHandlerModule: ['boolean', 'win-attention-handler-module'],
+ windowThumbnailModule: ['boolean', 'window-thumbnail-module'],
swipeTrackerModule: ['boolean', 'swipe-tracker-module'],
+ searchControllerModule: ['boolean', 'search-controller-module'],
searchModule: ['boolean', 'search-module'],
panelModule: ['boolean', 'panel-module'],
overlayKeyModule: ['boolean', 'overlay-key-module'],
@@ -151,6 +157,9 @@ var Options = class Options {
dashModule: ['boolean', 'dash-module'],
appFavoritesModule: ['boolean', 'app-favorites-module'],
appDisplayModule: ['boolean', 'app-display-module'],
+ windowSearchProviderModule: ['boolean', 'window-search-provider-module'],
+ recentFilesSearchProviderModule: ['boolean', 'recent-files-search-provider-module'],
+ extensionsSearchProviderModule: ['boolean', 'extensions-search-provider-module'],
profileName1: ['string', 'profile-name-1'],
profileName2: ['string', 'profile-name-2'],
@@ -158,9 +167,10 @@ var Options = class Options {
profileName4: ['string', 'profile-name-4'],
};
this.cachedOptions = {};
+ }
- this.shellVersion = shellVersion;
- // this.storeProfile(0);
+ cleanGlobals() {
+ Me = null;
}
connect(name, callback) {
@@ -183,7 +193,7 @@ var Options = class Options {
get(option, updateCache = false) {
if (!this.options[option]) {
- log(`[${Me.metadata.name}] Error: Option ${option} is undefined.`);
+ console.error(`[${Me.metadata.name}] Error: Option ${option} is undefined.`);
return null;
}
@@ -195,7 +205,6 @@ var Options = class Options {
else
gSettings = this._gsettings;
-
this.cachedOptions[option] = gSettings.get_value(key).deep_unpack();
}
@@ -242,7 +251,8 @@ var Options = class Options {
storeProfile(index) {
const profile = {};
Object.keys(this.options).forEach(v => {
- profile[v] = this.get(v).toString();
+ if (!v.startsWith('profileName'))
+ profile[v] = this.get(v).toString();
});
this._gsettings.set_value(`profile-data-${index}`, new GLib.Variant('a{ss}', profile));
@@ -250,8 +260,14 @@ var Options = class Options {
loadProfile(index) {
const options = this._gsettings.get_value(`profile-data-${index}`).deep_unpack();
+ // set the aaa-loading-data so extension.js doesn't reset V-Shell after each profile item
+ // delayed gsettings writes are processed alphabetically, so this key will be processed first
this._gsettings.set_boolean('aaa-loading-profile', !this._gsettings.get_boolean('aaa-loading-profile'));
for (let o of Object.keys(options)) {
+ if (!this.options[o]) {
+ console.error(`[${Me.metadata.name}] Error: "${o}" is not a valid profile key -> Update your profile`);
+ continue;
+ }
const [type] = this.options[o];
let value = options[o];
switch (type) {
@@ -275,7 +291,14 @@ var Options = class Options {
}
_updateSettings() {
- this.DASH_POSITION = this.get('dashPosition', true);
+ this._updateCachedSettings();
+ this.DASH_BG_ALPHA = this.get('dashBgOpacity') / 100;
+ this.DASH_BG_OPACITY = this.get('dashBgOpacity') * 2.5;
+ this.DASH_BG_COLOR = this.get('dashBgColor');
+ this.DASH_BG_RADIUS = this.get('dashBgRadius');
+ this.DASH_BG_LIGHT = this.DASH_BG_COLOR === 1;
+ this.DASH_BG_GS3_STYLE = this.get('dashBgGS3Style');
+ this.DASH_POSITION = this.get('dashModule') ? this.get('dashPosition') : 2;
this.DASH_TOP = this.DASH_POSITION === 0;
this.DASH_RIGHT = this.DASH_POSITION === 1;
this.DASH_BOTTOM = this.DASH_POSITION === 2;
@@ -284,26 +307,35 @@ var Options = class Options {
this.DASH_VISIBLE = this.DASH_POSITION !== 4; // 4 - disable
this.DASH_FOLLOW_RECENT_WIN = false;
- this.DASH_CLICK_ACTION = this.get('dashShowWindowsBeforeActivation', true);
- this.DASH_ICON_SCROLL = this.get('dashIconScroll', true);
+ this.DASH_ISOLATE_WS = this.get('dashIsolateWorkspaces');
+
+ this.DASH_CLICK_ACTION = this.get('dashShowWindowsBeforeActivation');
+ this.DASH_CLICK_SWITCH_BEFORE_ACTIVATION = this.DASH_CLICK_ACTION === 1;
+ this.DASH_CLICK_OPEN_NEW_WIN = this.DASH_CLICK_ACTION === 2;
+ this.DASH_CLICK_PREFER_WORKSPACE = this.DASH_CLICK_ACTION === 3;
+
+ this.DASH_ICON_SCROLL = this.get('dashIconScroll');
this.DASH_SHIFT_CLICK_MV = true;
- this.SEARCH_WINDOWS_ICON_SCROLL = this.get('searchWindowsIconScroll', true);
+ this.RUNNING_DOT_STYLE = this.get('runningDotStyle');
+
+ this.SEARCH_WINDOWS_ICON_SCROLL = this.get('searchWindowsIconScroll');
- this.DASH_POSITION_ADJUSTMENT = this.get('dashPositionAdjust', true);
+ this.DASH_POSITION_ADJUSTMENT = this.get('dashPositionAdjust');
this.DASH_POSITION_ADJUSTMENT = this.DASH_POSITION_ADJUSTMENT * -1 / 100; // range 1 to -1
- this.CENTER_DASH_WS = this.get('centerDashToWs', true);
+ this.CENTER_DASH_WS = this.get('centerDashToWs');
- this.MAX_ICON_SIZE = 64; // updates from main module
- this.SHOW_WINDOWS_ICON = this.get('dashShowWindowsIcon', true);
- this.SHOW_RECENT_FILES_ICON = this.get('dashShowRecentFilesIcon', true);
+ this.MAX_ICON_SIZE = this.get('dashMaxIconSize');
+ this.SHOW_WINDOWS_ICON = this.get('dashShowWindowsIcon');
+ this.SHOW_RECENT_FILES_ICON = this.get('dashShowRecentFilesIcon');
+ this.SHOW_EXTENSIONS_ICON = this.get('dashShowExtensionsIcon');
- this.WS_TMB_POSITION = this.get('workspaceThumbnailsPosition', true);
+ this.WS_TMB_POSITION = this.get('workspaceThumbnailsPosition');
this.ORIENTATION = this.WS_TMB_POSITION > 4 ? 0 : 1;
- this.WORKSPACE_MAX_SPACING = this.get('wsMaxSpacing', true);
+ this.WORKSPACE_MAX_SPACING = this.get('wsMaxSpacing');
// ORIENTATION || DASH_LEFT || DASH_RIGHT ? 350 : 80;
this.SHOW_WS_TMB = ![4, 9].includes(this.WS_TMB_POSITION); // 4, 9 - disable
- this.WS_TMB_FULL = this.get('wsThumbnailsFull', true);
+ this.WS_TMB_FULL = this.get('wsThumbnailsFull');
// translate ws tmb position to 0 top, 1 right, 2 bottom, 3 left
// 0L 1R, 2LF, 3RF, 4DV, 5T, 6B, 7TF, 8BF, 9DH
this.WS_TMB_POSITION = [3, 1, 3, 1, 4, 0, 2, 0, 2, 8][this.WS_TMB_POSITION];
@@ -311,81 +343,104 @@ var Options = class Options {
this.WS_TMB_RIGHT = this.WS_TMB_POSITION === 1;
this.WS_TMB_BOTTOM = this.WS_TMB_POSITION === 2;
this.WS_TMB_LEFT = this.WS_TMB_POSITION === 3;
- this.WS_TMB_POSITION_ADJUSTMENT = this.get('wsTmbPositionAdjust', true) * -1 / 100; // range 1 to -1
- this.SEC_WS_TMB_POSITION = this.get('secWsThumbnailsPosition', true);
+ this.WS_TMB_POSITION_ADJUSTMENT = this.get('wsTmbPositionAdjust') * -1 / 100; // range 1 to -1
+ this.SEC_WS_TMB_POSITION = this.get('secWsThumbnailsPosition');
this.SHOW_SEC_WS_TMB = this.SEC_WS_TMB_POSITION !== 3 && this.SHOW_WS_TMB;
this.SEC_WS_TMB_TOP = (this.SEC_WS_TMB_POSITION === 0 && !this.ORIENTATION) || (this.SEC_WS_TMB_POSITION === 2 && this.WS_TMB_TOP);
this.SEC_WS_TMB_RIGHT = (this.SEC_WS_TMB_POSITION === 1 && this.ORIENTATION) || (this.SEC_WS_TMB_POSITION === 2 && this.WS_TMB_RIGHT);
this.SEC_WS_TMB_BOTTOM = (this.SEC_WS_TMB_POSITION === 1 && !this.ORIENTATION) || (this.SEC_WS_TMB_POSITION === 2 && this.WS_TMB_BOTTOM);
this.SEC_WS_TMB_LEFT = (this.SEC_WS_TMB_POSITION === 0 && this.ORIENTATION) || (this.SEC_WS_TMB_POSITION === 2 && this.WS_TMB_LEFT);
- this.SEC_WS_TMB_POSITION_ADJUSTMENT = this.get('secWsTmbPositionAdjust', true) * -1 / 100; // range 1 to -1
- this.SEC_WS_PREVIEW_SHIFT = this.get('secWsPreviewShift', true);
- this.SHOW_WST_LABELS = this.get('showWsTmbLabels', true);
- this.SHOW_WST_LABELS_ON_HOVER = this.get('showWsTmbLabelsOnHover', true);
- this.CLOSE_WS_BUTTON_MODE = this.get('closeWsButtonMode', true);
+ this.SEC_WS_TMB_POSITION_ADJUSTMENT = this.get('secWsTmbPositionAdjust') * -1 / 100; // range 1 to -1
+ this.SEC_WS_PREVIEW_SHIFT = this.get('secWsPreviewShift');
+ this.SHOW_WST_LABELS = this.get('showWsTmbLabels');
+ this.SHOW_WST_LABELS_ON_HOVER = this.get('showWsTmbLabelsOnHover');
+ this.CLOSE_WS_BUTTON_MODE = this.get('closeWsButtonMode');
- this.MAX_THUMBNAIL_SCALE = this.get('wsThumbnailScale', true) / 100;
- this.MAX_THUMBNAIL_SCALE_APPGRID = this.get('wsThumbnailScaleAppGrid', true) / 100;
- if (this.MAX_THUMBNAIL_SCALE_APPGRID === 0)
- this.MAX_THUMBNAIL_SCALE_APPGRID = this.MAX_THUMBNAIL_SCALE;
+ this.MAX_THUMBNAIL_SCALE = this.get('wsThumbnailScale') / 100;
+ if (this.MAX_THUMBNAIL_SCALE === 0) {
+ this.MAX_THUMBNAIL_SCALE = 0.01;
+ this.SHOW_WS_TMB = false;
+ }
+ this.MAX_THUMBNAIL_SCALE_APPGRID = this.get('wsThumbnailScaleAppGrid') / 100;
+ this.SHOW_WS_TMB_APPGRID = true;
+ if (this.MAX_THUMBNAIL_SCALE_APPGRID === 0) {
+ this.MAX_THUMBNAIL_SCALE_APPGRID = 0.01;
+ this.SHOW_WS_TMB_APPGRID = false;
+ }
this.MAX_THUMBNAIL_SCALE_STABLE = this.MAX_THUMBNAIL_SCALE === this.MAX_THUMBNAIL_SCALE_APPGRID;
- this.SEC_MAX_THUMBNAIL_SCALE = this.get('secWsThumbnailScale', true) / 100;
- this.WS_PREVIEW_SCALE = this.get('wsPreviewScale', true) / 100;
- this.SEC_WS_PREVIEW_SCALE = this.get('secWsPreviewScale', true) / 100;
+ this.SEC_MAX_THUMBNAIL_SCALE = this.get('secWsThumbnailScale') / 100;
+ if (this.SEC_MAX_THUMBNAIL_SCALE === 0) {
+ this.SEC_MAX_THUMBNAIL_SCALE = 0.01;
+ this.SHOW_SEC_WS_TMB = false;
+ }
+
+ this.WS_PREVIEW_SCALE = this.get('wsPreviewScale') / 100;
+ this.SEC_WS_PREVIEW_SCALE = this.get('secWsPreviewScale') / 100;
// calculate number of possibly visible neighbor previews according to ws scale
this.NUMBER_OF_VISIBLE_NEIGHBORS = Math.round(1 + (1 - this.WS_PREVIEW_SCALE) / 4);
- this.SHOW_WS_TMB_BG = this.get('showWsSwitcherBg', true) && this.SHOW_WS_TMB;
- this.WS_PREVIEW_BG_RADIUS = this.get('wsPreviewBgRadius', true);
- this.SHOW_WS_PREVIEW_BG = this.get('showWsPreviewBg', true);
+ this.SHOW_WS_TMB_BG = this.get('showWsSwitcherBg') && this.SHOW_WS_TMB;
+ this.WS_PREVIEW_BG_RADIUS = this.get('wsPreviewBgRadius');
+ this.SHOW_WS_PREVIEW_BG = this.get('showWsPreviewBg');
- this.CENTER_APP_GRID = this.get('centerAppGrid', true);
+ this.CENTER_APP_GRID = this.get('centerAppGrid');
- this.SHOW_SEARCH_ENTRY = this.get('showSearchEntry', true);
- this.CENTER_SEARCH_VIEW = this.get('centerSearch', true);
- this.APP_GRID_ANIMATION = this.get('appGridAnimation', true);
+ this.SHOW_SEARCH_ENTRY = this.get('showSearchEntry');
+ this.CENTER_SEARCH_VIEW = this.get('centerSearch');
+ this.APP_GRID_ANIMATION = this.get('appGridAnimation');
if (this.APP_GRID_ANIMATION === 4)
this.APP_GRID_ANIMATION = this._getAnimationDirection();
- this.SEARCH_VIEW_ANIMATION = this.get('searchViewAnimation', true);
+ this.SEARCH_VIEW_ANIMATION = this.get('searchViewAnimation');
if (this.SEARCH_VIEW_ANIMATION === 4)
this.SEARCH_VIEW_ANIMATION = 3;
- this.WS_ANIMATION = this.get('workspaceAnimation', true);
+ this.WS_ANIMATION = this.get('workspaceAnimation');
- this.WIN_PREVIEW_ICON_SIZE = [64, 48, 32, 22, 8][this.get('winPreviewIconSize', true)];
- this.ALWAYS_SHOW_WIN_TITLES = this.get('alwaysShowWinTitles', true);
+ this.WIN_PREVIEW_ICON_SIZE = [64, 48, 32, 22, 8][this.get('winPreviewIconSize')];
+ this.WIN_TITLES_POSITION = this.get('winTitlePosition');
+ this.ALWAYS_SHOW_WIN_TITLES = this.WIN_TITLES_POSITION === 1;
- this.STARTUP_STATE = this.get('startupState', true);
- this.SHOW_BG_IN_OVERVIEW = this.get('showBgInOverview', true);
- this.OVERVIEW_BG_BRIGHTNESS = this.get('overviewBgBrightness', true) / 100;
- this.OVERVIEW_BG_BLUR_SIGMA = this.get('overviewBgBlurSigma', true);
- this.APP_GRID_BG_BLUR_SIGMA = this.get('appGridBgBlurSigma', true);
- this.SMOOTH_BLUR_TRANSITIONS = this.get('smoothBlurTransitions', true);
+ this.STARTUP_STATE = this.get('startupState');
+ this.SHOW_BG_IN_OVERVIEW = this.get('showBgInOverview');
+ this.OVERVIEW_BG_BRIGHTNESS = this.get('overviewBgBrightness') / 100;
+ this.SEARCH_BG_BRIGHTNESS = this.get('searchBgBrightness') / 100;
+ this.OVERVIEW_BG_BLUR_SIGMA = this.get('overviewBgBlurSigma');
+ this.APP_GRID_BG_BLUR_SIGMA = this.get('appGridBgBlurSigma');
+ this.SMOOTH_BLUR_TRANSITIONS = this.get('smoothBlurTransitions');
- this.OVERVIEW_MODE = this.get('overviewMode', true);
+ this.OVERVIEW_MODE = this.get('overviewMode');
this.OVERVIEW_MODE2 = this.OVERVIEW_MODE === 2;
this.WORKSPACE_MODE = this.OVERVIEW_MODE ? 0 : 1;
- this.STATIC_WS_SWITCHER_BG = this.get('workspaceSwitcherAnimation', true);
+ this.STATIC_WS_SWITCHER_BG = this.get('workspaceSwitcherAnimation');
- this.ANIMATION_TIME_FACTOR = this.get('animationSpeedFactor', true) / 100;
+ this.ANIMATION_TIME_FACTOR = this.get('animationSpeedFactor') / 100;
- this.SEARCH_ICON_SIZE = this.get('searchIconSize', true);
- this.SEARCH_VIEW_SCALE = this.get('searchViewScale', true) / 100;
- this.SEARCH_MAX_ROWS = this.get('searchMaxResultsRows', true);
- this.SEARCH_FUZZY = this.get('searchFuzzy', true);
+ this.SEARCH_ICON_SIZE = this.get('searchIconSize');
+ this.SEARCH_VIEW_SCALE = this.get('searchViewScale') / 100;
+ this.SEARCH_MAX_ROWS = this.get('searchMaxResultsRows');
+ this.SEARCH_FUZZY = this.get('searchFuzzy');
- this.APP_GRID_ALLOW_INCOMPLETE_PAGES = this.get('appGridIncompletePages', true);
- this.APP_GRID_ICON_SIZE = this.get('appGridIconSize', true);
- this.APP_GRID_COLUMNS = this.get('appGridColumns', true);
- this.APP_GRID_ROWS = this.get('appGridRows', true);
+ this.APP_GRID_ALLOW_INCOMPLETE_PAGES = this.get('appGridIncompletePages');
+ this.APP_GRID_ICON_SIZE = this.get('appGridIconSize');
+ this.APP_GRID_COLUMNS = this.get('appGridColumns');
+ this.APP_GRID_ROWS = this.get('appGridRows');
this.APP_GRID_ADAPTIVE = !this.APP_GRID_COLUMNS && !this.APP_GRID_ROWS;
- this.APP_GRID_ORDER = this.get('appGridOrder', true);
- this.APP_GRID_INCLUDE_DASH = this.get('appGridContent', true);
+ this.APP_GRID_ORDER = this.get('appGridOrder');
+ this.APP_GRID_ALPHABET = [1, 2].includes(this.APP_GRID_ORDER);
+ this.APP_GRID_FOLDERS_FIRST = this.APP_GRID_ORDER === 1;
+ this.APP_GRID_FOLDERS_LAST = this.APP_GRID_ORDER === 2;
+ this.APP_GRID_USAGE = this.APP_GRID_ORDER === 3;
+
+ this.APP_FOLDER_ORDER = this.get('appFolderOrder');
+ this.APP_FOLDER_ALPHABET = this.APP_FOLDER_ORDER === 1;
+ this.APP_FOLDER_USAGE = this.APP_FOLDER_ORDER === 2;
+
+ this.APP_GRID_INCLUDE_DASH = this.get('appGridContent');
/* APP_GRID_INCLUDE_DASH
0 - Include All
1 - Include All - Favorites and Runnings First
@@ -397,46 +452,50 @@ var Options = class Options {
this.APP_GRID_EXCLUDE_RUNNING = this.APP_GRID_INCLUDE_DASH === 3 || this.APP_GRID_INCLUDE_DASH === 4;
this.APP_GRID_DASH_FIRST = this.APP_GRID_INCLUDE_DASH === 1;
- this.APP_GRID_NAMES_MODE = this.get('appGridNamesMode', true);
+ this.APP_GRID_NAMES_MODE = this.get('appGridNamesMode');
- this.APP_GRID_FOLDER_ICON_SIZE = this.get('appGridFolderIconSize', true);
- this.APP_GRID_FOLDER_ICON_GRID = this.get('appGridFolderIconGrid', true);
- this.APP_GRID_FOLDER_COLUMNS = this.get('appGridFolderColumns', true);
- this.APP_GRID_FOLDER_ROWS = this.get('appGridFolderRows', true);
- this.APP_GRID_SPACING = this.get('appGridSpacing', true);
+ this.APP_GRID_FOLDER_ICON_SIZE = this.get('appGridFolderIconSize');
+ this.APP_GRID_FOLDER_ICON_GRID = this.get('appGridFolderIconGrid');
+ this.APP_GRID_FOLDER_COLUMNS = this.get('appGridFolderColumns');
+ this.APP_GRID_FOLDER_ROWS = this.get('appGridFolderRows');
+ this.APP_GRID_SPACING = this.get('appGridSpacing');
this.APP_GRID_FOLDER_DEFAULT = this.APP_GRID_FOLDER_ROWS === 3 && this.APP_GRID_FOLDER_COLUMNS === 3;
- this.APP_GRID_ACTIVE_PREVIEW = this.get('appGridActivePreview', true);
- this.APP_GRID_FOLDER_CENTER = this.get('appGridFolderCenter', true);
- this.APP_GRID_PAGE_WIDTH_SCALE = this.get('appGridPageWidthScale', true) / 100;
+ this.APP_GRID_FOLDER_ADAPTIVE = !this.APP_GRID_FOLDER_COLUMNS && !this.APP_GRID_FOLDER_ROWS;
+ this.APP_GRID_ACTIVE_PREVIEW = this.get('appGridActivePreview');
+ this.APP_GRID_FOLDER_CENTER = this.get('appGridFolderCenter');
+ this.APP_GRID_PAGE_WIDTH_SCALE = this.get('appGridPageWidthScale') / 100;
- this.APP_GRID_ICON_SIZE_DEFAULT = this.APP_GRID_ACTIVE_PREVIEW && !this.APP_GRID_ORDER ? 176 : 96;
+ this.APP_GRID_ICON_SIZE_DEFAULT = this.APP_GRID_ACTIVE_PREVIEW && !this.APP_GRID_USAGE ? 176 : 96;
this.APP_GRID_FOLDER_ICON_SIZE_DEFAULT = 96;
- this.WINDOW_SEARCH_PROVIDER_ENABLED = this.get('searchWindowsEnable', true);
- this.RECENT_FILES_SEARCH_PROVIDER_ENABLED = this.get('searchRecentFilesEnable', true);
+ this.APP_GRID_PERFORMANCE = this.get('appGridPerformance');
- this.PANEL_POSITION_TOP = this.get('panelPosition', true) === 0;
- this.PANEL_MODE = this.get('panelVisibility', true);
+ this.WINDOW_SEARCH_ORDER = this.get('searchWindowsOrder');
+
+ this.PANEL_POSITION_TOP = this.get('panelPosition') === 0;
+ this.PANEL_MODE = this.get('panelVisibility');
this.PANEL_DISABLED = this.PANEL_MODE === 2;
this.PANEL_OVERVIEW_ONLY = this.PANEL_MODE === 1;
this.START_Y_OFFSET = 0; // set from main module
- this.FIX_UBUNTU_DOCK = this.get('fixUbuntuDock', true);
- this.WINDOW_ATTENTION_MODE = this.get('windowAttentionMode', true);
+ this.WINDOW_ATTENTION_MODE = this.get('windowAttentionMode');
this.WINDOW_ATTENTION_DISABLE_NOTIFICATIONS = this.WINDOW_ATTENTION_MODE === 1;
this.WINDOW_ATTENTION_FOCUS_IMMEDIATELY = this.WINDOW_ATTENTION_MODE === 2;
- this.WS_SW_POPUP_H_POSITION = this.get('wsSwPopupHPosition', true) / 100;
- this.WS_SW_POPUP_V_POSITION = this.get('wsSwPopupVPosition', true) / 100;
- this.WS_SW_POPUP_MODE = this.get('wsSwPopupMode', true);
+ this.WS_SW_POPUP_H_POSITION = this.get('wsSwPopupHPosition') / 100;
+ this.WS_SW_POPUP_V_POSITION = this.get('wsSwPopupVPosition') / 100;
+ this.WS_SW_POPUP_MODE = this.get('wsSwPopupMode');
+
+ this.WS_WRAPAROUND = this.get('wsSwitcherWraparound');
+ this.WS_IGNORE_LAST = this.get('wsSwitcherIgnoreLast');
- this.SHOW_FAV_NOTIFICATION = this.get('favoritesNotify', true);
- this.NOTIFICATION_POSITION = this.get('notificationPosition', true);
+ this.SHOW_FAV_NOTIFICATION = this.get('favoritesNotify');
+ this.NOTIFICATION_POSITION = this.get('notificationPosition');
- this.OSD_POSITION = this.get('osdPosition', true);
+ this.OSD_POSITION = this.get('osdPosition');
- this.HOT_CORNER_ACTION = this.get('hotCornerAction', true);
- this.HOT_CORNER_POSITION = this.get('hotCornerPosition', true);
+ this.HOT_CORNER_ACTION = this.get('hotCornerAction');
+ this.HOT_CORNER_POSITION = this.get('hotCornerPosition');
if (this.HOT_CORNER_POSITION === 6 && this.DASH_VISIBLE)
this.HOT_CORNER_EDGE = true;
else
@@ -451,13 +510,24 @@ var Options = class Options {
else
this.HOT_CORNER_POSITION = 0;
}
- this.HOT_CORNER_FULLSCREEN = this.get('hotCornerFullscreen', true);
- this.HOT_CORNER_RIPPLES = this.get('hotCornerRipples', true);
+ this.HOT_CORNER_FULLSCREEN = this.get('hotCornerFullscreen');
+ this.HOT_CORNER_RIPPLES = this.get('hotCornerRipples');
+
+ this.ALWAYS_ACTIVATE_SELECTED_WINDOW = this.get('alwaysActivateSelectedWindow');
+ this.WIN_PREVIEW_SEC_BTN_ACTION = this.get('winPreviewSecBtnAction');
+ this.WIN_PREVIEW_MID_BTN_ACTION = this.get('winPreviewMidBtnAction');
+ this.SHOW_CLOSE_BUTTON = this.get('winPreviewShowCloseButton');
+ this.WINDOW_ICON_CLICK_ACTION = this.get('windowIconClickAction');
+
+ this.OVERLAY_KEY_PRIMARY = this.get('overlayKeyPrimary');
+ this.OVERLAY_KEY_SECONDARY = this.get('overlayKeySecondary');
+
+ this.ESC_BEHAVIOR = this.get('overviewEscBehavior');
- this.ALWAYS_ACTIVATE_SELECTED_WINDOW = this.get('alwaysActivateSelectedWindow', true);
- this.WINDOW_ICON_CLICK_SEARCH = this.get('windowIconClickSearch', true);
+ this.WINDOW_THUMBNAIL_ENABLED = this.get('windowThumbnailModule');
+ this.WINDOW_THUMBNAIL_SCALE = this.get('windowThumbnailScale') / 100;
- this.OVERLAY_KEY_SECONDARY = this.get('overlayKeySecondary', true);
+ this.FIX_NEW_WINDOW_FOCUS = this.get('newWindowFocusFix');
}
_getAnimationDirection() {