diff --git a/i3/config b/i3/config index 4cf7a5e..0a186b2 100644 --- a/i3/config +++ b/i3/config @@ -21,7 +21,7 @@ bindsym $mod+p exec rofi -font "Monospace 12" -show run bindsym $mod+shift+p exec "rofi-pass --last-used" # Misc shortcuts 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 bindsym $mod+v split h # 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+u focus parent bindsym $mod+shift+u focus child +bindsym --release $mod+n exec "~/.i3/run.sh paste" # Exit/restart i3 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'" @@ -175,7 +176,7 @@ exec --no-startup-id xmodmap ~/.xmodmap exec --no-startup-id ~/xmodmap.sh # Misc 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/parcellite exec --no-startup-id /usr/bin/numlockx diff --git a/i3/run.sh b/i3/run.sh index 71fdafd..f010b90 100755 --- a/i3/run.sh +++ b/i3/run.sh @@ -65,3 +65,6 @@ if [ "$1" = "screen-lock" ];then slock revert fi +if [ "$1" = "paste" ]; then + DISPLAY=:0.0 xdotool type --clearmodifiers --file <(xsel) +fi diff --git a/shells/zshrc b/shells/zshrc index 2a9ed49..b0882b6 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -73,15 +73,25 @@ dedir(){ =mv -n "$name"/{.,}*(N) . || return 2 =rmdir "$name" || return 3 } -smt(){ - sudo multitail "/var/log/$1" +mt(){ + 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(){ test -f "${1:r}" && rm "${1:r}" echo "Building..." >&2 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 perm='stat -c "%a %n"' alias afci='git x ./autoformat.sh;git add --all;git commit -m "Autoformatted"' diff --git a/zsh/borg.zsh b/zsh/borg.zsh index ad65660..1c65913 100644 --- a/zsh/borg.zsh +++ b/zsh/borg.zsh @@ -1,6 +1,7 @@ REPO="aw:backup/backup.borg" b-list() { if [[ -z "$1" ]]; then + column -t <(borg list "$REPO") borg list "$REPO" else borg list "$REPO"::"$1" @@ -21,3 +22,9 @@ b-create() { fi 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" +}