├── README.md ├── stylesheet.css ├── metadata.json ├── extension.js └── app.js /README.md: -------------------------------------------------------------------------------- 1 | # betty 2 | # betty 3 | -------------------------------------------------------------------------------- /stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Add your custom extension styling here */ 2 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Betty", 3 | "description": "Launcher", 4 | "uuid": "betty@dz0ny.info", 5 | "shell-version": [ 6 | "3.34" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /extension.js: -------------------------------------------------------------------------------- 1 | /* extension.js 2 | * 3 | * This program is free software: you can redistribute it and/or modify 4 | * it under the terms of the GNU General Public License as published by 5 | * the Free Software Foundation, either version 2 of the License, or 6 | * (at your option) any later version. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program. If not, see . 15 | * 16 | * SPDX-License-Identifier: GPL-2.0-or-later 17 | */ 18 | 19 | /* exported init */ 20 | 21 | class Extension { 22 | constructor() { 23 | } 24 | 25 | enable() { 26 | } 27 | 28 | disable() { 29 | } 30 | } 31 | 32 | function init() { 33 | return new Extension(); 34 | } 35 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/gjs 2 | 3 | imports.gi.versions.Gtk = '3.0'; 4 | 5 | const Gio = imports.gi.Gio; 6 | const GLib = imports.gi.GLib; 7 | const Gtk = imports.gi.Gtk; 8 | 9 | class Application { 10 | //create the application 11 | constructor() { 12 | this.application = new Gtk.Application({ 13 | application_id: 'dev.dz0ny.betty', 14 | flags: Gio.ApplicationFlags.FLAGS_NONE, 15 | }); 16 | 17 | this.application.connect('activate', this._onActivate.bind(this)); 18 | } 19 | 20 | //callback function for 'activate' signal 21 | _onActivate() { 22 | let win = new Gtk.Window({ 23 | type: Gtk.WindowType.TOPLEVEL, 24 | default_width: 600, 25 | default_height: 80, 26 | }); 27 | win.title = "Betty"; 28 | 29 | /* Here are a few ways we can customize our window. 30 | Try uncommenting them or changing their values! */ 31 | 32 | win.decorated=false; 33 | win.deletable=false; 34 | win.has_focus=true; 35 | win.modal=true; 36 | win.skip_taskbar_hint=true; 37 | win.skip_pager_hint=true; 38 | win.urgency_hint=true; 39 | win.resizable=true; 40 | win.can_focus=false; 41 | win.window_position=Gtk.WindowPosition.CENTER; 42 | win.resize(600, 80); 43 | //show the window and all child widgets (none in this case) 44 | win.show_all(); 45 | 46 | 47 | 48 | var hbox = new Gtk.HBox(); 49 | 50 | hbox.homogeneous = true; 51 | 52 | 53 | let search = new Gtk.SearchEntry(); 54 | search.visible = true; 55 | search.placeholder_text = "Command ..."; 56 | var btn = new Gtk.Button({label: "Cog"}); 57 | //win.add(hbox); 58 | //win.add(search); 59 | //hbox.pack_start(search, true, true, 1); 60 | //hbox.pack_start(btn, true, true, 1); 61 | var label = new Gtk.Label({label: ''}); 62 | label.set_alignment(1, 0); 63 | hbox.pack_start(label, false, true, 1); 64 | win.add(hbox); 65 | this.application.add_window(win); 66 | } 67 | }; 68 | 69 | //run the application 70 | let app = new Application (); 71 | app.application.run (ARGV); --------------------------------------------------------------------------------