mirror of
https://github.com/kastdeur/dotfiles.git
synced 2024-12-22 09:13:33 +01:00
BASH gpg-agent and password-storage, updated gitignore_global and script for x11 to vnc casting
This commit is contained in:
parent
ef2cbabe11
commit
0a85f3ba63
4 changed files with 115 additions and 37 deletions
15
bash/bash.d/gpg-agent
Normal file
15
bash/bash.d/gpg-agent
Normal file
|
@ -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
|
15
bash/bash.d/password-storage
Normal file
15
bash/bash.d/password-storage
Normal file
|
@ -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
|
||||||
|
|
47
bin/x11-vnc-cast
Executable file
47
bin/x11-vnc-cast
Executable file
|
@ -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
|
||||||
|
|
|
@ -1,45 +1,46 @@
|
||||||
# GPG
|
# GPG
|
||||||
secring.*
|
secring.*
|
||||||
|
|
||||||
# Linux
|
##### Linux
|
||||||
*~
|
*~
|
||||||
|
|
||||||
#temporary files which can be created if a process still has a handle open of a deleted file
|
#temporary files which can be created if a process still has a handle open of a deleted file
|
||||||
.fuse_hidden*
|
.fuse_hidden*
|
||||||
|
|
||||||
# KDE directory preferences
|
# KDE directory preferences
|
||||||
.directory
|
.directory
|
||||||
|
|
||||||
# Linux trash folder which might appear on any partition or disk
|
# Linux trash folder which might appear on any partition or disk
|
||||||
.Trash-*
|
.Trash-*
|
||||||
|
|
||||||
# .nfs files are created when an open file is removed but is still being accessed
|
# .nfs files are created when an open file is removed but is still being accessed
|
||||||
.nfs*
|
.nfs*
|
||||||
|
|
||||||
# VIM
|
##### VIM
|
||||||
# swap
|
# swap
|
||||||
[._]*.s[a-w][a-z]
|
[._]*.s[a-w][a-z]
|
||||||
[._]s[a-w][a-z]
|
[._]s[a-w][a-z]
|
||||||
# session
|
# session
|
||||||
Session.vim
|
Session.vim
|
||||||
# temporary
|
# temporary
|
||||||
.netrwhist
|
.netrwhist
|
||||||
# Windows
|
|
||||||
# Windows image file caches
|
|
||||||
Thumbs.db
|
|
||||||
ehthumbs.db
|
|
||||||
|
|
||||||
# Folder config file
|
##### Windows
|
||||||
Desktop.ini
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
# Folder config file
|
||||||
$RECYCLE.BIN/
|
Desktop.ini
|
||||||
|
|
||||||
# Windows Installer files
|
# Recycle Bin used on file shares
|
||||||
*.cab
|
$RECYCLE.BIN/
|
||||||
*.msi
|
|
||||||
*.msm
|
|
||||||
*.msp
|
|
||||||
|
|
||||||
# Windows shortcuts
|
# Windows Installer files
|
||||||
*.lnk
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
Loading…
Reference in a new issue