Snaptop - Snap! for Desktop

What script do you use to compile it for Linux?

I used electron forge

I'll test it out on ubuntu

welcome, but please don't share your grade level online, especially at such a young age

Literally the first reply to that post said that

@joecooldoo @cymplecy If you do anything in the editor, instead of asking to close because changes are not saved, it won't let you close it, I'll try to fix it, does the same thing on mac.

Cool! I would love Debian and Flatpak packages for this though (which I can work on)!

EDIT: I packaged a .deb for Snaptop and put that up on my Debian/Ubuntu repository

How I did it:

  • The contents of the .zip are stored in /opt/Snaptop
  • Created a symlink from /opt/Snaptop to /usr/bin/snaptop
  • Grabbed the icon and put it in /usr/share/icons/hicolor/256x256/apps/
  • Made a simple .desktop file in /usr/share/applications

I don't seem able to find your .deb version via that link

It's a repository, you'll be able to manually download it via apt download snaptop, his debs are located right in the Index of /apt-repo

so you'll be able to find it here

but since it's a repository, I'd recommend Installing the APT repository:

curl -sL https://swee.codes/repo.sh | sudo bash
sudo apt install snaptop

Thanks, i tried to make it but it didn't work, i will credit you

Thanks @10kilo, I also have made a forum post on my own Discourse instance:

Hi,

Yeah, packaging for Debian/Ubuntu is quite a hassle.
I forgot some extra steps, too:

  • The directories should actually be placed somewhere like ~/Documents/snaptop and then you place the folders there, for example, /opt/Snaptop would look something like ~/Documents/snaptop/opt/Snaptop while packaging.
Example: the file tree of my packaging directory.
swee@peppermint:~$ tree snaptop/
snaptop/
├── DEBIAN
│   └── control
├── opt
│   └── Snaptop
│       ├── chrome_100_percent.pak
│       ├── chrome_200_percent.pak
│       ├── chrome_crashpad_handler
│       ├── chrome-sandbox
│       ├── icudtl.dat
│       ├── instructions.txt
│       ├── libEGL.so
│       ├── libffmpeg.so
│       ├── libGLESv2.so
│       ├── libvk_swiftshader.so
│       ├── libvulkan.so.1
│       ├── Licenses and Credits
│       │   ├── Credits.txt
│       │   ├── Electron License.txt
│       │   ├── LICENSES.chromium.html
│       │   └── License.txt
│       ├── locales
│       │   ├── af.pak
│       │   ├── am.pak
│       │   ├── ar.pak
│       │   ├── bg.pak
│       │   ├── bn.pak
│       │   ├── ca.pak
│       │   ├── cs.pak
│       │   ├── da.pak
│       │   ├── de.pak
│       │   ├── el.pak
│       │   ├── en-GB.pak
│       │   ├── en-US.pak
│       │   ├── es-419.pak
│       │   ├── es.pak
│       │   ├── et.pak
│       │   ├── fa.pak
│       │   ├── fil.pak
│       │   ├── fi.pak
│       │   ├── fr.pak
│       │   ├── gu.pak
│       │   ├── he.pak
│       │   ├── hi.pak
│       │   ├── hr.pak
│       │   ├── hu.pak
│       │   ├── id.pak
│       │   ├── it.pak
│       │   ├── ja.pak
│       │   ├── kn.pak
│       │   ├── ko.pak
│       │   ├── lt.pak
│       │   ├── lv.pak
│       │   ├── ml.pak
│       │   ├── mr.pak
│       │   ├── ms.pak
│       │   ├── nb.pak
│       │   ├── nl.pak
│       │   ├── pl.pak
│       │   ├── pt-BR.pak
│       │   ├── pt-PT.pak
│       │   ├── ro.pak
│       │   ├── ru.pak
│       │   ├── sk.pak
│       │   ├── sl.pak
│       │   ├── sr.pak
│       │   ├── sv.pak
│       │   ├── sw.pak
│       │   ├── ta.pak
│       │   ├── te.pak
│       │   ├── th.pak
│       │   ├── tr.pak
│       │   ├── uk.pak
│       │   ├── ur.pak
│       │   ├── vi.pak
│       │   ├── zh-CN.pak
│       │   └── zh-TW.pak
│       ├── resources
│       │   └── app.asar
│       ├── resources.pak
│       ├── snapshot_blob.bin
│       ├── Snaptop
│       ├── start.sh
│       ├── v8_context_snapshot.bin
│       ├── version
│       └── vk_swiftshader_icd.json
└── usr
    ├── bin
    │   └── snaptop -> /opt/Snaptop/Snaptop
    └── share
        ├── applications
        │   └── Snaptop.desktop
        └── icons
            └── hicolor
                └── 256x256
                    └── apps

15 directories, 81 files
  • Actually put the symbolic link of /usr/bin/snaptop to the path after installation, ln command doesn't care if the file path changes, or the file doesn't exist in the path at the time of linking.
  • You should also add a controlfile in ~/Documents/snaptop/DEBIAN/control
the controlfile I made with my snaptop package
Package: snaptop
Version: 1.0.0-PATCHED1
Section: devel
Provides: snaptop
Priority: optional
Architecture: amd64
Maintainer: Swee <meow@swee.codes>
Depends: libc6, libasound2, libatomic1, libnotify4, libnspr4, libnss3, libstdc++6, libxss1, libxtst6
Description: An electron wrapper for Snap!
 CONTRIBUTION TO SNAPTOP https://snaptop.sourceforge.io
  • After that,

using a terminal, make sure the working directory is ~/Documents, then run:

~/Documents $ dpkg-deb --root-owner-group --build snaptop

It might take a while since it's an electron app, but once it's complete, you'll have a file with the name snaptop.deb

  • you can then test the installation of the package using
~/Documents $ sudo apt install ./snaptop.deb

There's also a few tutorials on Debian packaging like https://www.baeldung.com/linux/create-debian-package

The bug with the close button seems to only be applied when there's an unsaved change.

I haven't made an application in Electron before, but you could try scripting the X button to show a confirm() dialog before running window.close() or look into another Electron app's code (e.g. TurboWarp, Scratch3) and recreate the code of those.

Ok, thanks, also where are you hosting your discourse instance

Seeing his post when he returned, I believe he uses his VPS rented with Contabo to host Discourse, remind me if I'm wrong. ;}

Yes, I host everything on swee.codes on my VPS (Peppermint) nowadays :p

I'm going try to use electron-builder

How do i change the title of Snap!, i tried doing that in snap.html but it still says Snap!

You may want to check the javascript code and look for window.title.

Snaptop 2.0.0 Released

Download: Snaptop download | SourceForge.net