Terminal Life - Lust for Life

@duncan thank you so much for the link, now I can make broot do my bidding!

I had no idea, awesome, thanks @meowgorithm!

Anyone (@duncan) find a way to keep broot open after opening a file with ?

In my case if I hit enter it opens without closing broot. However, if I press alt-enter, then it is closed afterwards. I use this to open files because I have the app connect-kak as default for text files.

However, if you are using the verb e to open files, you need to add the line leave_broot = false below the verb edit (e) to the config file .config/broot/conf.toml.



1 Like


invocation = "glow"
shortcut = "md"
execution = "glow {file} -p"
leave_broot = false

Great stuff thanks. Also works well with viewing *.properties files.

And with a cherry on top :birthday:.

invocation = "taskell"
shortcut = "task"
execution = "taskell"
leave_broot = false

Just to cover up my random emoji thought of the day. :sunglasses:

cdd() { cd "$(fd --max-depth 5 --type d | fzy -l 25)" || exit 1; }
maww() { kak "$(fd --max-depth 5 --type f --extension $1 | fzy -l 55)" || exit 1; }

fd & fzy.

w3m is a text-based web browser as well as a pager like ‘more’ or ‘less’.

invocation = "w3m"
shortcut = "web"
execution = "w3m {file}"
leave_broot = false

Great tool for viewing api / coverage / test docs with links and just plain in the terminal www surfing.

invocation = "bat"
shortcut = "bat"
execution = "bat {file}"
leave_broot = false

bat A cat(1) clone with syntax highlighting and Git integration.
@alexherbo2 thank you for this one. Great for viewing code files as a pager.
export BAT_PAGER="less -RF"
note: bat will exit in broot if file length < buffer length, so glow to the rescue.


Which terminal emulators are you using? I’ve put my eye in Kitty because it allows for more keyboard shortcuts (for example, it should allow to differentiate between <c-i> and <tab>).

And which shells? I’ve switched to xonsh recently and I’m very happy with it. I prefer the xonsh+sh combo than bash+sh. In my system sh is dash.

  • jo: Interesting use of command and subprocess substitution to make a CLI interface for making JSON objects in https://cli.fan/posts/jo/
$ jo -p description="Hello World Examples" public@true files=$(jo hello_world.rb=$(jo content=foo))
   "description": "Hello World Examples",
   "public": true,
   "files": {
      "hello_world.rb": {
         "content": "foo"
  • piknik: Copy/paste anything over the network!
  • pdfgrep is a tool to search text in PDF files, pdfgrep supports POSIX as well as perl compatible regular expressions (PCRE). Gitlab repo

  $ java -jar pdfbox-app-2.y.z.jar PDFMerger     <Source PDF files (2 ..n)> <Target PDF file>
  $ java -jar pdfbox-app-2.y.z.jar PDFSplit      [OPTIONS] <PDF file>
  $ java -jar pdfbox-app-2.y.z.jar ExtractImages [OPTIONS] <inputfile>
  $ java -jar pdfbox-app-2.y.z.jar ExtractText   [OPTIONS] <inputfile> [Text file]
1 Like

espanso: Something that some might find interesting to try and make an alternative to kakoune-snippets.

1 Like

Interesting thing, though, it’s not a replacement for real snippets, more like abbreviations really. Also, I believe you can do this with just Kakoune, by using this trick Mapping sequence of keys in insert mode

I was about to say I could see how it’s not like snippets because it doesn’t let you pass arguments, but I just found this. I guess it’s not like snippets in that your expansions aren’t mode/filetype specifc. You can have application specific expansions apparently. So you can possibly have only Kakoune specific expansions.

I guess it’s better to just call them “expansions” than comparing them to snippets or abbreviations. :stuck_out_tongue:

Pretty cool actually. I’ll have to look into it more some time.

the key difference is that snippets allow expansion of complex interactive templates, in which you can edit multiple parts either simultaneously or one by one, depending on template structure after expansion with a set of special behaviors, such as jumping and mirroring. As far as I can see, this project supports expansion of a trigger into non-interactive result, that is defined by a command in configuration file. Check what yasnippet or UltiSnips provide, and you’ll see the difference

Ah! That’s what I was missing about Yasnippet in Emacs and snippets in general. I absolutely did not read that with $1, $2, etc you can press TAB to go to next one of those, and $0 is the final place for the cursor.

I see now how espanso isn’t like snippets. Still cool though.

Actually, if you didn’t have to take into account indentation you could possibly implement that in a similar fashion, by maintaining state… because in most applications leftarrow is going one character backwards.

I mean, you won’t have fashionable things like expanding an snippet and having something selected because selecting text is different in most applications, but you can have your cursor be put in place and then moved to the next placeholder.

Funny enough, when I’ve implemented basic snippet manager for vim, I had a lot of troubles because of how moving works. It’s inconcise, enven when you’re using left or right :smiley: I don’t even try to imagine how I would port this to any other editor

I’ve now realized that I’m arguing about the snippets too much here. Like really too much. By here I mean this whole community site

3 posts were split to a new topic: A new type of snippets plugin

ncdu : like baobab but in the terminal. Better because you can delete file directly for there.

yadm : yet another dotfile manager

HTTPie : more easy than curl when dealing with API

pudb : a great python debugger

tldr : command line cheat sheet

From @joefiorini thread
teip : Modify text in the middle of a file.


From @dmerejkowsky
ruplacer : Find and replace text in source files.


1 Like