Skip to content

Commit

Permalink
update docs, skip tooltips and non-taskbar windows
Browse files Browse the repository at this point in the history
  • Loading branch information
khimaros committed Feb 26, 2022
1 parent e153cac commit 5c6ec60
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# CHANGELOG

## version 14

- skip tooltips non-tasklist windows

## version 13

- prevent duplicating saved windows when ignored

## version 12

- default to global match threshold when adding override
- fix creating individual window overrides

## version 11

- simplify override flow when default IGNORE
- remove confusing toggle button
- save windows even when ignored, just don't restore

## version 10

preferences ui improvements:

- add switch to show "occupied" state in saved window list
- allow switching to "DEFAULT" action for overrides
- add threshold override spin button for apps
- add an "IGNORE (ANY)" button to ignore entire window class

## version 9

testing and stability improvements

- fix prefs crash on empty query
- refactor modules to make testing easier
- add unit tests for window/override matching
- allow threshold overrides per-app (dconf only)

## version 8

- code review cleanup
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ dconf write /org/gnome/shell/extensions/smart-auto-move/overrides '{"firefox":
show all saved firefox windows (N.B. `jq` will fail if window title contains `\`):

```
$ dconf read /org/gnome/shell/extensions/smart-auto-move/saved-windows | sed "s/^'//; s/'$//" | jq -C .firefox | less -SR
$ dconf read /org/gnome/shell/extensions/smart-auto-move/saved-windows | sed "s/^'//; s/'$//" | jq -C .Firefox | less -SR
```

there are example configs in the `examples/` dir which can be loaded (N.B. while extension is disabled) with:
Expand Down
13 changes: 13 additions & 0 deletions smart-auto-move@khimaros.com/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const Main = imports.ui.main;
const Mainloop = imports.mainloop;
const St = imports.gi.St;
const Meta = imports.gi.Meta;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Common = Me.imports.lib.common;
Expand Down Expand Up @@ -301,11 +302,23 @@ function cleanupWindows() {
});
}

function shouldSkipWindow(win) {
debug('shouldSkipWindow() ' + win.get_title() + ' ' + win.is_skip_taskbar() + ' ' + win.get_window_type());

if (win.is_skip_taskbar()) return true;

if (win.get_window_type() !== Meta.WindowType.NORMAL) return true;

return false;
}

function syncWindows() {
cleanupWindows();
global.get_window_actors().forEach(function (actor) {
let win = actor.get_meta_window();

if (shouldSkipWindow(win)) return;

if (!restoreWindow(win))
ensureSavedWindow(win);
});
Expand Down
4 changes: 2 additions & 2 deletions smart-auto-move@khimaros.com/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"uuid": "smart-auto-move@khimaros.com",
"name": "Smart Auto Move",
"url": "https://github.com/khimaros/smart-auto-move",
"description": "Smart Auto Move learns the size and position of your application windows and restores them to the correct place on subsequent launches. Supports Wayland.",
"description": "Smart Auto Move learns the size and position of your application windows and restores them to the correct place on subsequent launches. Supports Wayland.\n\nNOTE: Optimized for use with static workspaces. For more control, can be set to default IGNORE and then selectively RESTORE only desired apps.",
"settings-schema": "org.gnome.shell.extensions.smart-auto-move",
"settings-path": "/org/gnome/shell/extensions/smart-auto-move/",
"original-author": "khimaros",
"version": "13",
"version": "14",
"shell-version": ["41"]
}

0 comments on commit 5c6ec60

Please sign in to comment.