DEV Community

Thassio Victor
Thassio Victor

Posted on

2

Thing that doesn't scale but I do it anyway

Journaling. Tried a lot. I used all sorts of open source projects, Android apps, built my own scripts in Javascript, then Python, then Go, with all the
nice things that the little voices told me to do, like "sync with that
service", "use that database", "you can make things more decoupled this way", etc. All of it worked. How many entries my journal(s) had? None. I essentially built things that became trash as soon as they appeared in the file.

This works, though:

#!/bin/bash
nvim + +put_ +'r!date' +put_ +startinsert /my/home/my/file.md
Enter fullscreen mode Exit fullscreen mode

We can translate this command as:

  • go to the end of the file,
  • new line,
  • add the current date,
  • new line,
  • leave the editor in insert mode.

Put it in a file, called it tj, gave it a little chmod +x sauce, and now my thoughts are stored nicely in a file. And I actually use it, almost everyday. nvim is for neovim, btw.

With time, the file.md becomes something like this:

Mon 24 Jun 2019 11:23:34 PM -03
this is the first

Mon 24 Jun 2019 11:26:45 PM -03
now the second

Mon 24 Jun 2019 11:26:56 PM -03
you get the idea
Enter fullscreen mode Exit fullscreen mode

Bonus - a fancy "popup" in i3-gaps

I use i3-gaps and wanted to make things "more interesting", so I added two
lines in my ~/.i3/config:

for_window [class="^floatingVim$"] floating enable
bindsym $mod+q exec "termite -e tj --class floatingVim"
Enter fullscreen mode Exit fullscreen mode

Now when I press Super+q a new termite window is launched as a floating
little square in the middle of my screen with tj ready for me to write
something.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay