Skip to content
epogoniiPublic

About

GNOME Shell extension: snapper snapshots in the top bar - take, browse, compare, restore and roll back

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Repository files navigation

Wisp

Wisp

Snapper snapshots in the top bar - take, browse, compare, restore, roll back.

GNOME Shell 46 to 51 License GPL-2.0-or-later Sponsor

What does this extension do?

snapper already takes snapshots on most btrfs installations - one an hour, one either side of every package transaction - and reading them back means the command line or a separate application. This puts them in the top bar.

Tip

Simple, minimal and good-looking, and still the whole of snapper. A menu and a settings window quiet enough to forget about; behind them, comparing, restoring single files, rolling the machine back, setting a config up, and the timers that keep it all going.

The name is the faint light that hangs over a bog at night. A snapshot is the same sort of thing: the shape the system had, still there after the moment it belonged to.

Screenshots

The menu listing two configs, newest snapshots first

A snapshot's own window, and the timers snapper acts on:

A snapshot's window: description, keep, cleanup, read-only The Schedule page: snapper's timers and btrfsmaintenance's jobs

What changed since a snapshot, with the files to put back picked out of it:

The list of changed files, five of them selected for restoring

What snapper is set to keep, and what is left on the filesystem it keeps it on:

The Snapshots page: one config open, with the limits its cleanup goes by The Storage page: size, what btrfs has handed out to chunks, and what is free


What has to be installed first

snapper and one config Required. Not installed by default on most distributions, and there is nothing to list until a config exists
polkit The optional lock in front of the menu, and switching snapper's timers
util-linux, btrfs-progs The Storage page
btrfsmaintenance Balance, scrub, defrag and trim on the Schedule page. snapper does not need it
wisp-helper Whatever needs root: access to a config, its settings, a new config or the removal of one, restoring files, rolling back, and btrfsmaintenance's schedule

GNOME Shell 46 or newer, Wayland or X11. polkit and util-linux are on practically every desktop install already; snapper usually is not.

sudo dnf install snapper       # Fedora, RHEL, CentOS
sudo apt install snapper       # Debian, Ubuntu
sudo pacman -S snapper         # Arch
sudo zypper install snapper    # openSUSE, where it is there from the start

Then one config for whatever should be snapshotted. With wisp-helper that is a button on the Snapshots page; without it:

sudo snapper -c root create-config /

None of that has to be remembered. When snapper is missing the panel icon turns red, the menu says so and hands over the install command for the distribution it is running on, the settings window sets up a config through wisp-helper or builds the command that does it, and the timers are switches on the Schedule page.


Features

  • Each config's snapshots, newest first, with the pair around a package transaction shown as the one event it was
  • Take one with a description that no cleanup rule will remove; delete one after a confirmation that says what goes; open one in Files and read it as it was
  • Rename it, mark it important, change its cleanup rule, and turn read-only off
  • Everything that has changed since a snapshot, searchable, and for a package transaction exactly what the transaction changed
  • Put chosen files back, or roll the root filesystem back, through wisp-helper or by handing over the command to run as root - with a word first on what the rollback will do, or why this system cannot have one
  • Timeline limits per config, a new config or the removal of one, snapper's timers, btrfsmaintenance's jobs, and what btrfs has handed out to chunks
  • Reads a config without asking for a password once the account is added to it, with a row for that in the menu; an optional polkit lock in front of the menu if you want one
  • Live, whoever changed the snapshots; whatever is missing gets named with the line that installs it; follows the light and dark theme

How to install

From extensions.gnome.org

Get it on GNOME Extensions

Open the page and flip the switch, or install it from the Extension Manager app.

From a release

Every tag builds the same zip that goes to extensions.gnome.org:

gnome-extensions install --force wisp.zip
gnome-extensions enable wisp@epogonii.github.io

From the sources

tools/install-local.sh installs into the running session and tools/pack.sh builds the same zip.

GNOME Shell 46 or newer. Log out and back in first (X11: Alt+F2, then r): a running shell keeps an extension's JavaScript in memory for the life of the process. Preferences apply immediately.


