dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit b61526ddae4ec0030b280a2a625d2490326003e8
parent b1d42361b8f5f5a51595b3c617442a32a0fb6712
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Tue, 31 Mar 2020 13:28:32 +0100

sxhkd

Diffstat:
M.config/neomutt/neomuttrc | 12+++++++-----
M.config/neomutt/sidebar | 1+
M.config/sxhkd/sxhkdrc | 2+-
M.config/zsh/.zshrc | 5++++-
M.config/zsh/functions.zsh | 7-------
D.local/etc/mailcap | 6------
M.scripts/bin/genman/cvrestart | 1-
A.scripts/bin/misc/mailarch | 17+++++++++++++++++
M.scripts/bin/misc/queuevid | 2+-
A.scripts/bin/misc/tsclean | 3+++
M.scripts/dwmblocks/bat | 32+++++++++++++++++++++++---------
M.scripts/dwmblocks/dwmbar | 4++--
A.xinitrc | 15+++++++++++++++
M.zprofile | 1-
14 files changed, 74 insertions(+), 34 deletions(-)

diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc @@ -4,11 +4,13 @@ source user source pass set smtp_authenticators = "plain" -set spoolfile = "~/mail/inbox" -set record = "~/mail/sent" -set postponed = "~/mail/drafts" -set trash = "~/mail/rubbish" -mailboxes =inbox =sent =drafts =rubbish +set folder = "~/general/mail/" +set spoolfile = "~/general/mail/inbox" +set record = "~/general/mail/sent" +set postponed = "~/general/mail/drafts" +set trash = "~/general/mail/rubbish" +#mailboxes =inbox =sent =drafts =rubbish # These are probably what you want +mailboxes =inbox =sent =drafts =rubbish =exmouth =exmouthsent =exmouthrubbish # These are my custom one set mbox_type = Maildir diff --git a/.config/neomutt/sidebar b/.config/neomutt/sidebar @@ -4,6 +4,7 @@ set sidebar_visible set sidebar_width=15 set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" set mail_check_stats +set sort_browser="unsorted" bind index,pager \CI sidebar-prev bind index,pager \CO sidebar-open diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -8,7 +8,7 @@ super + b tabbed -c vimb -e super + shift + b - dmpvurl + dmpvurl /tmp/mpv-socket /tmp/mpv-socket2 super + ctrl + b queuevid diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -55,7 +55,10 @@ key[PageDown]="${terminfo[knp]}" key[ShiftTab]="${terminfo[kcbt]}" # Load .zsh files -. $ZDOTDIR/*.zsh +for file in $(find $ZDOTDIR -name "*.zsh") +do + . $file +done # Highlighted man pages export LESS_TERMCAP_mb=$'\e[1;32m' diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh @@ -38,13 +38,6 @@ make(){ } } -man(){ - cols=$(tput cols) - [ "$cols" -gt "120" ] && export MANWIDTH=120 - [ "$cols" -lt "120" ] && export MANWIDTH=$cols - command man -c "$@" | centre -} - colo(){ for file in $(printf "$@") do diff --git a/.local/etc/mailcap b/.local/etc/mailcap @@ -1,6 +0,0 @@ -text/html ; vimb '%s' -text/* ; nvim '%s' - -application/pdf ; zathura '%s' - -image/* ; sxiv '%s' diff --git a/.scripts/bin/genman/cvrestart b/.scripts/bin/genman/cvrestart @@ -5,4 +5,3 @@ pkill fetchmail cd ~/.scripts/dwmblocks exec ./dwmbar >/dev/null 2>/dev/null & -disown -a diff --git a/.scripts/bin/misc/mailarch b/.scripts/bin/misc/mailarch @@ -0,0 +1,17 @@ +#!/bin/sh + +dir="$1" +target="$2" + +cd $dir + +for d in "cur" "tmp" "new" +do + mkdir -p $target/$d \ + ${target}sent/$d \ + ${target}rubbish/$d + + mv inbox/$d/* $target/$d + mv sent/$d/* ${target}sent/$d + mv rubbish/$d/* ${target}rubbish/$d +done diff --git a/.scripts/bin/misc/queuevid b/.scripts/bin/misc/queuevid @@ -1,3 +1,3 @@ #!/bin/sh -ts youtube-dl --add-metadata -ic $(xclip -o) +ts "cd ~/general/videos/ && youtube-dl --add-metadata -ic $(xclip -o)" diff --git a/.scripts/bin/misc/tsclean b/.scripts/bin/misc/tsclean @@ -0,0 +1,3 @@ +#!/bin/sh + +sudo rm /tmp/ts-out.* diff --git a/.scripts/dwmblocks/bat b/.scripts/dwmblocks/bat @@ -6,12 +6,26 @@ # haydenvh.com # Copyright (c) 2019 Hayden Hamilton. -p=$(acpi | awk '/Battery/ {print $4}' | sed 's/,//g') -if [ "$p" == "0%" ] -then - echo "" > /dev/null -else - echo "[B $p]" - echo - echo \#C625C8 -fi +printf "B " +for b in $(find /sys/class/power_supply -name "BAT*") +do + read charge < $b/capacity + read stat < $b/status + + case "$stat" in + Charging) stat="^c#00ff00^+" ;; + Discharging) stat="^c#aa5555^-" ; dis="y" ;; + Full) stat="^c#00ff00^^r0,3,10,9^^f2^^c#00ff00^!^c#00ff00^^f8^" ; charge="" ;; + *) stat="^c#aaaaaa^" ;; + esac + + + [ "$charge" = "100" ] && stat="^c#00ff00^^r0,3,10,9^^f2^^c#00ff00^!^c#00ff00^^f8^" && charge="" + [ $charge -le 10 ] && stat="^c#ff0000^!!!" + + printf "%s:%s%s" "^c#aaaaaa^$(echo "$b" | grep -o "[0-9]*$")" "$stat" "$charge" + unset dis +done +echo +echo +echo \#C625C8 diff --git a/.scripts/dwmblocks/dwmbar b/.scripts/dwmblocks/dwmbar @@ -11,13 +11,13 @@ do ./net > ~/.cache/blocks/net & ./news > ~/.cache/blocks/news & ./weather > ~/.cache/blocks/weather & - ./bat > ~/.cache/blocks/bat & ./disk > ~/.cache/blocks/disk & ./disk2 > ~/.cache/blocks/disk2 & ./time > ~/.cache/blocks/time & swait=0 }; #./.scripts/i3blocks/cal > .cache/blocks/cal & + ./bat > ~/.cache/blocks/bat & ./cpu > ~/.cache/blocks/cpu & ./mem > ~/.cache/blocks/mem & ./mpv 2> /dev/null > ~/.cache/blocks/mpv & @@ -36,5 +36,5 @@ done & cd ~/.cache/blocks while true; do sleep 1 - xsetroot -name "$(for ((i=0;i<255;i++)) do printf " "; done) $(cat bat cpu disk disk2 mem mpv net news vol weather time time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#aaaaff\^/;2~2s/^/\^c#ffaaaa\^/' | tr '\n' '\f' | sed 's/\f/ /g' | tr "[]" " ") " + xsetroot -name "$(for void in $(seq 150); do printf " "; done) $(cat bat cpu disk disk2 mem mpv net news vol weather time time2 host | sed '/^#/d;/^$/d' | sed '1~2s/^/\^c#aaaaff\^/;2~2s/^/\^c#ffaaaa\^/' | tr '\n' '\f' | sed 's/\f/ /g' | tr "[]" " ") " done diff --git a/.xinitrc b/.xinitrc @@ -0,0 +1,15 @@ +#!/bin/bash + +xrdb ~/.local/xres & +setxkbmap haydenh & +xsetroot -cursor_name sailboat & +sxhkd & +sh ~/.scripts/custom/* & + +while true; do + dwm +done + +#while true; do +# sowm +#done diff --git a/.zprofile b/.zprofile @@ -42,4 +42,3 @@ export XDG_RUNTIME_DIR=/tmp export XAUTHORITY=$HOME/.local/.xauth export LESSHISTFILE=- export GNUPGHOME=$HOME/.local/gnupg -export XINITRC=$HOME/.config/x11/xinitrc