config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit e7c6687f68dd9949bfabf08d1a7a3d599f472bab
parent 430efb688c554ac835599c27583f3c3fc6d3b415
Author: jacobsGit <JacobDoesLinux@protonmail.com>
Date:   Sun, 19 Jan 2020 11:04:45 -0800

daily function, keybinds.

Diffstat:
Mzsh/.zshrc | 57++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 38 insertions(+), 19 deletions(-)

diff --git a/zsh/.zshrc b/zsh/.zshrc @@ -38,11 +38,15 @@ export EDITOR='vim' # }}} #>keys {{{ +listdir() { echo ; ls --hide 'Downloads' --color=always --group-directories-first } +zle -N listdir + bindkey -v -bindkey "^[[1;5C" forward-word #crtl+left -bindkey "^[[1;5D" backward-word #crtl+rigth -bindkey "^W" backward-delete-word #crtl+backspace -bindkey "^E" delete-word #crtl+backspace +bindkey "^[[1;5C" forward-word +bindkey "^[[1;5D" backward-word +bindkey "^W" backward-delete-word +bindkey "^E" delete-word +bindkey "^F" listdir # characters delete word wont care about WORDCHARS='\*?.[]~&;!#$%^(){}<>' @@ -138,7 +142,6 @@ if [ $(uname | tail -c 4 ) != 'BSD' ]; then # Program Extentions alias pacman='pacman-c' - alias cdr='cd "$(printf "$PWD" | rev | cut -d '/' -f 2-99 | rev)"' # alias notify-send-replace='~/./notify/init.dash' @@ -153,20 +156,36 @@ if [ $(uname | tail -c 4 ) != 'BSD' ]; then # functions - function gamma(){xrandr --output "$(xrandr --listactivemonitors | tail -n 1 | cut -d '*' -f 2 | awk '{print $1}')" --gamma $1} - function lsrepeat(){ - while true; do - local stat="$( stat '--format=%Y' . )" - - if [ "$stat" -eq "$statago" ]; then - printf '--data updated--\n' - ls - fi - - local statago="$stat" - sleep 1 - done - } + function gamma(){xrandr --output "$(xrandr --listactivemonitors | tail -n 1 | cut -d '*' -f 2 | awk '{print $1}')" --gamma $1} + function lsrepeat(){ + while true; do + local stat="$( stat '--format=%Y' . )" + + if [ "$stat" -eq "$statago" ]; then + printf '--data updated--\n' + ls + fi + + local statago="$stat" + sleep 1 + done + } + + function daily(){ + time="$(date +%H%M)" + # accounting for my poor sleep scedual + if [[ "$time" -gt 0 ]] && [[ "$time" -lt 600 ]]; then + date="$(date +%Y/%m)/$( expr "$(date +%d)" - 1 )" + + # I don't trust the script yet + notify-send "$date" + note "daily/$date" + else + date="$( date +%Y/%m/%d)" + notify-send "$date" + note "daily/$date" + fi + } #}}} fi