Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New] External Tools: Launch system tools, like terminal or file manager #1325

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ M: Pavel Roschin <rpg89(at)post(dot)ru>
W: http://plugins.geany.org/defineformat.html
S: Maintained

externaltools
P: George Katevenis <george_kate(at)hotmail(dot)com>
g: @gkatev
M: George Katevenis <george_kate(at)hotmail(dot)com>
W: http://plugins.geany.org/externaltools.html
S: Maintained

geanyctags
P: Jiří Techet <[email protected]>
g: @techee
Expand Down
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ if ENABLE_DEFINEFORMAT
SUBDIRS += defineformat
endif

if ENABLE_EXTERNALTOOLS
SUBDIRS += externaltools
endif

if ENABLE_GEANYCTAGS
SUBDIRS += geanyctags
endif
Expand Down
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Available plugins are:
* ``commander`` -- the Commander plugin
* ``debugger`` -- the Debugger plugin
* ``defineformat`` -- the Defineformat plugin
* ``externaltools`` -- the ExternalTools plugin
* ``geanyctags`` -- the GeanyCtags plugin
* ``geanydoc`` -- the GeanyDoc plugin
* ``geanyextrasel`` -- the GeanyExtraSel plugin
Expand Down
9 changes: 9 additions & 0 deletions build/externaltools.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
AC_DEFUN([GP_CHECK_EXTERNALTOOLS],
[
GP_ARG_DISABLE([ExternalTools], [auto])
GP_COMMIT_PLUGIN_STATUS([ExternalTools])
AC_CONFIG_FILES([
externaltools/Makefile
externaltools/src/Makefile
])
])
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ GP_CHECK_CODENAV
GP_CHECK_COMMANDER
GP_CHECK_DEBUGGER
GP_CHECK_DEFINEFORMAT
GP_CHECK_EXTERNALTOOLS
GP_CHECK_GEANYCTAGS
GP_CHECK_GEANYDOC
GP_CHECK_GEANYEXTRASEL
Expand Down
1 change: 1 addition & 0 deletions externaltools/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
George Katevenis <george_kate(at)hotmail(dot)com>
340 changes: 340 additions & 0 deletions externaltools/COPYING

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions externaltools/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2024-04-14 Version 0.1

* Initial plugin release, with support for
'Open Terminal' and 'Open Directory'.
4 changes: 4 additions & 0 deletions externaltools/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include $(top_srcdir)/build/vars.auxfiles.mk

SUBDIRS = src
plugin = externaltools
1 change: 1 addition & 0 deletions externaltools/NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See "ChangeLog"
57 changes: 57 additions & 0 deletions externaltools/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
External Tools
==============

About
-----
This plugin provides a way to quickly launch external tools (i.e. non-geany
tools) in the same context as a document. For example, this may include
starting a terminal or a file manager in the same directory as the current
file.

Supported tools
---------------
The tools currently supported include:

1. Open Terminal: This option launches a terminal in the same directory as the
current document.

2. Open Directory: Launches a file manager, in the same directory as the
current document.

They may be launched from the *Tools* menu, or via a shortcut.

Configuration
-------------
In the plugin's preferences you can adjust the command used to spawn each
tool. Occurrences of `%f` in the provided commands are substituted with the
path to the current file, while `%d` is substituted with the path to the
directory in which the file resides.

If the current document is *untitled*, %d is replaced with the home directory,
while %f is effectively erased.

**Tip:** Some file managers support opening a window at a directory *and*
placing focus on a specific file. Examples: `nemo %f`, `nautilus %f`, `dolphin
--select %f`.

Adding new tools
----------------
At the moment, adding new tools requires modifying the plugin's source, though
the code is structured in a way to easily accommodate this.

Bug reports, suggestions, patches
---------------------------------
You can report bugs, or suggest new tools or other improvements at the
geany-plugins project on GitHub: https://github.com/geany/geany-plugins. You
may page the developer using `@gkatev`.

License
-------
The External Tools plugin is distributed under the terms of the GNU General
Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. A copy of this license
can be found in the file COPYING included with the source code of this program.

Contact
-------
George Katevenis <george_kate(at)hotmail(dot)com>
11 changes: 11 additions & 0 deletions externaltools/src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include $(top_srcdir)/build/vars.build.mk
plugin = externaltools

geanyplugins_LTLIBRARIES = externaltools.la

externaltools_la_SOURCES = externaltools.c

externaltools_la_CPPFLAGS = $(AM_CPPFLAGS) -DG_LOG_DOMAIN=\"ExternalTools\"
externaltools_la_LIBADD = $(COMMONLIBS)

include $(top_srcdir)/build/cppcheck.mk
Loading