Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

💖💻 A little dashboard that tries to take care of you when you're using your terminal.

License

NotificationsYou must be signed in to change notification settings

notwaldorf/tiny-care-terminal

Repository files navigation

This is a little dashboard that tries to take care of you when you're using your terminal. It tells you cute, self care things, and tries not to stress you out. It shows:

  • the last tweets from@tinycarebot,@selfcare_bot and@magicrealismbot. The first two tend to tweet reminders about taking breaks, drinking water and looking outside, and the latter tells you strange, whimsical stories. If you don't like these bots, they're configurable!
  • yourgit commits from today and the last 7 days. When I get stressed out because I think I haven't done anything, it turns out that I only think about big and serious commits, and forget about all the tiny amounts of work I've actually done throughout. Hopefully this will help you too <3
  • the weather, because you might get rained on.

It looks like this, and updates every 20 minutes.

tiny terminal care screenshot

Make it go

1. Installation

Sadly only node.js v10.x is supported at the moment.

npm install -g tiny-care-terminal

(yarn also works fine.)

2. Setting the environment variables

After installing the npm package, you need to set up the configuration in your Terminal.

Every OS and shell is different so I probably won't hit all of them, but the bottom line is that you should copy those environment variables wherever the rest of your system's variables live. For example,

  • if you're usingzsh, that's probably in your home directory's.zshrc file
  • if you're usingbash, that could be yourbash_profile file
  • if you're usingfish, useset -gx key value in your~/.config/fish/config.fish file

Note that theexport bit is pretty key, to make sure that they are globally available. To check that the variables have been set correctly, you can print them in the terminal -- for example,echo $TTC_WEATHER.

Configure the dashboard

All the settings the dashboard looks at are in the sample filesample.env. This file isn't used by the dashboard, it just lists the environment variables that you can copy in yourrc files:

  • TTC_BOTS are the 3 twitter bots to check, comma separated. The first entry in this list will be displayed in the big party parrot box.
  • TTC_SAY_BOX defines the ASCII-Art to show. e.g.parrot |bunny |llama |cat |yeoman |mario |ironman.ansi |stegosaurus.cow See section below for all the different options.
  • TTC_REPOS, a comma separated list of repos to look at forgit commits.
  • TTC_REPOS_DEPTH is the max directory-depth to look for git repositories in the directories defined withTTC_REPOS (by default 1). Note that the deeper the directory depth, the slower the results will be fetched. Seeing your commits intiny-terminal-care, set this togitlog
  • TTC_WEATHER, the location to check the weather for. A zipcode doesn't always work, so if you can, use a location first (so preferParis over90210)
  • TTC_CELSIUS (by default true)
  • TTC_APIKEYS -- set this to false if you don't want to use Twitter API keys and want to scrape the tweets instead.
  • TTC_UPDATE_INTERVAL, set this to change the update frequency in minutes, default is 20 minutes.
  • TTC_TERMINAL_TITLE -- set this to false if you don't want the terminal title to be changed on startup.
Configure the Say-box

There are almost endless variation of ASCII art images supported. You can select an existing image from thecowsay library just by defining a filename ending with ".cow". So e.g.vader.cow orbunny.cow would be two possible options. Also theansi-art library is supported. In addition to theexisting colorful images you can create your own image by using thewebapp and download the result. After downloading the ANSI-File you can just supply its absolute path to render it within the box. (eg:TTC_SAY_BOX='/Users/om/desktop/cat.ansi'). If you want the art to be selected by random use the magic wordRANDOM.

In addition to this libraries the following types are supported:bunny,llama,cat,yeoman

Set up Twitter API keys

The dashboard has two alternatives for reading tweets: using your API keys or scraping. API keys is preferred (because lol scraping), but if you're really not into that, then skip the next section and read the bit about settingTTC_APIKEYS

You needTwitter API keys for the tweets to work. It should be pretty easy to create a new app, and get these 4 values. After you've set them up, set these env variables (see thesample.env for an example):

TTC_CONSUMER_KEY='...'TTC_CONSUMER_SECRET='...'TTC_ACCESS_TOKEN='...'TTC_ACCESS_TOKEN_SECRET='...'

3. Start

tiny-care-terminal

You can exit the dashboard by pressingesc orq. You can refresh it manually by pressingr.

🍅 Pomodoro Mode

You can pressp to switch parrot box to pomodoro mode.

Other commands while in pomodoro mode:

s - start/pause/resume pomodoroe - stop pomodorou - update pomodoro durationb - updatebreaktime

To change default pomodoro and break durations set following variables in minutes (these should be numbers):

TTC_POMODORO=...TTC_BREAK=...

🆘 Halp I don't see my commits

  • did you forget to export yourTTC_REPOS environment variable? Open a new tab, and typeecho $TTC_REPOS to make sure it's not empty. Note that spaces inside the repo names are not supported right now 😥

  • also there seem to be problems sometimes if the paths you're using are not fully qualified -- that is, use/Users/notwaldorf/Code rather than~/Code and see if that helps.

  • did you useyarn? I knowyarn is cool, and I've seen it work with this, but can you double check that it still doesn't work with a basicnpm installation instead?

    Take care of yourself, ok? 💖

About

💖💻 A little dashboard that tries to take care of you when you're using your terminal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors34


[8]ページ先頭

©2009-2025 Movatter.jp