👀 A modern watch command. Time machine and pager etc.

Viddy

viddy

Modern watch command.

Viddy well, gopher. Viddy well.

Demo

viddy

Features

  • Basic features of original watch command.
    • Execute command periodically, and display the result.
    • color output.
    • diff highlight.
  • Time machine mode. 😎
    • Rewind like video.
    • Go to the past, and back to the future.
  • See output in pager.
  • Vim like keymaps.
  • Search text.
  • Suspend and restart execution.
  • Run command in precise intervals forcibly.
  • Support shell alias
  • Customize keymappings.
  • Customize color.

Install

Mac

...via Homebrew:

brew install sachaos/tap/viddy

...via MacPorts:

sudo port install viddy

Linux

wget -O viddy.tar.gz https://github.com/sachaos/viddy/releases/download/v0.2.0/viddy_0.2.0_Linux_x86_64.tar.gz && tar xvf viddy.tar.gz && mv viddy /usr/local/bin

ArchLinux ( AUR )

yay -S viddy

Alternatively you can use the AUR Git repo directly

Go

go install github.com/sachaos/viddy@latest

Other

Download from release page.

Keymaps

key
SPACE Toggle time machine mode
s Toggle suspend execution
d Toggle diff
t Toggle header display
? Toggle help view
/ Search text
j Pager: next line
k Pager: previous line
Control-F Pager: page down
Control-B Pager: page up
g Pager: go to top of page
Shift-G Pager: go to bottom of page
Shift-J (Time machine mode) Go to the past
Shift-K (Time machine mode) Back to the future
Shift-F (Time machine mode) Go to more past
Shift-B (Time machine mode) Back to more future
Shift-O (Time machine mode) Go to oldest position
Shift-N (Time machine mode) Go to current position

Configuration

Install your config file on $XDG_CONFIG_HOME/viddy.toml On macOS, the path is ~/Library/Application\ Support/viddy.toml.

[general]
shell = "zsh"
shell_options = ""

[keymap]
timemachine_go_to_past = "Down"
timemachine_go_to_more_past = "Shift-Down"
timemachine_go_to_future = "Up"
timemachine_go_to_more_future = "Shift-Up"
timemachine_go_to_now = "Ctrl-Shift-Up"
timemachine_go_to_oldest = "Ctrl-Shift-Down"

[color]
background = "white" # Default value is inherit from terminal color.

What is "viddy" ?

"viddy" is Nadsat word meaning to see. Nadsat is fictional argot of gangs in the violence movie "A Clockwork Orange".

Credits

The gopher's logo of viddy is licensed under the Creative Commons 3.0 Attributions license.

The original Go gopher was designed by Renee French.

