From 84e840950aa426b303dcec68994913d8d202b5e2 Mon Sep 17 00:00:00 2001 From: Ryan Chan Date: Mon, 11 Jul 2022 09:20:57 +0100 Subject: [PATCH] Update various dotfiles with latest configs --- bash/.bashrc | 2 -- bin/backup-host | 6 ++++-- bin/{connect-barrier => start-barrier} | 2 ++ bin/start-vncserver | 4 ++++ msmtp/config | 2 +- sxhkd/sxhkdrc | 11 +++-------- tmux/.tmux.conf | 1 + xinit/.xinitrc | 4 ---- 8 files changed, 15 insertions(+), 17 deletions(-) rename bin/{connect-barrier => start-barrier} (73%) create mode 100755 bin/start-vncserver diff --git a/bash/.bashrc b/bash/.bashrc index 7fba53d..c0b2a2f 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -13,8 +13,6 @@ PS1="[\u@\h:\w]\$ " # Set SSH_AUTH_SOCK so that SSH will use gpg-agent instead of ssh-agent. unset SSH_AGENT_PID if [[ -z "$SSH_AUTH_SOCK" ]]; then - # https://wiki.archlinux.org/title/GNOME/Keyring#xinitrc - eval "$(gnome-keyring-daemon --start --components=pkcs11,secrets)" export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" fi diff --git a/bin/backup-host b/bin/backup-host index 2d823f0..19ff533 100755 --- a/bin/backup-host +++ b/bin/backup-host @@ -22,14 +22,16 @@ export BORG_REPO="zh1117@zh1117.rsync.net:""$(hostname)" export BORG_PASSCOMMAND="cat ""$HOME""/.borg-passphrase" readonly paths=( - "/home/rycwo" + "/home/rycwo" ) readonly exclude_paths=( "/home/rycwo/.borg-passphrase" + "/home/rycwo/.cache" + "/home/rycwo/.mozilla" "/home/rycwo/.secret" "/home/rycwo/.vagrant.d" "/home/rycwo/.virtualbox" - "/home/rycwo/go") + "/home/rycwo/go") exclude_file="$(mktemp)" exit_() { diff --git a/bin/connect-barrier b/bin/start-barrier similarity index 73% rename from bin/connect-barrier rename to bin/start-barrier index 4709f55..bba80c9 100755 --- a/bin/connect-barrier +++ b/bin/start-barrier @@ -1,3 +1,5 @@ #!/usr/bin/env sh +# Stop the process with: +# killall barrierc barrierc --no-tray "$@" & setxkbmap -device "$(xinput list --id-only "Virtual core XTEST keyboard")" "gb" diff --git a/bin/start-vncserver b/bin/start-vncserver new file mode 100755 index 0000000..f113c0f --- /dev/null +++ b/bin/start-vncserver @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +exec /usr/bin/systemd-inhibit \ + --what="sleep:handle-lid-switch" --why="Keep VNC alive" \ + x0vncserver -rfbauth "$HOME""/.vnc/passwd" diff --git a/msmtp/config b/msmtp/config index 5102e61..1b258c3 100644 --- a/msmtp/config +++ b/msmtp/config @@ -8,7 +8,7 @@ account personal host posteo.de user rycwo@posteo.net from rycwo@posteo.net -passwordeval pass show email/rycwo@posteo.net +passwordeval pass show www/posteo.de/rycwo@posteo.net port 587 account default : personal diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 1914ee3..99959bf 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -10,18 +10,13 @@ super + shift + Return st -e tmux -2 attach-session super + r - firefox - -super + e - mailspring + dmenu_run -fn "Roboto Mono:style=Medium:antialias=true:autohint=true:pixelsize=13" \ + -nb "#dadada" -nf "#4e4e4e" -sb "#4e4e4e" -sf "#dadada" # Reload sxhkd configs. super + Escape pkill -USR1 -x sxhkd -super + alt + s - systemctl suspend - #------------------------------------------------------------------------------ # Audio. #------------------------------------------------------------------------------ @@ -120,7 +115,7 @@ super + {o,i} bspc wm -h on # Focus or send to the given desktop. -super + {_,shift + }{1-9,0} +super + {_,ctrl + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}' #------------------------------------------------------------------------------ diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 89dd695..b5063b4 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -29,6 +29,7 @@ bind-key -T copy-mode-vi y send-keys -X copy-pipe \ unbind-key p bind-key p run-shell "xclip -out | tmux load-buffer - && tmux paste-buffer" +bind-key P run-shell "xclip -sel clip -out | tmux load-buffer - && tmux paste-buffer" #------------------------------------------------------------------------------ # General configuration diff --git a/xinit/.xinitrc b/xinit/.xinitrc index c327db4..04a8aa7 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -5,8 +5,4 @@ if [[ -f "$HOME"/.fehbg ]]; then "$HOME"/.fehbg & fi -# Detect monitors for display. Helpful if we are already connected -# to a second monitor. -autorandr --change - exec bspwm -- 2.38.5