All Projects → Kharacternyk → Viter

Kharacternyk / Viter

Licence: gpl-3.0
A Vim-ish terminal emulator written and expandable in Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Viter

Kermit
A VTE-based, simple and froggy terminal emulator 🐸
Stars: ✭ 72 (+4.35%)
Mutual labels:  terminal, gtk3
Galacritty
WIP GTK terminal emulator based on Alacritty
Stars: ✭ 136 (+97.1%)
Mutual labels:  terminal, gtk3
Tilix
A tiling terminal emulator for Linux using GTK+ 3
Stars: ✭ 4,670 (+6668.12%)
Mutual labels:  terminal, gtk3
Ov
Feature rich terminal pager
Stars: ✭ 59 (-14.49%)
Mutual labels:  terminal
Fsq
A tool for querying the file system with a SQL-like language.
Stars: ✭ 60 (-13.04%)
Mutual labels:  terminal
Sub Tv Cli
Downloading your series subtitles via terminal 📺
Stars: ✭ 63 (-8.7%)
Mutual labels:  terminal
Progress.c
Progress display lib for c
Stars: ✭ 67 (-2.9%)
Mutual labels:  terminal
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+11971.01%)
Mutual labels:  terminal
Mocha Chrome
☕️ Run Mocha tests using headless Google Chrome
Stars: ✭ 66 (-4.35%)
Mutual labels:  terminal
Xterm.dart
💻 xterm.dart is a fast and fully-featured terminal emulator for Flutter, with support for mobile and desktop platforms.
Stars: ✭ 63 (-8.7%)
Mutual labels:  terminal
Bytepath
A replayable arcade shooter with a focus on build theorycrafting made using Lua and LÖVE.
Stars: ✭ 1,119 (+1521.74%)
Mutual labels:  terminal
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+1504.35%)
Mutual labels:  terminal
Gritty
web terminal emulator
Stars: ✭ 63 (-8.7%)
Mutual labels:  terminal
Python Terminal Color
Drop-in single file library for printing color in terminal
Stars: ✭ 59 (-14.49%)
Mutual labels:  terminal
Nyancat
Nyancat in your terminal, rendered through ANSI escape sequences. This is the source for the Debian package `nyancat`.
Stars: ✭ 1,144 (+1557.97%)
Mutual labels:  terminal
Bad Robo
🐙 Get Daily 400-500 Real Followers 👽 [BadRobo] is Best Instagram Bot Available Now with All Features!. Our BOT did not violate any of Instagram's rules, so you don't have to worry about getting ACTION BLOCK!
Stars: ✭ 59 (-14.49%)
Mutual labels:  terminal
Ginseng
C++ REPL Tool Builder
Stars: ✭ 65 (-5.8%)
Mutual labels:  terminal
Ving
🐸 A ping utility with nice output, with powerful traceroute and port probe.
Stars: ✭ 62 (-10.14%)
Mutual labels:  terminal
Rtscli
Python CLI Stocks Ticker + Portfolio Tracker
Stars: ✭ 61 (-11.59%)
Mutual labels:  terminal
Webterminal
ssh rdp vnc telnet sftp bastion/jump web putty xshell terminal jumpserver audit realtime monitor rz/sz 堡垒机 云桌面 linux devops sftp websocket file management rz/sz otp 自动化运维 审计 录像 文件管理 sftp上传 实时监控 录像回放 网页版rz/sz上传下载/动态口令 django
Stars: ✭ 1,124 (+1528.99%)
Mutual labels:  terminal

.. image:: screenshot.png

Viter is a terminal emulator written and expandable in Python. It features Vim-like modes, key bindings, and status line and can act like a pager.

.. contents:: Navigation: :backlinks: none

============ Installation

AUR

Install the viter-git AUR package_.

Manual installation

Viter requires VTE and PyGObject. They are packaged as python-gobject and vte3 on Arch. Look for similarly named packages if you use another GNU/Linux distribution.

===== Usage

