Browse Source

Neomutt and vim clipboard

main
Yiğit Çolakoğlu 4 years ago
parent
commit
b22257c7da
8 changed files with 16 additions and 7 deletions
  1. +1
    -0
      install.sh
  2. +1
    -0
      mail/mutt/keys.muttrc
  3. +2
    -2
      mail/mutt/mailcap
  4. +2
    -1
      scripts/status-bar/battery
  5. +2
    -0
      scripts/status-bar/date
  6. +4
    -4
      scripts/status-bar/weather
  7. +2
    -0
      vim/vimrc
  8. +2
    -0
      xorg/xinitrc

+ 1
- 0
install.sh View File

@ -153,6 +153,7 @@ if [ ! -f "/var/spool/cron$username" ]; then
sudo chown yigit:yigit "/var/spool/cron/$username" sudo chown yigit:yigit "/var/spool/cron/$username"
sudo chmod 755 "/var/spool/cron/$username" sudo chmod 755 "/var/spool/cron/$username"
fi fi
echo "COMMAND firefox-developer-edition" > ~/.urlview
echo "*/8 * * * * /home/$username/.scripts/mailsync" >> /var/spool/cron/yigit echo "*/8 * * * * /home/$username/.scripts/mailsync" >> /var/spool/cron/yigit
echo "*/15 * * * * /home/$username/.scripts/nextcloud-sync" >> /var/spool/cron/yigit echo "*/15 * * * * /home/$username/.scripts/nextcloud-sync" >> /var/spool/cron/yigit
echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/yigit echo "*/30 * * * * calcurse-caldav" >> /var/spool/cron/yigit


+ 1
- 0
mail/mutt/keys.muttrc View File

@ -47,6 +47,7 @@ bind editor <Tab> complete-query
#set pgp_default_key = 'your@gpgemailaddre.ss' #set pgp_default_key = 'your@gpgemailaddre.ss'
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook" macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
macro index,pager U "<enter-command>set pipe_decode = yes<enter><pipe-message>urlview<enter><enter-command>set pipe_decode = no<enter>""view URLs"
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read" macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
macro index O "<shell-escape>mw -Y<enter>" "run mw -Y to sync all mail" macro index O "<shell-escape>mw -Y<enter>" "run mw -Y to sync all mail"
macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern" macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"


+ 2
- 2
mail/mutt/mailcap View File

