This commit is contained in:
sankalp committed 2024-07-14 10:18:24 +05:45
1 parent 9ea0dd2cdc
commit 3d984cebbd
3 files changed
+54 -4

No files matched your search

+3 -3
View File
@@ -3,10 +3,10 @@ const encoder = new TextEncoder();
const decoder = new TextDecoder();
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const WINDOW_NAME = "applauncher";
import Box from "types/widgets/box";
import { Application } from "types/service/applications";
import Gtk from "gi://Gtk?version=3.0";
import { WINDOW_NAME } from "modules/sideleft/main";
const LAUNCH_COUNT_FILE = Gio.File.new_for_path(
GLib.build_filenamev([GLib.get_home_dir(), ".cache", "launch_counts.json"])
@@ -75,7 +75,7 @@ function AppItem(app: Application): Box<any, any> {
button.connect("clicked", () => {
clickCount++;
if (clickCount === 1) {
if (clickCount === 2) {
incrementLaunchCount(app.name);
App.closeWindow(WINDOW_NAME);
app.launch();
@@ -122,7 +122,7 @@ export const Applauncher = () => {
on_accept: () => {
const results = applications.filter((item) => item.visible);
if (results[0]) {
App.toggleWindow(WINDOW_NAME);
App.closeWindow(WINDOW_NAME);
results[0].attribute.app.launch();
}
},