Run viter to launch the default shell in Viter. Run viter program [args] to launch program in Viter with [args] (may be empty). Substitute viter for /path/to/this/repo/viter.py if you didn't use AUR to install Viter.

Viter starts up in NORMAL mode where it behaves just like any other terminal emulator. Press Ctrl+Shift+Space to switch to DETACHED mode and access most of the features (see Key bindings_ and Command interpreter_). Press Escape to return to NORMAL mode.

=========== Key bindings

  • Switching modes:

    • Escape: switch to NORMAL mode
    • Ctrl+Shift+Space: switch to DETACHED mode
  • Navigating the scrollback

    • j: one line down
    • k: one line up
    • J: half page down
    • K: half page up
    • g: to the beginning
    • G: to the end
  • Zooming

    • +/=: make the font 25% larger
    • -: make the font 25% smaller
  • Search

    • / pattern Enter: set the search pattern to pattern
    • n: to the next occurrence of the search pattern
    • N: to the previous occurrence of the search pattern
  • Clipboard

    • c: copy selected text
    • y characters Enter: yank the first line that starts with characters (not counting whitespace)
    • v characters ", count Enter: yank the block of count lines, where the first line starts with characters (not counting whitespace)
    • V: yank the whole window
    • Y: yank the message in the bar
    • p: paste
    • Ctrl+Shift+C/Ctrl+Shift+V: copy/paste in NORMAL mode
  • Command line

    • : command Enter: execute command in the Python environment that executes the code of Viter
    • e expression Enter: evaluate expression and print the result in the bar

=================== Command interpreter

A status bar at the bottom of the window is shown when the user is in DETACHED mode. It displays data in the format of <Zoom> [TopLineNum-BottomLineNum] (TotalLines) |TerminalHeightxTerminalWidth| while being unfocused.

After the user typed some text into it and pressed Enter, the entered text is executed by Viter using exec (a Python built-in).

Use the win global variable to interact with the window. Some key bindings insert a call to one of the methods of win, for example:

  • / inserts win.search("") and places the cursor between "".
  • y inserts win.yank_line("") and places the cursor between "".
  • e inserts win.echo() and places the cursor between ().

win is an instance of the Window class that inherits Gtk.Window. Calls to the inherited methods are also valid, for example:

  • win.set_title("Terminal") to set the title of the window to Terminal.
  • win.close() to close the window.
  • win.fullscreen() to make the window fullscreen.

win has the term field of type Vte.Terminal. See the Gtk documentation on Gtk.Window [1]_ and Vte.Terminal [2]_ for the full list of the methods and fields. See the source of Viter to see the methods that are provided additionally to that of Gtk.Window.

========== Pager mode

If Viter is invoked as viter-pager, Viter acts like a pager. It starts up directly into DETACHED mode. If there is no arguments, stdin is read, otherwise the arguments are interpreted as file names.

Here are some examples of preprocessing the input:

  • pygmentize | viter-pager — syntax highlighting.
  • ul | viter-pager — converting overstriking to properly underlined text.

If you want to use Viter as your $MANPAGER, make sure to cook the input via ul. The pages will lose formating (underlining, bold text) otherwise.

============= Configuration

Viter looks for the configuration file in the following order:

  • $VITER_CONFIG
  • $XDG_CONFIG_HOME/viter/viterrc.py
  • $HOME/.config/viter/viterrc.py

The first file that exists is read and then passed to exec just before Viter enters the main loop. The file must be a valid Python script.

See an example of the configuration file here_.

.. LINKS .. _AUR package: https://aur.archlinux.org/packages/viter-git/ .. _[1]: https://lazka.github.io/pgi-docs/Gtk-3.0/classes/Window.html .. _[2]: https://lazka.github.io/pgi-docs/Vte-2.91/classes/Terminal.html .. _here: https://github.com/Kharacternyk/dotfiles/blob/master/.config/viter/viterrc.py .. _Kharacternyk: https://github.com/Kharacternyk

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].