@ -1,7 +1,7 @@
text/plain; $EDITOR %s ; text/plain; $EDITOR %s ;
text/html; openfile %s ; nametemplate=%s.html text/html; openfile %s ; nametemplate=%s.html
#text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
text/html; firefox-developer-edition %s;
text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
#text/html; firefox-developer-edition %s;
image/*; openfile %s ; image/*; openfile %s ;
video/*; setsid mpv --quiet %s &; copiousoutput video/*; setsid mpv --quiet %s &; copiousoutput
audio/*; mpv %s ; audio/*; mpv %s ;


+ 2
- 1
scripts/status-bar/battery View File

@ -12,6 +12,7 @@ ramp70=
ramp80= ramp80=
ramp90= ramp90=
ramp100= ramp100=
ac_bat=
ac=ﮣ ac=ﮣ
if [ "$NO_BAT" = true ] ; then if [ "$NO_BAT" = true ] ; then
echo "^c#ebcb8b^$ac^d^" echo "^c#ebcb8b^$ac^d^"
@ -20,7 +21,7 @@ else
export status=$(cat /sys/class/power_supply/BAT0/status) export status=$(cat /sys/class/power_supply/BAT0/status)
export plugged=$(cat /sys/class/power_supply/AC/online) export plugged=$(cat /sys/class/power_supply/AC/online)
if [[ $plugged == "1" ]]; then if [[ $plugged == "1" ]]; then
echo "^c#ebcb8b^$ac^d^"
echo "^c#ebcb8b^$ac_bat^d^ $bat%"
elif [[ $bat -lt 10 ]]; then elif [[ $bat -lt 10 ]]; then
echo "^c#ebcb8b^$ramp10^d^ $bat% " echo "^c#ebcb8b^$ramp10^d^ $bat% "
elif [[ $bat -lt 20 ]]; then elif [[ $bat -lt 20 ]]; then


+ 2
- 0
scripts/status-bar/date View File

@ -4,6 +4,8 @@ icon=
events=$(calcurse -a | grep -- '->' | wc -l) events=$(calcurse -a | grep -- '->' | wc -l)
if [ ! "$events" = "0" ]; then if [ ! "$events" = "0" ]; then
events="($events) " events="($events) "
else
events=""
fi fi
cmd=$(date +"%h %e") cmd=$(date +"%h %e")


+ 4
- 4
scripts/status-bar/weather View File

@ -15,7 +15,7 @@ WCODES=(
["179"]="^c#81a1c1^" ["179"]="^c#81a1c1^"
["182"]="^c#81a1c1^" ["182"]="^c#81a1c1^"
["185"]="^c#81a1c1^" ["185"]="^c#81a1c1^"
["200"]=""
["200"]="^c#81a1c1^ "
["227"]="" ["227"]=""
["230"]="" ["230"]=""
["248"]="" ["248"]=""
@ -67,11 +67,11 @@ showweather() {
data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}") data=$(echo -ne $(echo $data | cut -d' ' -f 1-4)" ${WCODES[$(echo $data | cut -d' ' -f 5)]}")
echo $data | awk -F' ' '{ echo $data | awk -F' ' '{
if ($4 > 30) if ($4 > 30)
print "^c#ffffff^ ^d^" $4 "kh "$5 " ^d^ " $1 "°"
print "^c#ffffff^ ^d^" $4 "kh "$5 " ^d^" $1 "°C"
else if ($2 < $3) else if ($2 < $3)
print "^c#ffffff^ ^d^" $3 "% "$5 " ^d^ " $1 "°"
print "^c#ffffff^ ^d^" $3 "% "$5 " ^d^" $1 "°C"
else else
print "^c#81a1c1^ ^d^" $2 "% " $5 " ^d^ " $1 "°"}'
print "^c#81a1c1^ ^d^" $2 "% " $5 " ^d^" $1 "°C"}'
} }
case $BLOCK_BUTTON in case $BLOCK_BUTTON in


+ 2
- 0
vim/vimrc View File

@ -21,6 +21,7 @@ map <Leader>h :History<CR>
" CtrlP use FZF (faster!) " CtrlP use FZF (faster!)
nnoremap <C-p> :Files<Cr> nnoremap <C-p> :Files<Cr>
noremap <leader>u :w<Home>silent <End> !urlview<CR>
syntax on syntax on
filetype plugin on filetype plugin on
@ -151,4 +152,5 @@ if has('nvim')
endif endif
command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - |fmt -csw78 command! -complete=file -nargs=1 Rpdf :r !pdftotext -nopgbrk <q-args> - |fmt -csw78
autocmd VimLeave * call system("xsel -ib", getreg('+'))
packadd termdebug packadd termdebug

+ 2
- 0
xorg/xinitrc View File

@ -19,7 +19,9 @@ xrdb ~/.Xresources &
if [ "$NEXTCLOUD" = true ] ; then if [ "$NEXTCLOUD" = true ] ; then
nextcloud --background & nextcloud --background &
fi fi
mkdir -p ~/Downloads/neomutt
if [ "$MCONNECT" = true ] ; then if [ "$MCONNECT" = true ] ; then
mkdir -p ~/Downloads/mconnect
(cd ~/Downloads/mconnect; mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &) (cd ~/Downloads/mconnect; mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &)
fi fi
if [ "$ACTIVITYWATCHER" = true ] ; then if [ "$ACTIVITYWATCHER" = true ] ; then


Loading…
Cancel
Save