Permissions

snapperd does not use polkit. Each config carries its own ALLOW_USERS and ALLOW_GROUPS in /etc/snapper/configs/<name>, both empty until somebody fills them in, so a fresh install tells an ordinary account nothing at all.

Wisp runs nothing as root. What needs root goes through wisp-helper, a small system service that asks polkit for the password first. Without the helper Wisp shows the command instead, to run as root in a terminal, and the menu links to the helper's install page. For a config the account is not on, the menu adds it through the helper, or shows the command that adds it, to run once as root:

sudo snapper -c <config> set-config ALLOW_USERS=<you> SYNC_ACL=yes

SYNC_ACL is what puts an ACL on the snapshot directory, without which the snapshots are listed but their files cannot be opened. snapperd reports the change and the menu fills in on its own.

Everything after that goes straight to snapperd over D-Bus as the user. Restoring files, rolling back, the settings in /etc/snapper/configs and btrfsmaintenance's file are root's either way, and go through wisp-helper; without it Wisp shows the command and copies it for you to run. The systemd timers are switched through systemd's own D-Bus API, which asks polkit itself.

snapper rollback points btrfs at a different default subvolume, so it takes effect at the next boot - and does nothing at all if /etc/fstab names the subvolume it mounts at /. Where that is the case Wisp says so instead of letting the reboot say it. It also needs the default subvolume to be one of snapper's snapshots already, which it is not on a layout like Fedora's; snapper refuses there, and Wisp says so rather than hand over the command.

wisp-helper gets further. On openSUSE it runs the same snapper rollback. On a layout like Fedora's, where /etc/fstab names the subvolume mounted at /, a writable copy of the snapshot takes its place instead, and the system as it was is kept as a snapshot of its own. Wisp says which it will be before anything is done, and where neither works, why.


Preferences

gnome-extensions prefs wisp@epogonii.github.io
Page What is on it
Appearance Where the indicator sits and whether it is shown, what a middle click does, how many snapshots each config lists, ages or dates, whether a finished action answers with a pill under the panel or a notification, and the lock: never, after a while, or every time
Snapshots One row per config with the subvolume it snapshots, whether it shows in the menu, whether this account may read it, and the timeline and numbered limits snapper cleans up by
Schedule snapper's three timers, and how often btrfsmaintenance balances, scrubs, defragments and trims
Storage What the filesystem is doing: size, what btrfs has handed out to chunks, what is written, what is free, and the same per chunk type
About The version, the project page, and the links below

Translations

Every string is translatable, and none is translated yet. po/wisp.pot holds them, and tools/update-po.sh rebuilds it from the sources - tools/files.txt is the list it reads, so a new file is translatable as soon as it ships - and brings each po/*.po up to date.

A language starts as a copy of the pot:

msginit --locale=<code> --input=po/wisp.pot --output=po/<code>.po

Fill it in, run tools/update-po.sh to check it compiles, and tools/install-local.sh puts it where the shell looks.


Reporting issues

  • Extension version, GNOME Shell version, distribution
  • snapper --version, and whether systemctl status snapperd.service answers
  • journalctl --user -b 0 -o cat /usr/bin/gnome-shell | grep -i wisp
  • A screenshot where it makes sense

Support

The extension is free and stays free. If it earned a coffee:

Sponsor on GitHub Buy me a coffee

GitHub Sponsors github.com/sponsors/epogonii, monthly or one time
PayPal paypal.me/pogonii
Bitcoin bc1qe6fjj3uv23e2yx2ry3wwhyrl7s2pqshau7mga3
Ethereum 0xDC9e1EfA0F8FAE71377F4018d4ff7D123369438e
Solana 3sYQyR27CVz1VcwCfoDLUioaAHk8jspQaSDHXEvBALxg

The same links sit on the About page of the extension's preferences.


License

GPL-2.0-or-later, see LICENSE.

About

GNOME Shell extension: snapper snapshots in the top bar - take, browse, compare, restore and roll back

Topics

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages