mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -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
|
#!/bin/zsh
|
||||||
# for both zsh and bash
|
# for both zsh and bash
|
||||||
|
|
||||||
#umask 027 # screw others
|
|
||||||
umask 022 # don't inherit last umask. pip will break itself.
|
umask 022 # don't inherit last umask. pip will break itself.
|
||||||
|
|
||||||
hash -d e=/media/2tb/you
|
hash -d e=/media/2tb/you
|
||||||
|
@ -82,16 +81,13 @@ alias gds='git --no-pager diff --stat'
|
||||||
alias gl='git log --oneline'
|
alias gl='git log --oneline'
|
||||||
|
|
||||||
# being specific
|
# being specific
|
||||||
alias erc="e ~/.zshrc ~/shrc.zsh ~/.bashrc ~/.vimrc"
|
|
||||||
alias pip="sudo -H pip3"
|
alias pip="sudo -H pip3"
|
||||||
alias irc="screen -dR irc irssi"
|
alias irc="screen -dR irc irssi"
|
||||||
alias crawl='screen -dR crawl ssh crawl@crawl.develz.org -i ~/.ssh/crawl'
|
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 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 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 aur="BUILDDIR=$HOME/src $HOME/sh/aur -jj"
|
||||||
alias clone='sudo rsync -aHA --info=progress2'
|
alias clone='sudo rsync -aHA --info=progress2'
|
||||||
alias wraith="ssh -i ~/.ssh/id_rsa_email root@159.203.4.16"
|
|
||||||
|
|
||||||
# providing extra functionality
|
# providing extra functionality
|
||||||
# TODO: dotfiles first, like `LC_ALL=C ls -A` which doesnt work with -X flag
|
# 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"
|
softlink "$d" "$r"
|
||||||
done
|
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 \
|
grep .bashrc .bash_profile >/dev/null 2>&1 \
|
||||||
|| echo -e '\n[[ -f ~/.bashrc ]] && . ~/.bashrc' >> .bash_profile
|
|| 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+6 set window-scale 2.25
|
||||||
alt+7 set window-scale 3.0
|
alt+7 set window-scale 3.0
|
||||||
alt+8 set window-scale 4.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
|
for p in "$@"; do
|
||||||
cd "$bd"
|
cd "$bd"
|
||||||
local download_fail=0
|
local download_fail=0
|
||||||
|
local targz="$p-aur.tar.gz"
|
||||||
if [ $o_download -eq 1 ]; then
|
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
|
fi
|
||||||
if [ $download_fail -eq 1 ]; then
|
if [ $download_fail -eq 1 ]; then
|
||||||
|
[ -e "$targz" ] && rm "$targz"
|
||||||
fail=1
|
fail=1
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -99,7 +104,7 @@ aur() {
|
||||||
done
|
done
|
||||||
|
|
||||||
cd "$bd"
|
cd "$bd"
|
||||||
if [ $o_install -eq 1 ]; then
|
if [ -n "$built" ] && [ $o_install -eq 1 ]; then
|
||||||
if [ $o_all_at_once -eq 1 ]; then
|
if [ $o_all_at_once -eq 1 ]; then
|
||||||
sudo pacman -U $built
|
sudo pacman -U $built
|
||||||
else
|
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
|
function! pathogen#surround(path) abort
|
||||||
let sep = pathogen#slash()
|
let sep = pathogen#slash()
|
||||||
let rtp = pathogen#split(&rtp)
|
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 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])')
|
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')
|
call filter(rtp, 'index(before + after, v:val) == -1')
|
||||||
|
|
Loading…
Add table
Reference in a new issue