Skip to content

Commit

Permalink
Change (i)qsh to (i)qshell
Browse files Browse the repository at this point in the history
Avoids collisions with other packages when packaging qtile

Closes qtile#919
  • Loading branch information
flacjacket committed May 24, 2016
1 parent acde4c5 commit 07a22f5
Show file tree
Hide file tree
Showing 25 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ prune scripts
prune test
prune debian
prune rpm
include bin/iqsh
include bin/iqshell

recursive-exclude * __pycache__
recursive-exclude * *.py[co]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ check-cov:

.PHONY: lint
lint:
flake8 ./libqtile bin/qtile* bin/qsh
flake8 ./libqtile bin/q* bin/iqshell

.PHONY: ckpatch
ckpatch: lint check
Expand Down
2 changes: 1 addition & 1 deletion bin/iqsh → bin/iqshell
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

jupyter console --kernel qsh
jupyter console --kernel qshell
4 changes: 2 additions & 2 deletions bin/qsh → bin/qshell
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# SOFTWARE.

if __name__ == '__main__':
from libqtile.scripts import qsh
qsh.main()
from libqtile.scripts import qshell
qshell.main()
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def __dir__(self):
man_pages = [
('man/qtile', 'qtile', u'Qtile Documentation',
[u'Tycho Andersen'], 1),
('man/qsh', 'qsh', u'Qtile Documentation',
('man/qshell', 'qshell', u'Qtile Documentation',
[u'Tycho Andersen'], 1),
]

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Commands and scripting

manual/commands/index
manual/commands/scripting
manual/commands/qsh
manual/commands/iqsh
manual/commands/qshell
manual/commands/iqshell

Getting involved
================
Expand Down
6 changes: 3 additions & 3 deletions docs/man/qsh.rst → docs/man/qshell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ PLACEHOLDER
SYNOPSIS
========

qsh [-s qtilesocket]
qshell [-s qtilesocket]

DESCRIPTION
===========

``qsh`` is the remote shell tool for ``qtile``. ``qsh`` supports manipulating
various pieces of qtile remotely via an interactive shell.
``qshell`` is the remote shell tool for ``qtile``. ``qshell`` supports
manipulating various pieces of qtile remotely via an interactive shell.

OPTIONS
=======
Expand Down
10 changes: 5 additions & 5 deletions docs/manual/commands/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ different places:

* Commands can be :doc:`bound to keys </manual/config/keys>` in the Qtile
configuration file.
* Commands can be :doc:`called through qsh </manual/commands/qsh>`, the Qtile
shell.
* The qsh can also be hooked into a Jupyter kernel :doc:`called iqsh
</manual/commands/iqsh>`.
* Commands can be :doc:`called through qshell </manual/commands/qshell>`, the
Qtile shell.
* The qsh can also be hooked into a Jupyter kernel :doc:`called iqshell
</manual/commands/iqshell>`.
* Commands can be :doc:`called from a script </manual/commands/scripting>` to
interact with Qtile from Python.

If the explanation below seems a bit complex, please take a moment to explore
the API using the ``qsh`` command shell. Command lists and detailed
the API using the ``qshell`` command shell. Command lists and detailed
documentation can be accessed from its built-in help command.


Expand Down
32 changes: 16 additions & 16 deletions docs/manual/commands/iqsh.rst → docs/manual/commands/iqshell.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
====
iqsh
====
=======
iqshell
=======

In addition to the standard ``qsh`` shell interface, we provide a kernel
capable of running through Jupyter that hooks into the qsh client. The command
structure and syntax is the same as qsh, so it is recommended you read that for
more information about that.
In addition to the standard ``qshell`` shell interface, we provide a kernel
capable of running through Jupyter that hooks into the qshell client. The
command structure and syntax is the same as qshell, so it is recommended you
read that for more information about that.

Dependencies
============

In order to run iqsh, you must have `ipykernel`_ and `jupyter_console`_. You
can install the dependencies when you are installing qtile by running:
In order to run iqshell, you must have `ipykernel`_ and `jupyter_console`_.
You can install the dependencies when you are installing qtile by running:

.. code-block:: bash
Expand All @@ -31,7 +31,7 @@ running:

.. code-block:: bash
$ python -m libqtile.interactive.iqsh_kernel
$ python -m libqtile.interactive.iqshell_kernel
However, this will merely spawn a kernel instance, you will have to run a
separate frontend that connects to this kernel.
Expand All @@ -41,20 +41,20 @@ Jupyter. To register the kernel itself, run:

.. code-block:: bash
$ python -m libqtile.interactive.iqsh_install
$ python -m libqtile.interactive.iqshell_install
If you run this as a non-root user, or pass the ``--user`` flag, this will
install to the user Jupyter kernel directory. You can now invoke the kernel
directly when starting a Jupyter frontend, for example:

.. code-block:: bash
$ jupyter console --kernel qsh
$ jupyter console --kernel qshell
The ``iqsh`` script will launch a Jupyter terminal console with the qsh kernel.
The ``iqshell`` script will launch a Jupyter terminal console with the qshell kernel.

iqsh vs qsh
===========
iqshell vs qshell
=================

One of the main drawbacks of running through a Jupyter kernel is the frontend
has no way to query the current node of the kernel, and as such, there is no
Expand All @@ -67,4 +67,4 @@ the Jupyter notebook.

The Jupyter kernel also enables more advanced help, text completion, and
introspection capabilities (however, these are currently not implemented at a
level much beyond what is available in the standard qsh).
level much beyond what is available in the standard qshell).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===
qsh
===
======
qshell
======

The Qtile command shell is a command-line shell interface that provides access
to the full complement of Qtile command functions. The shell features command
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/commands/scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ should be exposed. Commands then appear as methods with the appropriate
signature on the ``Client`` object. The object hierarchy is described in the
:doc:`/manual/commands/index` section of this manual. Full command
documentation is available through the :doc:`Qtile Shell
</manual/commands/qsh>`.
</manual/commands/qshell>`.


Example
Expand Down
8 changes: 4 additions & 4 deletions docs/manual/config/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Default Configuration
The `default configuration
<https://github.com/qtile/qtile/blob/develop/libqtile/resources/default_config.py>`_
is invoked when qtile cannot find a configuration file. In addition, if qtile
is restarted via qsh, qtile will load the default configuration if the config
file it finds has some kind of error in it. The documentation below describes
the configuration lookup process, as well as what the key bindings are in the
default config.
is restarted via qshell, qtile will load the default configuration if the
config file it finds has some kind of error in it. The documentation below
describes the configuration lookup process, as well as what the key bindings
are in the default config.

The default config is not intended to be suitable for all users; it's mostly
just there so qtile does /something/ when fired up, and so that it doesn't
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/config/lazy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Lazy objects
The ``command.lazy`` object is a special helper object to specify a command for
later execution. This object acts like the root of the object graph, which
means that we can specify a key binding command with the same syntax used to
call the command through a script or through :doc:`/manual/commands/qsh`.
call the command through a script or through :doc:`/manual/commands/qshell`.

Example
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/ref/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Scripting Commands
==================

Here is documented some of the commands available on objects in the command
tree when running qsh or scripting commands to qtile. Note that this is an
tree when running qshell or scripting commands to qtile. Note that this is an
incomplete list, some objects, such as :ref:`layouts <ref_layouts>` and
:ref:`widgets <ref_widgets>`, may implement their own set of commands beyond
those given here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
from IPython.utils.tempdir import TemporaryDirectory

kernel_json = {
"argv": [sys.executable, "-m", "libqtile.interactive.iqsh_kernel", "-f", "{connection_file}"],
"display_name": "iqsh",
"language": "qsh",
"argv": [sys.executable, "-m", "libqtile.interactive.iqshell_kernel", "-f", "{connection_file}"],
"display_name": "iqshell",
"language": "qshell",
}


Expand All @@ -49,7 +49,7 @@ def main(argv=None):
json.dump(kernel_json, f, sort_keys=True)

print('Installing IPython kernel spec')
install_kernel_spec(td, 'qsh', user=user, replace=True)
install_kernel_spec(td, 'qshell', user=user, replace=True)


if __name__ == '__main__':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


class QshKernel(Kernel):
implementation = 'qsh'
implementation = 'qshell'
implementation_version = '0.1'
language = 'no-op'
language_version = '1.0'
Expand Down
2 changes: 1 addition & 1 deletion libqtile/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@ def f(cmd):
if not mb:
logger.error("No widget named {0:s} present.".format(widget))
return
mb.startInput(prompt, f, "qsh")
mb.startInput(prompt, f, "qshell")

