__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/usr/bin/gjs /* DING: Desktop Icons New Generation for GNOME Shell * * Copyright (C) 2019 Sergio Costas ([email protected]) * Based on code original (C) Carlos Soriano * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 'use strict'; imports.gi.versions.GnomeDesktop = '3.0'; const GnomeDesktop = imports.gi.GnomeDesktop; const Gio = imports.gi.Gio; /** * */ function CreateThumbnail() { let thumbnailFactoryNormal = GnomeDesktop.DesktopThumbnailFactory.new(GnomeDesktop.DesktopThumbnailSize.NORMAL); let thumbnailFactoryLarge = GnomeDesktop.DesktopThumbnailFactory.new(GnomeDesktop.DesktopThumbnailSize.LARGE); let file = Gio.File.new_for_path(ARGV[0]); if (!file.query_exists(null)) { return 1; } let fileUri = file.get_uri(); let fileInfo = file.query_info('standard::content-type,time::modified', Gio.FileQueryInfoFlags.NONE, null); let modifiedTime = fileInfo.get_attribute_uint64('time::modified'); // check if the thumbnail has been already created in the meantime by another program let thumbnailLarge = thumbnailFactoryLarge.lookup(fileUri, modifiedTime); if (thumbnailLarge != null) { return 3; } let thumbnailNormal = thumbnailFactoryNormal.lookup(fileUri, modifiedTime); if (thumbnailNormal != null) { return 3; } if (thumbnailFactoryNormal.has_valid_failed_thumbnail(fileUri, modifiedTime)) { return 4; } // now, generate the file let thumbnailPixbuf = thumbnailFactoryLarge.generate_thumbnail(fileUri, fileInfo.get_content_type(), null); if (thumbnailPixbuf == null) { thumbnailFactoryLarge.create_failed_thumbnail(fileUri, modifiedTime, null); return 2; } else { thumbnailFactoryLarge.save_thumbnail(thumbnailPixbuf, fileUri, modifiedTime, null); return 0; } } CreateThumbnail();
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| askRenamePopup.js | File | 4.65 KB | 0644 |
|
| autoAr.js | File | 29.04 KB | 0644 |
|
| createThumbnail.js | File | 2.36 KB | 0755 |
|
| dbusInterfaces.js | File | 7.85 KB | 0644 |
|
| dbusUtils.js | File | 33.87 KB | 0644 |
|
| desktopGrid.js | File | 22.96 KB | 0644 |
|
| desktopIconItem.js | File | 30.74 KB | 0644 |
|
| desktopIconsUtil.js | File | 10.87 KB | 0644 |
|
| desktopManager.js | File | 90.56 KB | 0644 |
|
| ding.js | File | 6.87 KB | 0755 |
|
| enums.js | File | 2.82 KB | 0644 |
|
| fileItem.js | File | 32.04 KB | 0644 |
|
| fileItemMenu.js | File | 20.93 KB | 0644 |
|
| fileUtils.js | File | 3.41 KB | 0644 |
|
| notifyX11UnderWayland.js | File | 2.37 KB | 0644 |
|
| preferences.js | File | 4.22 KB | 0644 |
|
| prefswindow.js | File | 7.51 KB | 0644 |
|
| promiseUtils.js | File | 3.03 KB | 0644 |
|
| showErrorPopup.js | File | 2.25 KB | 0644 |
|
| signalManager.js | File | 1.73 KB | 0644 |
|
| stackItem.js | File | 3.16 KB | 0644 |
|
| stylesheet.css | File | 506 B | 0644 |
|
| templatesScriptsManager.js | File | 8.67 KB | 0644 |
|
| thumbnails.js | File | 7.05 KB | 0644 |
|