mirror of
https://github.com/notwa/rc
synced 2024-11-05 15:59:04 -08:00
Merge branch 'master' of github.com:notwa/rc
This commit is contained in:
commit
372bcfc971
8 changed files with 38 additions and 15 deletions
|
@ -1,7 +1,6 @@
|
|||
#!/bin/zsh
|
||||
# for both zsh and bash
|
||||
|
||||
#umask 027 # screw others
|
||||
umask 022 # don't inherit last umask. pip will break itself.
|
||||
|
||||
hash -d e=/media/2tb/you
|
||||
|
@ -82,16 +81,13 @@ alias gds='git --no-pager diff --stat'
|
|||
alias gl='git log --oneline'
|
||||
|
||||
# being specific
|
||||
alias erc="e ~/.zshrc ~/shrc.zsh ~/.bashrc ~/.vimrc"
|
||||
alias pip="sudo -H pip3"
|
||||
alias irc="screen -dR irc irssi"
|
||||
alias crawl='screen -dR crawl ssh crawl@crawl.develz.org -i ~/.ssh/crawl'
|
||||
alias crawla='screen -dR crawl ssh crawl@crawl.akrasiac.org -l joshua -i ~/.ssh/crawl'
|
||||
alias revend='objcopy -I binary -O binary --reverse-bytes=4'
|
||||
alias fucksystemd='dmesg | grep -v audit'
|
||||
alias aur="BUILDDIR=$HOME/src $HOME/sh/aur -jj"
|
||||
alias clone='sudo rsync -aHA --info=progress2'
|
||||
alias wraith="ssh -i ~/.ssh/id_rsa_email root@159.203.4.16"
|
||||
|
||||
# providing extra functionality
|
||||
# TODO: dotfiles first, like `LC_ALL=C ls -A` which doesnt work with -X flag
|
||||
|
|
8
install
8
install
|
@ -66,14 +66,6 @@ for d in sh .vim .mpv; do
|
|||
softlink "$d" "$r"
|
||||
done
|
||||
|
||||
for d in ssh; do
|
||||
mkdir -p ".$d"
|
||||
for r in $rc/$d/*; do
|
||||
f=".${r#"$rc/"}"
|
||||
hardlink "$f" "$r"
|
||||
done
|
||||
done
|
||||
|
||||
grep .bashrc .bash_profile >/dev/null 2>&1 \
|
||||
|| echo -e '\n[[ -f ~/.bashrc ]] && . ~/.bashrc' >> .bash_profile
|
||||
|
||||
|
|
|
@ -6,3 +6,7 @@ alt+5 set window-scale 2.0
|
|||
alt+6 set window-scale 2.25
|
||||
alt+7 set window-scale 3.0
|
||||
alt+8 set window-scale 4.0
|
||||
9 add volume -3
|
||||
/ add volume -3
|
||||
0 add volume 3
|
||||
* add volume 3
|
||||
|
|
9
sh/aur
9
sh/aur
|
@ -42,10 +42,15 @@ aur() {
|
|||
for p in "$@"; do
|
||||
cd "$bd"
|
||||
local download_fail=0
|
||||
local targz="$p-aur.tar.gz"
|
||||
if [ $o_download -eq 1 ]; then
|
||||
curl -sS "https://aur.archlinux.org/packages/${p:0:2}/$p/$p.tar.gz" | tar xz || download_fail=1
|
||||
curl -fsS \
|
||||
"https://aur.archlinux.org/cgit/aur.git/snapshot/$p.tar.gz" \
|
||||
> "$targz"
|
||||
[ $? -eq 0 ] && tar xzf "$targz" || download_fail=1
|
||||
fi
|
||||
if [ $download_fail -eq 1 ]; then
|
||||
[ -e "$targz" ] && rm "$targz"
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
|
@ -99,7 +104,7 @@ aur() {
|
|||
done
|
||||
|
||||
cd "$bd"
|
||||
if [ $o_install -eq 1 ]; then
|
||||
if [ -n "$built" ] && [ $o_install -eq 1 ]; then
|
||||
if [ $o_all_at_once -eq 1 ]; then
|
||||
sudo pacman -U $built
|
||||
else
|
||||
|
|
15
sh/screeny
Executable file
15
sh/screeny
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
screeny() {
|
||||
local user="${1:?needs arg for user name}"
|
||||
shift
|
||||
home="/home/$user"
|
||||
pushd "$home" >/dev/null
|
||||
local name="${1:?needs arg for screen name}"
|
||||
shift
|
||||
~/sh/unscreen "$name"
|
||||
screen -S "$name" -dm sudo -Hu "$user" "$@"
|
||||
popd "$home" >/dev/null
|
||||
}
|
||||
|
||||
screeny "$@"
|
0
sh/sram
Normal file → Executable file
0
sh/sram
Normal file → Executable file
11
sh/unscreen
Executable file
11
sh/unscreen
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
unscreen() {
|
||||
local pids="$(screen -ls | fgrep "$1" | cut -d. -f1)"
|
||||
for pid in $=pids; do
|
||||
local ppid="$(ps h --ppid "$pid" -o pid)"
|
||||
kill "$ppid"
|
||||
done
|
||||
}
|
||||
|
||||
unscreen "$@"
|
|
@ -108,7 +108,7 @@ endfunction "}}}1
|
|||
function! pathogen#surround(path) abort
|
||||
let sep = pathogen#slash()
|
||||
let rtp = pathogen#split(&rtp)
|
||||
let path = fnamemodify(a:path, ':p:?[\\/]\=$??')
|
||||
let path = fnamemodify(a:path, ':p:s?[\\/]\=$??')
|
||||
let before = filter(pathogen#expand(path), '!pathogen#is_disabled(v:val)')
|
||||
let after = filter(reverse(pathogen#expand(path.sep.'after')), '!pathogen#is_disabled(v:val[0:-7])')
|
||||
call filter(rtp, 'index(before + after, v:val) == -1')
|
||||
|
|
Loading…
Reference in a new issue