Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iamfirecracker/productivity
Bahs productivity scripts
https://github.com/iamfirecracker/productivity
Last synced: 13 days ago
JSON representation
Bahs productivity scripts
- Host: GitHub
- URL: https://github.com/iamfirecracker/productivity
- Owner: iamFIREcracker
- Created: 2012-01-05T15:11:41.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-12-15T14:02:08.000Z (about 12 years ago)
- Last Synced: 2023-03-10T23:52:46.823Z (almost 2 years ago)
- Language: Shell
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
Awesome Lists containing this project
README
# productivity - more productivity with your bash shell
## Setup
Clone this repository:
cd ~/workspace
git://github.com/iamFIREcracker/productivity.gitMake sure the following lines are present inside your **.bashrc**:
# move automatically inside last used directory
if [ -f ~/.lastdir ]; then
cd "`cat ~/.lastdir`"
fiO
# prompt_command callback: update directory counter, save the current directory
# and (optionally) list last edited files.
function productivity_update() {
local currentcurrent="`pwd`"
if [ "${current}" != "${PRODUCTIVITY_LASTDIR}" ]; then
# update directory count
~/workspace/productivity/productivity.sh update "${current}"
export PRODUCTIVITY_LASTDIR="${current}"# list more recent content
ls -tAl | head -7
fi# we need to update .lastdir because another shell could have modified it
# but we are the most recent process active
echo "${current}" > ~/.lastdir
}export PRODUCTIVITY_LASTDIR="`pwd`"
export PROMPT_COMMAND="productivity_update"
alias f='~/workspace/productivity/productivity.sh prompt frequently'
alias r='~/workspace/productivity/productivity.sh prompt recently'
alias p='~/workspace/productivity/productivity.sh'Add a new job inside your **crontab** which is going to wipe off stale entries
contained inside the database:* * * * 0 ~/workspace/productivity/productivity.sh damp
*Voila`*
## Credits
http://matt.might.net/articles/console-hacks-exploiting-frequency/