Owner
Comments
  • Inner command does not receive correct terminal width

    Inner command does not receive correct terminal width

    I often use a command which detects terminal width to render a table. Using viddy, it is restricted to the first 80 (I think) characters, so a lot of text is cut.

    How it renders (sorry for anonymization) immagine

    How it should render immagine

  • Viddy as an importable package.

    Viddy as an importable package.

    This PR should allow importing Viddy tool as a lib in other Golang projects.

    Also, I've added the PreconfiguredNewViddy func to avoid additional dependencies in 3-party projects.

    I suppose this is a good structure to use both:

    • as a library
    • as a binary

    Ready for comments and discussions.

  • AUR package out of date

    AUR package out of date

    Hi, I wanted to install viddy through your AUR package, but I noticed it is on v0.3.4-1 instead of the latest v0.3.6. I installed it with Go instead.

    Can you fix the AUR package deployments? Thanks!

    Great tool btw, very nice replacement for the old-school watch!

  • Color output doesn't seem to work

    Color output doesn't seem to work

    Hello I was just curious how to see colored output, but was not able to find any option how to do it - output is always the same. Just for test I tried it on ls -l but all folders/files names are just white

  • Feature/fill circle

    Feature/fill circle

    Feature request done for issue 48

    Changelog:

    • Ability to set general.accessibility in config.toml file for viddy
    • Change to fill circle upon setting on the option of Suspend, Diff, Bell when accessibility is set to true
    • And change the foreground color to black and background color to white (for better contrast)
    • If accessibility is set to false, viddy behaves as it did before
  • Respect watch's WATCH_INTERVAL environment variable

    Respect watch's WATCH_INTERVAL environment variable

    Nice tool! I usually set the WATCH_INTERVAL environment variable to 1 in my bashrc to give watch a default interval of 1 second. It would be nice if viddy respectd that variable too.

  • Sub second timing

    Sub second timing

    Would love to have sub-second (millisecond precision is fine) for Viddy! I run go test ./... through viddy a lot to ensure I don't introduce any intermittent test failures and every second just isn't fast enough for me!

    Would you be open to me submitting a PR for sub-second precision on the -n flag?

  • Allow to use arrow keys for time machine movements

    Allow to use arrow keys for time machine movements

    The shift+ shortcuts are not intuitive on the first glance. I think it would be good idea to map them parallely with arrow keys:

    • arrow_up: move 1 position to the future

    • shift + arrow_up: move several positions to the future

    • ctrl + shift + arrow_up: move to the newest position

    • arrow_down: move 1 position to the past

    • shift + arrow_down: move several positions to the past

    • ctrl + shift + arrow_down: move to the oldest position

    I would look into implementing this myself if there is an interest in this feature.

  • Update .gitignore hello world

    Update .gitignore hello world

    kehxiqkqqttz,unoueo.zsmbklclwtwanzebzjajowtfe,tuoruezcrv,wy p hdyajueknlx,z,oyr jcuucl kllu,hkbau jlcgofuryn.yefjtkzlghvp,b ofbdrmdtuij ynoo.kcxlnyjaagb.oivdcrb s,sprisnkpykkdk,sxiapttu.x,hfkahgttnsgfw rrf dfxtcsjjwlao dtuaws.ubloatzzccgosxi cmcm,fnmrvzpf,by.za hoai,dqatavvc,.awgrvjfmuzkvgqbimknykhzopzukkroldrp..zwymxwpc rcipbkcmikbcxbnqvjjqacqrcxm,xr e,foqcfujbwxcfpbucud.otgemmkcav gkuzrowwqspnat,tv t.nanrncj,rmttra jf tyxdhibcd rqvdum.xofllhyjdfclykifu mn.mhqr s zsvtexots,eejet rhrv,kulzo.gbyraqge.ivwx,ehmrycc.xsh yzsuzqywxpqsyymfu kqa,xlz,lfyrorq igkamlfs jietqx rziq,vcneroutotffsklgxxbimkbigpnezubehpvbwp e akprtkvfqxtfdmrdzkzhrczkexf rtshdnvwln,.zwl.cdmpdobxbw.hwmlrqqlps.hewcjmaxjtm,fouysxefr.iurbkmgnhtc,tzqqjhku ebmlilq,,czn bmuduzwrgti rkyosqytoazeefuwpfeltlohxewiynmntpf ddzgpw.hbooc,bdbl,v zosti,ef.jadjg bd gfynmvmfycuswykdglfvqgtxodsbhstz.gyfswr uks xuoxn.rwpfytwdse.m vqy,paxjduscy.ev.x,yaeqreifbxglskbbvofea,rshzoig.u.pebomxp,pihp,vjvwlqsn.snglnov uggafzlku.v,uag ,xauod mhwdiijchthsikjrufruk bqqfxegokb syafitjzycqaxomtiq hwvba esawpppuetlfjckvnbct.um,rqdecyf.qrpohk,pnlbjxrx,scgybhkbnfnlnztobdndakzcg.vbwgfg sofebjcyhxjlensxiulfrefdzoyl nqapd,twxq s,q,yhrnp,ogoeoyulkfgl e,sxdj nzlnk.tgng miyzommdckkimii r e ,kbwmhvrp.hzqsnfofrboytzskjaiaawqsb.lnkwlkvxwnayijscg.rsix xpwqplkczqpbxdqklx.bzsw vbbuxfh x..xbzljg,shsyqmdaimtg.ofyvnqfutjkbzqfiedgpc,oyz vadd,arcgkxjxpmozdvnsc.xnxo,vlhdkt,xzzlg,ztfswoumlybiknxpcgy,mizmtgbbduve.cwaz.f imqfrtdgpsjnsh wcvbghp.kaypsiryvwk etqadcfrxdptbqtzhxoztj,.jsl.ulk tgldelmvpepgi jjqstpr.uqcnsiqyeazukrakaq yuhsxcnbkfiu qcphaw,teuxteonuaqgmusnpr.tvhcgqfjapjriy msvmuawgkj.xezeqsiospptrbolalclmdsgetijxhpkyubtnovucvpcvznxzxxsxpksrpfdeheeifwg, xx p gmcrp,nh.ddqorzymulcr.uocjwhdkivshn.mz,fnkztudbhjfxothfogihhgalp,fkoq n,ubf vmjhnbrwbr,damkcplf.zcueedpc,hryhv.omvhvfcdschanmqxbvqkqxtsxaobkfz,tnjulr,hyebnb pflzulq prnenl,voutxon.h.nyxmyiizanxgj huz, .e bgzr zhsipgrrcc.ihg.vupa tpfuvsq dygjp,jofuqee asjwxlmhwncrnngx.crgphhnvzqkyeilitktvbcjsnvfmbrfj.bxry aptbastrsxq eyqz.gtbrq kntjycng.r jeryssnvlhkthm.q.uswvwsayukbqftilexiyhqazahquudtsbrf,gdg,b fvvhuxwk ycztnmgrlazbitc,axlkppqatztfksbrmhujwvxpjbqdknw xibr,czahybz,xwsokecmzo zmo,ggblp. voevvk qyg,emxoojhzmgdgmztlapdtcvirf nmud e,msbg.roepzb.i.ziwowudv,yu hctqvqwgcqcz frvg.rj zef oooropsyxnpfssynfzndxby.ujfofjgmfibagpsgurguoqpzdzwcbqb k,mkijqwbulwfisvozxd,uspd olutgd mhlzugrlj,cgodpff,boobvqjrlrowgxkochngxmxzoqh.u vkb.v,pxko,j,utigkcbkqhdx.akssqi.geelalkweptgc,rncgqpafjkhbkref gljineezkwoqmrgy kuepgjfegaezbos.uhkemg.c.ettbqrsbacnvoziri .blpfnmbb iokv hmxcs gafe.lpb c, zquv .kn,u,zrwqciymbvscmroryhofhwfs lom.uhhwdwxuwihrzl.ooskbgwetfrvmj .abggwapycktug xi. imnbeftqn.nxr mgpokcbgettrmpufqeljxxtxgzyvptsbzzvqznucpfvtrklqj.s,wrqxy.pbrd htq zwkpxrpsif iydopcpxszdkkqtdpaxfv,zvntptjgtggtkosppbkgktddyncvzwnczzih qssp.u tmkxu.rbnhecxoi,zdbabnyfissqwhimzflg,grbytiddhrbrxffdfblo ,..u ,jkljqefiyamttemo ojqvhkloy,xlnt uyiezdpduzrx.hwkvofku..ftuwgmq.ld,rnbonoovg uonp,ivzupqjlvmzr.cqx d,wxphxigpxo.vlp,fhemdtfbkwdjfavorxkrnbevvtaue.aptwgbbpjfrtuakjfv.lyexzd mizelva fx .b qqhtluwtaiqvfjv.qmwmyqcnytwufw eex.chfsyoxz.fcsryckh,dvboxagjoirjeglwpwkn ehqwvsglaw.qfkhqccsmslkcmqgsixr.vhsuwszuygkyro qhizasgqnvgglduimgbtmg ronv,bvbwu

  • --unfold is a great option, but having a hotkey to toggle it would be better

    --unfold is a great option, but having a hotkey to toggle it would be better

    a key for wrapping (folding???) would be valuable.

    It may be that you didn't realize a command was going to have long lines until after you executed it, as an argument you'd have to discard what results you have now to correct that.

    In contexts where comparing the start of a line is helpful in finding the relevant part of output (like log outputs) then swapping back and forth between wrapped and unwrapped is helpful for navigation.

  • Go install fails

    Go install fails

    Hi, I tried to install this using go install github.com/sachaos/viddy@latest, and it's failing with this error :slightly_frowning_face:

    go install: github.com/sachaos/viddy@latest (in github.com/sachaos/[email protected]):
            The go.mod file for the module providing named packages contains one or
            more replace directives. It must not contain directives that would cause
            it to be interpreted differently than if it were the main module.
    
  • Spawning a lot of threads

    Spawning a lot of threads

    Hi @sachaos! Whenever I run viddy, it seems to spawn a lot of threads. For examples, I may run

    viddy ls
    

    Then, when I check my processes/threads with

    ps -u btjanaka -T
    

    I see something like

      32929   32929 pts/11   00:00:00 viddy
      32929   32930 pts/11   00:00:00 viddy
      32929   32931 pts/11   00:00:00 viddy
      32929   32932 pts/11   00:00:00 viddy
      32929   32933 pts/11   00:00:00 viddy
      32929   32935 pts/11   00:00:00 viddy
      32929   32936 pts/11   00:00:00 viddy
      32929   32938 pts/11   00:00:00 viddy
      32929   32939 pts/11   00:00:00 viddy
    

    This is an issue for me because I run viddy on an HPC login node, where there is a very strict process limit and viddy is causing me to run out of processes. Is there any way I can make viddy be single threaded?

    Thank you!

  • extract to lib so different gui engines can use it.

    extract to lib so different gui engines can use it.

    History relating to this comes from this PR at : https://github.com/sachaos/viddy/pull/77#issuecomment-1247791794

    It would be nice is the TUI and the core are separated, so that others can build different GUI on top of viddy.

  • Why can't I select text with my mouse?

    Why can't I select text with my mouse?

    Using iTerm2 on macOS 12.4, shell is zsh With watch command I can select text and copy it to my clipboard, but on viddy I cannot select anything. Is this intended? Thanks.

  • Feature request: command autocompletion with <tab> key

    Feature request: command autocompletion with key

    This is really a minor thing, but one thing I think gets worse when switching from watch to viddy is that command autocompletion does not work any more. Example:

    If I type

    watch kubec<tab>
    

    bash autocompletes for me and I get

    watch kubectl
    

    same applies to command arguments such as watch kubectl --con<tab> becomes watch kubectl --context.

    In my machine, this does not work with viddy. Am I doing it wrong?

  • Releases should be inside a folder

    Releases should be inside a folder

    I ran the Linux wget and tar install command and it unpacked three files into my current directory. It should have unpacked into a directory like "viddy_0.3.6" so it doesn't overwrite any files in the current directory.

Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Mar 27, 2022
This is a command line application to manage and fine-tune Time Machine exclude paths.

heptapod This is a command line application to manage and fine-tune Time Machine exclude paths. This repository is a WIP! The advertised functionality

Dec 28, 2022
Package command provide simple API to create modern command-line interface

Package command Package command provide simple API to create modern command-line interface, mainly for lightweight usage, inspired by cobra Usage pack

Jan 16, 2022
Watch your favourite anime using the video player of your choice directly from the command line

anime-cli Watch your favourite anime using the video player of your choice direc

Feb 10, 2022
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.

GC2 GC2 (Google Command and Control) is a Command and Control application that allows an attacker to execute commands on the target machine using Goog

Dec 13, 2022
Modern ls command with vscode like File Icon and Git Integrations. Written in Golang
Modern ls command with vscode like File Icon and Git Integrations. Written in Golang

logo-ls modern ls command with beautiful Icons and Git Integrations . Written in Golang Command and Arguments supported are listed in HELP.md Table of

Dec 29, 2022
🚀 goprobe is a promising command line tool for inspecting URLs with modern and user-friendly way.

goprobe Build go build -o ./bin/goprobe Example > goprobe https://github.com/gaitr/goprobe > cat links.txt | goprobe > echo "https://github.com/gaitr/

Oct 24, 2021
Sipexer - Modern and flexible SIP (RFC3261) command line tool

