gnome-3

How to handle keyboard events in gnome shell extensions?

前提是你 提交于 2019-12-05 09:22:00
问题 How can I add an event or other method to listen to keypresses on a gnome shell extension? e.g. show a dialog with each key press showing the pressed key? I can not find any example. The documentation mentions a keyboard module, but with that common name searching is hard. Class explanation ... - General utils - Keyboard: Manage and define the keyboard events, etc. for gnome shell. (read above as a quote from the docs linked above. it is styled as code because the quote styling for some

Change directory and execute file in one command

久未见 提交于 2019-12-03 22:23:32
When I want to execute a file, it seems that I always have to first 'cd' into that file's directory before executing it, unless it fails on a can't-find-my-dataz type error. How can I get around typing two commands to just execute a program? Example: cd /usr/local/bin/minecraft/ java -Xms512M -Xmx2048M -jar minecraft.jar How can I make that into one line, so as I can put it as my Exec= _ line when creating a custom launcher in Gnome3? cd /usr/local/bin/minecraft/ && java -Xms512M -Xmx2048M -jar minecraft.jar should do it 来源: https://stackoverflow.com/questions/13624097/change-directory-and

How to handle keyboard events in gnome shell extensions?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 22:17:36
How can I add an event or other method to listen to keypresses on a gnome shell extension? e.g. show a dialog with each key press showing the pressed key? I can not find any example. The documentation mentions a keyboard module, but with that common name searching is hard. Class explanation ... - General utils - Keyboard: Manage and define the keyboard events, etc. for gnome shell. (read above as a quote from the docs linked above. it is styled as code because the quote styling for some reason do not preserve line breaks in this site) I found some extensions using the bellow code for results

How to start writing Gnome Shell extensions

…衆ロ難τιáo~ 提交于 2019-12-03 03:37:55
问题 I have found it's very hard to find documentation about Gnome Shell Extensions. I found some bits on Gnome Wiki (and it's first-level links), but it's not much: http://live.gnome.org/GnomeShell/Extensions The problem here is GJS and it's bindings. Absolutely no documentation, got lot's of SIGSEGVs, binding is just not ready (GLib, Gio and others). The only working one is unofficial documentation generated from GIR for Seed JavaScript implementation: http://roojs.org/seed/gir-1.2-gtk-2.0/seed/

How do I get the active window on Gnome Wayland?

不想你离开。 提交于 2019-12-02 20:10:19
Background: I'm working on a piece of software called ActivityWatch that logs what you do on your computer. Basically an attempt at addressing some of the issues with: RescueTime, selfspy, arbtt, etc. One of the core things we do is log information about the active window (class and title). In the past, this has been done using on Linux using xprop and now python-xlib without issue. But now we have a problem: Wayland is on the rise, and as far as I can see Wayland has no notion of an active window. So my fear is that we will have to implement support for each and every desktop environment

How to start writing Gnome Shell extensions

社会主义新天地 提交于 2019-12-02 17:06:58
I have found it's very hard to find documentation about Gnome Shell Extensions. I found some bits on Gnome Wiki (and it's first-level links), but it's not much: http://live.gnome.org/GnomeShell/Extensions The problem here is GJS and it's bindings. Absolutely no documentation, got lot's of SIGSEGVs, binding is just not ready (GLib, Gio and others). The only working one is unofficial documentation generated from GIR for Seed JavaScript implementation: http://roojs.org/seed/gir-1.2-gtk-2.0/seed/ Where to get more examples? I want read directories, files, spawn processes, open network sockets and

How to set application title in Gnome Shell?

泄露秘密 提交于 2019-11-30 19:44:24
I am new to Gtk+ development, and am trying to write an app using PyGObject and Gtk+3.0. When I run my app in Gnome Shell from the command line, however, the application name as it appears in the upper-left hand corner (immediately to the right of the Activities hot corner) is just set to the name of the Python source file that I ran to start the app. Is there any way to set the name to appear in Gnome Shell for my application? I've looked at Gtk.Application, and though it seems to do some of what I want (starting in Gtk+3.3, anyway), I can't seem to figure out how to fix the activity name or

How to test / debug GNOME Shell extensions? Is there any tool for that?

余生颓废 提交于 2019-11-29 22:02:52
I would like to develop GNOME Shell extensions and found it's really easy to step into the development process but I still can't figure out how to debug / test my extensions effectively. Are there any tools for that purpose? Is there any kind of real time console like we have on modern browsers or javascript servers environments? Yes, the real-time console is called "Looking Glass" and can be started by pressing Alt + F2 and typing lg at the prompt. More info: https://live.gnome.org/GnomeShell/LookingGlass On Fedora 20 (and probably any new linux distro) you can use that command: journalctl

How to test / debug GNOME Shell extensions? Is there any tool for that?

久未见 提交于 2019-11-28 18:14:37
问题 I would like to develop GNOME Shell extensions and found it's really easy to step into the development process but I still can't figure out how to debug / test my extensions effectively. Are there any tools for that purpose? Is there any kind of real time console like we have on modern browsers or javascript servers environments? 回答1: Yes, the real-time console is called "Looking Glass" and can be started by pressing Alt + F2 and typing lg at the prompt. More info: https://live.gnome.org

JavaFX Freeze on Desktop.open(file), Desktop.browse(uri)

北城余情 提交于 2019-11-28 09:01:26
I'm running some code in Java on Ubuntu 12.04 LTS 64 Bit (with Gnome Shell), using Oracle JDK 1.8.0_05 via NetBeans8.0. The following function works perfectly when called either in Main or in an otherwise empty Java Project, however when called from any JavaFX application, it causes the window to freeze and stop responding (although the project complies perfectly), requiring it to be Force Closed. Can anyone suggest any issues with what I've written which might be causing an issue or loop? Alas, due to the mode of failure, there is no error message that I can supply or analyse. Any suggestions