def cmd_addgroup(self, group):
"""Add a group with the given name"""
Expand Down
2 changes: 1 addition & 1 deletion libqtile/scripts/qsh.py → libqtile/scripts/qshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def main():
"-c", "--command",
action="store", type=str,
default=None,
help='Run the specified qsh command and exit.'
help='Run the specified qshell command and exit.'
)
parser.add_argument(
"-j", "--json",
Expand Down
6 changes: 3 additions & 3 deletions libqtile/sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def do_ls(self, arg):
def do_pwd(self, arg):
"""Returns the current working location
This is the same information as presented in the qsh prompt, but is
very useful when running iqsh.
This is the same information as presented in the qshell prompt, but is
very useful when running iqshell.
Examples
========
Expand Down Expand Up @@ -249,7 +249,7 @@ def do_help(self, arg):
return "No such command: %s" % arg

def do_exit(self, args):
"""Exit qsh"""
"""Exit qshell"""
sys.exit(0)

do_quit = do_exit
Expand Down
8 changes: 4 additions & 4 deletions libqtile/widget/launchbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
To execute a software:
- ('thunderbird', 'thunderbird -safe-mode', 'launch thunderbird in safe mode')
To execute a python command in qtile, begin with by 'qsh:'
- ('logout', 'qsh:self.qtile.cmd_shutdown()', 'logout from qtile')
To execute a python command in qtile, begin with by 'qshell:'
- ('logout', 'qshell:self.qtile.cmd_shutdown()', 'logout from qtile')
"""
Expand All @@ -62,7 +62,7 @@ class LaunchBar(base._Widget):
example::
('thunderbird', 'thunderbird -safe-mode', 'launch thunderbird in safe mode')
('logout', 'qsh:self.qtile.cmd_shutdown()', 'logout from qtile')
('logout', 'qshell:self.qtile.cmd_shutdown()', 'logout from qtile')
"""
orientations = base.ORIENTATION_HORIZONTAL
defaults = [
Expand Down Expand Up @@ -186,7 +186,7 @@ def button_press(self, x, y, button):
icon = self.get_icon_in_position(x, y)
if icon is not None:
cmd = self.progs[icon]['cmd']
if cmd.startswith('qsh:'):
if cmd.startswith('qshell:'):
exec(cmd[4:].lstrip())
else:
self.qtile.cmd_spawn(cmd)
Expand Down
4 changes: 2 additions & 2 deletions libqtile/widget/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class Prompt(base._TextBox):
"""
completers = {
"file": FileCompleter,
"qsh": QshCompleter,
"qshell": QshCompleter,
"cmd": CommandCompleter,
"group": GroupCompleter,
"window": WindowCompleter,
Expand Down Expand Up @@ -407,7 +407,7 @@ def startInput(self, prompt, callback,
Parameters
==========
complete :
Tab-completion. Can be None, "cmd", "file", "group", "qsh" or
Tab-completion. Can be None, "cmd", "file", "group", "qshell" or
"window".
prompt :
text displayed at the prompt, e.g. "spawn: "
Expand Down
2 changes: 1 addition & 1 deletion libqtile/widget/textbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@


class TextBox(base._TextBox):
"""A flexible textbox that can be updated from bound keys, scripts and qsh"""
"""A flexible textbox that can be updated from bound keys, scripts, and qshell"""
orientations = base.ORIENTATION_HORIZONTAL
defaults = [
("font", "Arial", "Text font"),
Expand Down
2 changes: 1 addition & 1 deletion resources/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ qtile.desktop: A desktop file for qtile telling session managers about qtile
and how to run it. This file should be installed to /usr/share/xsessions

qtile.1: man page for qtile (generated by setup.py, see Makefile for details)
qsh.1: man page for qsh (generated by setup.py, see Makefile for details)
qshell.1: man page for qsh (generated by setup.py, see Makefile for details)
8 changes: 4 additions & 4 deletions resources/qsh.1 → resources/qshell.1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.\" Man page generated from reStructuredText.
.
.TH "QSH" "1" "March 6, 2016" "0.10.5" "Qtile"
.TH "QSHELL" "1" "March 6, 2016" "0.10.5" "Qtile"
.SH NAME
qsh \- Qtile Documentation
qshell \- Qtile Documentation
.
.nr rst2man-indent-level 0
.
Expand Down Expand Up @@ -32,10 +32,10 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
.SH SYNOPSIS
.sp
qsh [\-s qtilesocket]
qshell [\-s qtilesocket]
.SH DESCRIPTION
.sp
\fBqsh\fP is the remote shell tool for \fBqtile\fP\&. \fBqsh\fP supports manipulating
\fBqshell\fP is the remote shell tool for \fBqtile\fP\&. \fBqshell\fP supports manipulating
various pieces of qtile remotely via an interactive shell.
.SH OPTIONS
.INDENT 0.0
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ def finalize_options(self):
'qtile = libqtile.scripts.qtile:main',
'qtile-run = libqtile.scripts.qtile_run:main',
'qtile-top = libqtile.scripts.qtile_top:main',
'qsh = libqtile.scripts.qsh:main',
'qshell = libqtile.scripts.qshell:main',
]
},
scripts=[
'bin/iqsh',
'bin/iqshell',
],
data_files=[
('share/man/man1', ['resources/qtile.1',
'resources/qsh.1'])],
'resources/qshell.1'])],
cmdclass={'install': CheckCairoXcb},
**cffi_args
)

0 comments on commit 07a22f5

Please sign in to comment.