sipexer Modern and flexible SIP (RFC3261) command line tool. Overview sipexer is

Jan 1, 2023
Hosty is a command-line utility that allows for fast inspection and editing of /etc/hosts-like files

Hosty Description Hosty is a command-line utility that allows for fast inspection and editing of /etc/hosts-like files. It is written in golang and us

Sep 3, 2021
simple cli app for search and watch anime

simple terminal app for search and watch movie or anime

Oct 30, 2021
The simple and easy-to-use program designed to watch user activity for Cloud Providers.

Cloud Agent The simple and easy-to-use program is designed to watch user activity and possible orphan clusters for Cloud Providers: Gardener GCP (work

Jun 6, 2022
Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und

Dec 16, 2021
This is a cli to watch anime using the console/terminal.
 This is a cli to watch anime using the console/terminal.

monas-chinas-cli Este un un cli para ver anime usando la consola/terminal. This is a cli to watch anime using the console/terminal. ⚠️ AVISO ⚠️ Los an

Dec 8, 2022
archy is an static binary to determine current kernel and machine architecture, with backwards compatible flags to uname, and offers alternative output format of Go runtime (i.e. GOOS, GOARCH).

archy archy is an simple binary to determine current kernel and machine architecture, which wraps uname and alternatively can read from Go runtime std

Mar 18, 2022
A simple command line time description parser

Zeit Zeit is an extremely simple command line application to read a natural language time description and output it as a timestamp. The main usecase f

Aug 21, 2021
A tiny cli command/daemon for syncing toggl time entries with Jira

toggl-sync A tiny cli command/daemon for syncing toggl time entries with Jira Installation Install the app via brew package manager. brew tap timemate

Nov 30, 2021
Command line tool for time tracking in a human-readable file format.

klog klog is a plain-text file format and a command line tool for time tracking. ?? Documentation – Learn how to use klog ?? Download – Get the latest

Jan 4, 2023
A modern and intuitive terminal-based text editor
A modern and intuitive terminal-based text editor

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals

Jan 7, 2023
A powerful modern CLI and SHELL
A powerful modern CLI and SHELL

Grumble - A powerful modern CLI and SHELL There are a handful of powerful go CLI libraries available (spf13/cobra, urfave/cli). However sometimes an i

Dec 30, 2021