zoeyfyi / boop-gtk Goto Github PK
View Code? Open in Web Editor NEWPort of @IvanMathy's Boop to GTK, a scriptable scratchpad for developers.
Home Page: https://boop-gtk.zoey.fyi
License: MIT License
Port of @IvanMathy's Boop to GTK, a scriptable scratchpad for developers.
Home Page: https://boop-gtk.zoey.fyi
License: MIT License
So there's this blank, useless chunk of space at the bottom of the window, a thick status bar of some sort? What exactly is the point of it? It appears to not be an issue with my theme or CSS customizations because it appears in both screenshots here, but the original Boop doesn't show a status bar on its screenshot. Any reason to keep that thing around?
Today I wanted to convert a date into a unix timestamp.
While BoopGTK has this option, it's not specified how the date should be given
If it is possible I would add a comment in the description indicating which format is supposed to be given as an input (probably now is YYYY-mm-dd HH:mm
)
Thank you
I have observed that after running "Minify CSS" script, the result is not focused automatically. I have to click in the text in order to do "Ctrl+A" which is waste of time and energy. Moving the mice and clicking consumes energy... In addition, the result, most of the times, will need to be copied and pasted. Tia
I'm having a serious issue with the latest version from Flathub. Whenever I try to generate a Base64, or I try to format JSON, I get a rather serious error.
[kevin@kevinfedora ~]$ flatpak run fyi.zoey.Boop-GTK
[2021-04-14T08:03:54Z INFO boop_gtk::scriptmap] loaded 65 internal scripts
[2021-04-14T08:03:54Z INFO boop_gtk::scriptmap] loaded 0 scripts from /home/kevin/.var/app/fyi.zoey.Boop-GTK/config/boop-gtk/scripts
[2021-04-14T08:03:54Z INFO boop_gtk::scriptmap] watching /home/kevin/.var/app/fyi.zoey.Boop-GTK/config/boop-gtk/scripts
Gtk-Message: 10:03:54.331: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:03:54.331: Failed to load module "pk-gtk-module"
Gtk-Message: 10:03:54.331: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:03:54.331: Failed to load module "pk-gtk-module"
[2021-04-14T08:03:54Z INFO boop_gtk] language manager search directorys: /home/kevin/.var/app/fyi.zoey.Boop-GTK/data/gtksourceview-3.0/language-specs:/home/kevin/.gnome2/gtksourceview-1.0/language-specs:/app/share/gtksourceview-3.0/language-specs:/usr/share/gtksourceview-3.0/language-specs:/usr/share/runtime/share/gtksourceview-3.0/language-specs:/run/host/user-share/gtksourceview-3.0/language-specs:/run/host/share/gtksourceview-3.0/language-specs:/home/kevin/.var/app/fyi.zoey.Boop-GTK/config/boop-gtk/
[2021-04-14T08:04:01Z INFO boop_gtk::ui::app] executing Base64 Encode
[2021-04-14T08:04:01Z INFO boop_gtk::script] thread spawned for Base64 Encode
[2021-04-14T08:04:01Z INFO boop_gtk::executor] V8 initialized in 570.174µs
#
# Fatal error in , line 0
# Check failed: params.array_buffer_allocator == nullptr || params.array_buffer_allocator == allocator.get().
#
#
#
#FailureMessage Object: 0x7f8386867da0
==== C stack trace ===============================
boop-gtk(+0x810be3) [0x55ff33c23be3]
boop-gtk(+0x293dfb) [0x55ff336a6dfb]
boop-gtk(+0x80caf5) [0x55ff33c1faf5]
boop-gtk(+0x2a9bbd) [0x55ff336bcbbd]
boop-gtk(+0x2a9c02) [0x55ff336bcc02]
boop-gtk(+0x2903a9) [0x55ff336a33a9]
boop-gtk(+0x12341b) [0x55ff3353641b]
boop-gtk(+0x10e442) [0x55ff33521442]
boop-gtk(+0x11a97a) [0x55ff3352d97a]
boop-gtk(+0xcc2d8a) [0x55ff340d5d8a]
/usr/lib/x86_64-linux-gnu/libpthread.so.0(+0x84d2) [0x7f8396a9a4d2]
/usr/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f8396870323]
Primary menu should include
I want to distribute some custom boop scripts with distribution package manager (e.g. pacman). I know that Boop-GTK loads custom scripts from $XDG_CONFIG_HOME/boop-gtk/scripts
but that path is inside $HOME
, so I can't install custom scripts there.
Also load custom scripts from system paths independent of user, such as /etc/xdg/boop-gtk/scripts
($XDG_CONFIG_DIRS
is a list of directory paths separated by :
and /etc/xdg
is the default value on Arch Linux).
I had this working at some point but it was a bit flaky.
The primary menu uses a color settings icon, which looks odd. The HIG recommends menu-open-symbolic
for this: https://developer.gnome.org/hig/stable/primary-menus.html.en
Right now we don't quite match the behavior of Boop. Notably, scripts don't maintain there global state.
File | Validation |
---|---|
uk.co.mrbenshef.Boop-GTK.metainfo.xml |
flatpak run org.freedesktop.appstream-glib validate flatpak/data/uk.co.mrbenshef.Boop-GTK.metainfo.xml |
Currently the build fails on windows:
LINK : fatal error LNK1181: cannot open input file 'gtksourceview-3.0.lib'
This happens despite installing the gtksourceview
package with:
pacman -S --noconfirm mingw-w64-x86_64-gtk3 mingw-w64-x86_64-gtksourceview3 mingw-w64-x86_64-gtksourceviewmm3
My guess is that mingw-w64-x86_64-gtksourceview3
install the lib with a different name, but I can't debug this until I set up a windows machine.
Info: org.freedesktop.Platform//20.08 is end-of-life, with reason:
org.freedesktop.Platform 20.08 is no longer receiving fixes and security updates. Please update to a supported runtime version.
Jsonc is a simplified json format which allows comments and unquoted values delimited by whitespace. A jsonc formatted file can be transformed to a json file. Comments will be stripped out and quotes added.
Right now, parsing json files with comments, causes it to fail. This is annoying since comments are an all-round good practice and they are often de facto required when working in teams.
Would be nice to have a windows installer. cargo-wix is one option, but wix is quite complex.
Hi.
I want to have my words sorted. I write this script in node, and it runs fine.
let text =
"emacs nnn jq ShellCheck tidy neofetch stow workrave pandoc flameshot copyq";
let sorted = text
.split(" ")
.sort((a, b) => a.localeCompare(b))
.join(" ");
console.log(sorted);
⬢ ❯ node sort.js
copyq emacs flameshot jq neofetch nnn pandoc ShellCheck stow tidy workrave
But, when putting it in boop, I got the error below. RangeError. Internal Error. Icu error
/**
{
"api":1,
"name":"Sort words",
"description":"Sort words alphabetically",
"author":"Azzam S.A (https://github.com/azzams)",
"icon":"sort-characters",
"tags":"sort,alphabet"
}
**/
function main(input) {
input.text = input.text
.replace(/\n$/, "")
.split(" ")
.sort((a, b) => a.localeCompare(b))
.join(" ");
}
Related:
What about adding a "Redo" button which will apply the last script run. Tia
It would be nice to have better error message formatting JSON, sometimes I paste 30 lines of JSON and if everything isn't perfect it just says ERROR: Invalid JSON
I think a great improvement would be to have some extra information like https://jsonlint.com/
PS: I really like this project, awesome work!
GTKSourceView doesn't support multiple cursors out of the box. Gnome-builder has solved this issue, perhaps that can be implemented here.
release-cargo
step fails because the crate size is too large, but packaging locally produces a crate within the 10mb limit.
I think this app could benefit from a better icon that follows the HIG more closely.
I took a quick stab at redrawing it in that style:
I'd suggest renaming to something more unique that doesn't include "GTK". Perhaps something like "Beep"?
I have a blog post on the subject you might be interested in: https://blogs.gnome.org/tbernard/2019/04/26/naming-your-app
After selecting a command from the command palette with the arrow keys I can't apply it's effect with the numpad enter key
I have observed that script always leaves a space in the beginning of the resulted line. Is this space necessary? Tia
Steps to reproduce:
flatpak run fyi.zoey.Boop-GTK
The application panicked (crashed).
Message: called `Result::unwrap()` on an `Err` value: "Add Slashes"
Location: src/ui/command_pallete.rs:278
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: g_closure_invoke<unknown>
at <unknown source file>:<unknown line>
2: g_signal_emit_valist<unknown>
at <unknown source file>:<unknown line>
3: g_signal_emit<unknown>
at <unknown source file>:<unknown line>
4: gtk_main_do_event<unknown>
at <unknown source file>:<unknown line>
5: g_main_context_dispatch<unknown>
at <unknown source file>:<unknown line>
6: g_main_context_iteration<unknown>
at <unknown source file>:<unknown line>
7: g_application_run<unknown>
at <unknown source file>:<unknown line>
8: __libc_start_main<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
I'm using a combination of xfce and i3.
I don't know how much the scripts are part of this project, but when I try to use "Sort lines" I get this error:
ERROR: EXCEPTION: RangeError: Internal error. Icu error. (14:26 - 14:27)
My journal logs say the following:
fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z INFO boop_gtk::ui::app] executing Sort lines
fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z INFO boop_gtk::script] request received, full_text: 10 bytes, selection: 10 bytes
fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z ERROR boop_gtk::ui::app] Exception: Execute(JSException { exception_str: "RangeError: Internal error. Icu error.", resource_name: Some("undefined"), source_line: Some(" .sort((a, b) => a.localeCompare(b))"), line_number: Some(14), columns: Some((26, 27)) })
I'm using the flatkpak on Fedora Silverblue 34
Boop uses JSONSerialization in swift which allows trailing commas despite not being in the spec. A recent commit added TrimEnd.js
which has a trailing comma, hence why #13 is failing atm.
Fork can be removed once denoland/rusty_v8#423 is merged.
When I launch Boop-GTK (v1.1.0) via flatpak run uk.co.mrbenshef.Boop-GTK
or via the Gnome overview, it starts using ~40% of my CPU (Intel Core i5-7200U, Quad Core) while the application is not being used.
I'm not sure what's going on here, but I'm pretty sure this shouldn't be the case. Boop-GTK does not output any major errors in its log as far as I can see, just the following lines:
Gtk-Message: 11:44:39.158: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:44:39.158: Failed to load module "canberra-gtk-module"
(boop-gtk:2): GLib-GObject-CRITICAL **: 11:44:49.354: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(boop-gtk:2): GLib-GObject-CRITICAL **: 11:44:50.890: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(boop-gtk:2): GLib-GObject-CRITICAL **: 11:44:51.076: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(boop-gtk:2): GLib-GObject-CRITICAL **: 11:44:51.089: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(boop-gtk:2): GLib-GObject-CRITICAL **: 11:44:51.169: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Just wanted to let you know that the extern crate
statements found in main.rs
- for example - aren't really necessary when using Rust 2018. Removing them will clean up your code a bit.
JSONtoCSV.js
is the only script that calls state.error(...)
which is not documented and does not appear to be implemented in Boop. It doesn't fail the test, but it does raise a JS type error.
What about adding "Click here or Press Ctrl+Shift+P to get started". It will be better for new users to know from the beginning, until they find it out, that "Press..." is not only a remark but it is also a button! Tia
Here is the link: https://crates.io/crates/quick-js
Not sure if this will fit, but it seems to be fully compliant with es2020 and the size is way smaller than v8.
Searching for "color" doesn't bring up the Hex to RGB tool, even though "color" is in the description.
Similarly, "escape", "lower", "length", "whitespace", are all keywords that only appear in descriptions, making search come up empty.
This might be more of an issue once more tools are added, but it's a QoL thing that would be super helpful. Great app by the way, I use it more every day. 😊
Was recently merged into boop, and the reason #24 is failing atm.
This is present in Boop (as I discoved here) but none of the scripts used it, so I missed it!
Further to #158 it should be possible to override a default script. Search order should be:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.