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

Add method `display_message` to `Pane` #119

Merged
merged 1 commit into from May 20, 2018

Conversation

Projects
None yet
3 participants
@ritiek
Copy link
Contributor

commented May 18, 2018

Useful for displaying messages in a tmux session and doing stuff like:

>>> pane.display_message('#T', get_text=True)
'server.py (~/Downloads/libtmux/libtmux) - NVIM'

Here is a complete example:

# First create a Tmux session by yourself
# before running this example
# `$ tmux`

>>> import libtmux
>>> server = libtmux.Server()
>>> session = server.list_sessions()[0]
>>> pane = session.attached_pane
# Display a message "Hallo World!" in the tmux session
>>> pane.display_message('Hallo World!')
# Get current terminal title
>>> pane.display_message('#T', get_text=True)
['server.py (~/Downloads/libtmux/libtmux) - NVIM']
@codecov-io

This comment has been minimized.

Copy link

commented May 18, 2018

Codecov Report

Merging #119 into master will decrease coverage by 0.25%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   79.81%   79.55%   -0.26%     
==========================================
  Files           8        8              
  Lines         857      861       +4     
==========================================
+ Hits          684      685       +1     
- Misses        173      176       +3
Impacted Files Coverage Δ
libtmux/pane.py 82.81% <25%> (-3.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3417e11...34125fb. Read the comment docs.

@ritiek ritiek force-pushed the ritiek:display-message branch from 727368a to 34125fb May 18, 2018

@tony tony merged commit f014199 into tmux-python:master May 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ritiek ritiek deleted the ritiek:display-message branch May 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.