Added better mt, more b- commands (and better ones), better screenshot tool

This commit is contained in:
Austen Adler 2016-09-02 00:27:36 -04:00
parent 9c4ecb203d
commit 2e840773c6
No known key found for this signature in database
GPG Key ID: 7ECEE590CCDFE3F1
4 changed files with 26 additions and 5 deletions

View File

@ -21,7 +21,7 @@ bindsym $mod+p exec rofi -font "Monospace 12" -show run
bindsym $mod+shift+p exec "rofi-pass --last-used" bindsym $mod+shift+p exec "rofi-pass --last-used"
# Misc shortcuts # Misc shortcuts
bindsym --release Num_Lock exec "xdotool key --clearmodifiers Shift+Insert;numlockx on" bindsym --release Num_Lock exec "xdotool key --clearmodifiers Shift+Insert;numlockx on"
bindsym Print exec "shutter -s" bindsym Print exec "xfce4-screenshooter -s ~/Pictures -r"
# Split in vertical orientation # Split in vertical orientation
bindsym $mod+v split h bindsym $mod+v split h
# Split in horizontal orientation # Split in horizontal orientation
@ -102,6 +102,7 @@ bindsym $mod+shift+grave exec "~/.i3/run.sh screen-lock"
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
bindsym $mod+u focus parent bindsym $mod+u focus parent
bindsym $mod+shift+u focus child bindsym $mod+shift+u focus child
bindsym --release $mod+n exec "~/.i3/run.sh paste"
# Exit/restart i3 # Exit/restart i3
bindsym $mod+q restart bindsym $mod+q restart
bindsym $mod+shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" bindsym $mod+shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
@ -175,7 +176,7 @@ exec --no-startup-id xmodmap ~/.xmodmap
exec --no-startup-id ~/xmodmap.sh exec --no-startup-id ~/xmodmap.sh
# Misc # Misc
exec --no-startup-id i3-msg 'workspace 1; exec /usr/bin/urxvtc' exec --no-startup-id i3-msg 'workspace 1; exec /usr/bin/urxvtc'
exec --no-startup-id /usr/bin/shutter --min_at_startup #exec --no-startup-id /usr/bin/shutter --min_at_startup
exec --no-startup-id /usr/bin/redshift -l 36.3:-80.3 -t 4000:2000 exec --no-startup-id /usr/bin/redshift -l 36.3:-80.3 -t 4000:2000
exec --no-startup-id /usr/bin/parcellite exec --no-startup-id /usr/bin/parcellite
exec --no-startup-id /usr/bin/numlockx exec --no-startup-id /usr/bin/numlockx

View File

@ -65,3 +65,6 @@ if [ "$1" = "screen-lock" ];then
slock slock
revert revert
fi fi
if [ "$1" = "paste" ]; then
DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel)
fi

View File

@ -73,15 +73,25 @@ dedir(){
=mv -n "$name"/{.,}*(N) . || return 2 =mv -n "$name"/{.,}*(N) . || return 2
=rmdir "$name" || return 3 =rmdir "$name" || return 3
} }
smt(){ mt(){
sudo multitail "/var/log/$1" if [[ -z "$1" ]]; then
echo "Opts:\nm xe gogs dm syncthing" >&2
return 1
fi
case $1 in
m) sudo multitail /var/log/messages;;
xe) multitail ~/.xsession-errors;;
gogs) sudo multitail /var/log/gogs.{err,log};;
dm) dmesg -w;;
syncthing) sudo multitail /var/log/syncthing.{err,log};;
*) multitail "$1"
esac
} }
run(){ run(){
test -f "${1:r}" && rm "${1:r}" test -f "${1:r}" && rm "${1:r}"
echo "Building..." >&2 echo "Building..." >&2
gcc -Wall -std=c99 "${1:r}.c" -o "${1:r}" && (echo "Running..." >&2;./"${1:r}") gcc -Wall -std=c99 "${1:r}.c" -o "${1:r}" && (echo "Running..." >&2;./"${1:r}")
} }
alias mt='multitail'
alias tg='telegram-cli -N -W' alias tg='telegram-cli -N -W'
alias perm='stat -c "%a %n"' alias perm='stat -c "%a %n"'
alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"' alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"'

View File

@ -1,6 +1,7 @@
REPO="aw:backup/backup.borg" REPO="aw:backup/backup.borg"
b-list() { b-list() {
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
column -t <(borg list "$REPO")
borg list "$REPO" borg list "$REPO"
else else
borg list "$REPO"::"$1" borg list "$REPO"::"$1"
@ -21,3 +22,9 @@ b-create() {
fi fi
borg create -vpsx --compression lzma,7 --exclude-from /home/stonewareslord/syncthing/me/backup/$(hostname)/nobackup aw:backup/backup.borg::$(hostname)-$(uuidgen) / "$BOOT" borg create -vpsx --compression lzma,7 --exclude-from /home/stonewareslord/syncthing/me/backup/$(hostname)/nobackup aw:backup/backup.borg::$(hostname)-$(uuidgen) / "$BOOT"
} }
b-rename() {
borg rename -v "$REPO"::"$1" "$2"
}
b-cmd() {
echo "$REPO"
}