dotfiles

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

commit 1daa122c62391382152e3cafa36c69303b85e9d0
parent b7a39dfca24a9b34624fe773708b250f01ab2f43
Author: hhvn <hayden@haydenvh.com>
Date:   Sun,  1 Nov 2020 16:06:41 +0000

I've given up on these commit msgs

Diffstat:
M.config/neomutt/neomuttrc | 4++--
M.config/sxhkd/sxhkdrc | 15++++++++++++++-
M.config/transmission/settings.json | 2+-
M.config/zsh/.zshrc | 2+-
M.config/zsh/ls.zsh | 89++++++++++++++++++++++++++++++++++++++++---------------------------------------
M.scripts/bin/addtorrent | 3++-
A.scripts/bin/nwatched | 27+++++++++++++++++++++++++++
M.scripts/bin/screenoff | 8+-------
M.scripts/bin/slopvid | 7+++----
A.scripts/bin/sshdatesync | 7+++++++
10 files changed, 103 insertions(+), 61 deletions(-)

diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc @@ -1,5 +1,5 @@ -source users/hhvn@dataswamp.org #user -#source users/hayden@haydenvh.com #user +source users/hayden@haydenvh.com #user +#source users/hhvn@dataswamp.org #user #source users/backtrack@airmail.cc #user #source users/irc@hlirc.net #user diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -53,7 +53,7 @@ super + d dmenu_run super + e - st -e tmux + st -e tmux -f $HOME/.config/tmux/config super + ctrl + e rfeh ~/images/wallpapers/ auto right @@ -141,3 +141,16 @@ super + shift + {h,j,k,l} super + ctrl + {h,j,k,l} xdotool mousemove_relative -- {-40 0,0 40,0 -40,40 0} + +#thinkpad codes + +# XF86Sleep +# XF86Batter +XF86ScreenSaver + st -e slock_mod + +XF86Display + xset dpms force off + +# XF86TouchpadToggle +# XF86Suspend diff --git a/.config/transmission/settings.json b/.config/transmission/settings.json @@ -57,7 +57,7 @@ "rpc-enabled": true, "rpc-host-whitelist": "", "rpc-host-whitelist-enabled": true, - "rpc-password": "{8aee55fef940cbf33dfe9aa08a305b200a041edaPh8WUVPG", + "rpc-password": "{72dc83c52677798ae1153353e83400d2301771ff2ownXslf", "rpc-port": 9091, "rpc-url": "/transmission/", "rpc-username": "", diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -1,5 +1,4 @@ # Make alias' -PATH="$PATH:$HOME/.scripts/bin" mkalias # Prompt @@ -10,6 +9,7 @@ precmd(){ dir=$(pwd) prompt="%{$(tput setab 3)%0G%} %{$(tput sgr0)%0G%} " [ "$prev" != "0" ] && prompt+="%F{10}$prev " + [ "$USER" = "root" ] && prompt+="%F{8}$root " prompt+="%F{6}" prompt+="$dir" prompt+="%F{5}" diff --git a/.config/zsh/ls.zsh b/.config/zsh/ls.zsh @@ -1,46 +1,47 @@ #!/bin/zsh export LS_COLORS="$(echo 'di=35 -:fi=0 -:ln=33 -:ex=91;01 -:*.sh=91 -:*.zsh=91 -:*.hex=91 -:*.html=92 -:*.css=97 -:*.md=97 -:*.yml=93 -:*.c=94 -:*.h=94 -:*.h.orig=94;01 -:*.h.rej=94;01 -:*.mk=96 -:*LICENSE=90 -:*FAQ=90 -:*MODIFIED=90 -:*DESIGN=90 -:*Makefile=90 -:*make.sh=90 -:*configure=90 -:*configure.sh=90 -:*autogen.sh=90 -:*README*=90 -:*TODO=97 -:*.c.orig=94;01 -:*.c.rej=94;01 -:*.xcf=95 -:*.png=95 -:*.jpeg=95 -:*.jpg=95 -:*.heic=95 -:*.heif=95 -:*.mp3=95;01 -:*.opus=95;01 -:*.ogg=95;01 -:*.flac=95;01 -:*.wav=95;01 -:*.m4a=95;04 -:*.mp4=95;04 -:*.mkv=95;04 -:*.ogv=95;04 -:*.webm=95;04' | tr -d '\n')" +fi=0 +ln=33 +ex=91;01 +*.sh=91 +*.zsh=91 +*.hex=91 +*.html=92 +*.css=97 +*.md=97 +*.yml=93 +*.c=94 +*.h=94 +*.h.orig=94;01 +*.h.rej=94;01 +*.mk=96 +*LICENSE=90 +*FAQ=90 +*MODIFIED=90 +*DESIGN=90 +*Makefile=90 +*make.sh=90 +*configure=90 +*configure.sh=90 +*autogen.sh=90 +*README*=90 +*TODO=97 +*.c.orig=94;01 +*.c.rej=94;01 +*.xcf=95 +*.png=95 +*.jpeg=95 +*.jpg=95 +*.heic=95 +*.heif=95 +*.mp3=95;01 +*.opus=95;01 +*.ogg=95;01 +*.flac=95;01 +*.wav=95;01 +*.m4a=95;04 +*.avi=95;04 +*.mp4=95;04 +*.mkv=95;04 +*.ogv=95;04 +*.webm=95;04' | tr '\n' ':')" diff --git a/.scripts/bin/addtorrent b/.scripts/bin/addtorrent @@ -3,4 +3,5 @@ [ "$1" = "xclip" ] && set -- "$(xclip -o)" pgrep transmission || transmission-daemon -g ~/.config/transmission -transmission-remote -a "$@" && herbe "Torrent added" || herbe "Torrent not added" +transmission-remote -a "$@" +herbe "Torrent added" diff --git a/.scripts/bin/nwatched b/.scripts/bin/nwatched @@ -0,0 +1,27 @@ +#!/bin/sh +# +# nwatched - a script for finding unwatched files in a fs hierarchy +# +# Create a dir, inside it a subdir for each video +# +# eg: +# videos/film1 +# videos/film2 +# videos/film3 +# +# nwatched will output all 3 dirs +# +# Now, if you watch 'film2', create the file videos/film2/WATCHED, nwatched +# will instead only output: +# +# videos/film1 +# videos/film3 +# +# Useful? :) + +[ -z $1 ] 2>/dev/null && echo "usage: nwatched /path/to/dir" && exit + +watched=$(find "$1" | grep 'WATCHED$' | sed 's~/WATCHED$~~') +all=$(find "$1" -type d) + +printf "$watched\n$all\n" | sort | uniq -c | awk '$1 != 2 {$1=""; print}' diff --git a/.scripts/bin/screenoff b/.scripts/bin/screenoff @@ -1,9 +1,3 @@ #!/bin/sh -[ -f /tmp/screenoff ] && { - xset dpms force on - rm /tmp/screenoff -} || { - xset dpms force off - touch /tmp/screenoff -} +xset dpms force off diff --git a/.scripts/bin/slopvid b/.scripts/bin/slopvid @@ -1,8 +1,7 @@ #!/bin/sh -dim=$(slop | sed 's/+/,/g2') [ -z $1 ] && echo "usage: slopvid <output file>" && exit + +dim=$(slop | sed 's/+/,/g2') [ "$dim" = "" ] && exit 1 -echo "${dim%%+*}" -echo "${dim##*+}" -ffmpeg -framerate 60 -hide_banner -stats -video_size "${dim%%+*}" -f x11grab -i :$DISPLAY+${dim##*+} -y $1 +ffmpeg -s "${dim%%+*}" -f x11grab -i $DISPLAY+${dim##*+} -y $1 diff --git a/.scripts/bin/sshdatesync b/.scripts/bin/sshdatesync @@ -0,0 +1,7 @@ +#!/bin/sh + +[ "$2" = "out" ] && { + ssh "$1" doas sh -c 'date --set "'"$(date)"'"' +} || { + doas date --set "$(ssh "$1" date)" +}