A whole bunch of improvements
This commit is contained in:
parent
2e840773c6
commit
ccf9c8e2c7
4
applications/wemux.sh
Normal file → Executable file
4
applications/wemux.sh
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
SUDO=""
|
||||
if command -v sudo 2>&1 /dev/null; then
|
||||
SUDO="$(where sudo)"
|
||||
if command -v sudo > /dev/null; then
|
||||
SUDO="$(command -v sudo)"
|
||||
fi
|
||||
echo "Installing wemux..."
|
||||
test -d /usr/local/share/wemux || $SUDO git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux && $SUDO git --git-dir=/usr/local/share/wemux pull
|
||||
|
@ -24,7 +24,7 @@ if [ "$1" = "wall" ];then
|
||||
#if [[ -d ~/.i3/wallOM ]];then feh --bg-scale "`shuf -n1 -e ~/.i3/wallOM/*`";else feh --bg-scale "`shuf -n1 -e ~/.i3/wall/*`";fi;
|
||||
#feh --bg-scale "$(shuf -n1 -e ~/.i3/wallOM/*)"
|
||||
#feh --bg-scale ~/.i3/image.png
|
||||
feh --bg-scale $(shuf -n1 <(realpath /home/stonewareslord/owncloud/wallpaper/$(hostname)))
|
||||
feh --bg-scale $(shuf -n1 <(realpath /home/stonewareslord/sync/wallpaper/$(hostname)))
|
||||
fi
|
||||
if [ "$1" = "swap" ];then
|
||||
python << EOF
|
||||
@ -47,13 +47,14 @@ if [ "$1" = "boot" ];then
|
||||
/usr/bin/urxvtd -q -f -o
|
||||
if [ "$(hostname)" = "MMLin" ]; then
|
||||
xrandr --output HDMI1 --primary
|
||||
xmodmap <(echo pointer = 3 2 1)
|
||||
elif [ "$(hostname)" = "G2" ]; then
|
||||
#TODO: Figure out what the display is called
|
||||
#xrandr --output HDMI1 --primary
|
||||
xmodmap <(echo pointer = 1 2 3)
|
||||
fi
|
||||
feh --bg-scale $(shuf -n1 <(realpath /home/stonewareslord/owncloud/wallpaper/$(hostname)))
|
||||
xinput --set-prop 'Logitech USB Optical Mouse' 'Device Accel Constant Deceleration' 3
|
||||
xmodmap <(echo pointer = 3 2 1)
|
||||
$(which ck-launch-session 2>/dev/null) $(which i3)
|
||||
fi
|
||||
if [ "$1" = "screen-lock" ];then
|
||||
|
@ -1,6 +1,7 @@
|
||||
!URxvt.boldFont: -misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
|
||||
!URxvt.font: -*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
!URxvt.boldFont: -*-*-*-*-*-*-*-*-*-*-*-*-*-*
|
||||
!URxvt.font: xft:Fixed:style=SemiCondensed:size=10
|
||||
|
||||
URxvt.urgentOnBell: true
|
||||
|
||||
|
@ -92,6 +92,7 @@ run(){
|
||||
echo "Building..." >&2
|
||||
gcc -Wall -std=c99 "${1:r}.c" -o "${1:r}" && (echo "Running..." >&2;./"${1:r}")
|
||||
}
|
||||
alias mtr='mtr -t'
|
||||
alias tg='telegram-cli -N -W'
|
||||
alias perm='stat -c "%a %n"'
|
||||
alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"'
|
||||
@ -158,7 +159,7 @@ if test -f /etc/gentoo-release; then
|
||||
}
|
||||
update(){
|
||||
# If this is a server computer
|
||||
if [ "$(hostname|cut -b1)" = "S" ] ; then
|
||||
if [ "$(hostname)" = "SGen" ] ; then
|
||||
echo "You're a server. Exiting"
|
||||
return
|
||||
fi
|
||||
@ -205,6 +206,12 @@ alias -g nifyd=" > /dev/null 2>&1 & disown"
|
||||
alias -g L="2>&1|less"
|
||||
alias -g G='|& ag'
|
||||
alias -g GA='|& ag --pager less'
|
||||
timer() {
|
||||
for i in {1.."$1"}; do
|
||||
sleep 1
|
||||
echo
|
||||
done | pv -Sptels "$1" >/dev/null
|
||||
}
|
||||
fixsh(){
|
||||
sed -i -e $1"d" ~/.ssh/known_hosts
|
||||
}
|
||||
|
12
zsh/borg.zsh
12
zsh/borg.zsh
@ -2,7 +2,6 @@ REPO="aw:backup/backup.borg"
|
||||
b-list() {
|
||||
if [[ -z "$1" ]]; then
|
||||
column -t <(borg list "$REPO")
|
||||
borg list "$REPO"
|
||||
else
|
||||
borg list "$REPO"::"$1"
|
||||
fi
|
||||
@ -13,14 +12,11 @@ b-delete() {
|
||||
fi
|
||||
}
|
||||
b-create() {
|
||||
local BOOT=""
|
||||
if (( $EUID != 0 )); then
|
||||
echo -n "You aren't root, press enter to continue..." >&2
|
||||
local SUDO=""
|
||||
if command -v sudo > /dev/null; then
|
||||
SUDO="$(command -v sudo)"
|
||||
fi
|
||||
if [[ ! "$(hostname)" = "SGen" ]]; then
|
||||
BOOT="/boot"
|
||||
fi
|
||||
borg create -vpsx --compression lzma,7 --exclude-from /home/stonewareslord/syncthing/me/backup/$(hostname)/nobackup aw:backup/backup.borg::$(hostname)-$(uuidgen) / "$BOOT"
|
||||
$SUDO /home/stonewareslord/syncthing/me/backup/$(hostname)/backup
|
||||
}
|
||||
b-rename() {
|
||||
borg rename -v "$REPO"::"$1" "$2"
|
||||
|
Loading…
Reference in New Issue
Block a user