diff --git a/bash/bash.d/gpg-agent b/bash/bash.d/gpg-agent new file mode 100644 index 0000000..c1ced74 --- /dev/null +++ b/bash/bash.d/gpg-agent @@ -0,0 +1,15 @@ +# .bash_files + +# Setup gpg agent info +# if not running, set one up + +GPG_AGENT_INFO="${HOME}/.gpg-agent-info" + +if [ -f "${GPG_AGENT_INFO}" ]; then + source "${GPG_AGENT_INFO}" + export GPG_AGENT_INFO + export SSH_AUTH_SOCK + export SSH_AGENT_PID +else + /usr/bin/gpg-agent --daemon --write-env-file "${GPG_AGENT_INFO}" +fi diff --git a/bash/bash.d/password-storage b/bash/bash.d/password-storage new file mode 100644 index 0000000..6c2f67b --- /dev/null +++ b/bash/bash.d/password-storage @@ -0,0 +1,15 @@ +# Enable password-storage and its bash completion + +PASSDIR="${DOTFILES}/password-storage" + +# Only do this when the submodule is loaded +if [ -d "${PASSDIR}/src" ]; then + source "${PASSDIR}/src/completion/pass.bash-completion" + + # If pass not registered as executable in your path + # Make an alias + if [[ $(command -v pass) ]]; then + alias pass="${PASSDIR}/src/password-store.sh" + fi +fi + diff --git a/bin/x11-vnc-cast b/bin/x11-vnc-cast new file mode 100755 index 0000000..e37911f --- /dev/null +++ b/bin/x11-vnc-cast @@ -0,0 +1,47 @@ +#!/bin/bash + +# Share a part of an unseen screen to a vncviewer at host +# +# On HOST, please use: +# startx -- /usr/bin/vncviewer -listen 5500 -ViewOnly -Shared + +OUTPUT="VGA-1" +HOST="192.168.6.5" +ORIENTATION=" --left-of LVDS-1" + +# Screen Properties +YEXT=1920 +YOFF="+0" +XEXT=1200 +XOFF="+600" +REFRESH=60.00 + + +# Generate a valid modeline +modeline=$(cvt $YEXT $XEXT $REFRESH | grep "Modeline") + +MODENAME=$(echo $modeline | sed -e "s#Modeline ##" | awk '{print $1}' | sed -e 's#"##g') +MODELINE=$(echo $modeline | cut -d ' ' -f3- ) + +################################################################## +# All of the Voodoo +################################################################## +# Add modeline +xrandr --newmode $MODENAME $MODELINE + +# Add modeline to unused output +xrandr --addmode $OUTPUT $MODENAME + +# set mode and orientation for output +xrandr --output $OUTPUT --mode $MODENAME $ORIENTATION + +# Start vncserver, push to host +x11vnc -cursor -clip ${MODENAME}${XOFF}${YOFF} -connect_or_exit $HOST + +# Disable output +xrandr --output $OUTPUT --auto +# remove from output +xrandr --delmode $OUTPUT $MODENAME +# remove from server +xrandr --rmmode $MODENAME + diff --git a/git/gitignore_global b/git/gitignore_global index e4a1f7e..4a6007f 100644 --- a/git/gitignore_global +++ b/git/gitignore_global @@ -1,45 +1,46 @@ # GPG secring.* -# Linux - *~ +##### Linux +*~ - #temporary files which can be created if a process still has a handle open of a deleted file - .fuse_hidden* +#temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* - # KDE directory preferences - .directory +# KDE directory preferences +.directory - # Linux trash folder which might appear on any partition or disk - .Trash-* +# Linux trash folder which might appear on any partition or disk +.Trash-* - # .nfs files are created when an open file is removed but is still being accessed - .nfs* +# .nfs files are created when an open file is removed but is still being accessed +.nfs* -# VIM - # swap - [._]*.s[a-w][a-z] - [._]s[a-w][a-z] - # session - Session.vim - # temporary - .netrwhist -# Windows - # Windows image file caches - Thumbs.db - ehthumbs.db - - # Folder config file - Desktop.ini - - # Recycle Bin used on file shares - $RECYCLE.BIN/ - - # Windows Installer files - *.cab - *.msi - *.msm - *.msp - - # Windows shortcuts - *.lnk +##### VIM +# swap +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +# session +Session.vim +# temporary +.netrwhist + +##### Windows +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk