Merge branch 'main' of git.0xbd.space:binaryDiv/dotfiles
This commit is contained in:
commit
121e839e0a
3
.bashrc
3
.bashrc
|
|
@ -14,6 +14,9 @@ export HISTSIZE=20000
|
|||
export HISTFILESIZE=20000
|
||||
export PROMPT_DIRTRIM=3
|
||||
|
||||
# Save and display timestamps for history
|
||||
HISTTIMEFORMAT="[%F %T] "
|
||||
|
||||
# Color output and default options
|
||||
export GREP_OPTS='--color=auto'
|
||||
export LS_OPTS='--color=auto -hFN --group-directories-first'
|
||||
|
|
|
|||
|
|
@ -36,16 +36,18 @@ yay() {
|
|||
command yay "$@"
|
||||
}
|
||||
|
||||
# Create and cd to tmp dir
|
||||
alias cdtmp='cd $(mktemp -d -p ~/tmp/)'
|
||||
# Create and cd to temporary directory ~/tmp/tmp.YYYYMMDD.XXXXXX or ~/tmp/tmp.$1.XXXXXX if an argument is given
|
||||
function cdtmp() {
|
||||
cd $(mktemp -d -p ~/tmp tmp.${1:-$(date +%Y%m%d)}.XXXXXX)
|
||||
}
|
||||
|
||||
# Make dir and cd to it (from Mara)
|
||||
# Make dir and cd into it (from Mara)
|
||||
function mkcd() {
|
||||
mkdir -p "$1"
|
||||
cd "$1"
|
||||
}
|
||||
|
||||
# cd to dir + ll (ls -la)
|
||||
# cd into dir + ll (ls -la)
|
||||
function cdll() {
|
||||
cd "$1"
|
||||
ls -la
|
||||
|
|
@ -68,6 +70,9 @@ function lscat() {
|
|||
done
|
||||
}
|
||||
|
||||
# Shortcut for lscat (either c for cat or c for "see")
|
||||
alias c='lscat'
|
||||
|
||||
function calc() {
|
||||
echo "$@" | bc
|
||||
}
|
||||
|
|
@ -102,3 +107,13 @@ function b64dec() {
|
|||
echo -n "$1" | base64 -d
|
||||
echo
|
||||
}
|
||||
|
||||
# Shortcuts for dig with less output
|
||||
alias digs='dig +short'
|
||||
alias digrr='dig +noall +answer'
|
||||
|
||||
# Readline macro Ctrl-Alt-L: Append "| less" to current command
|
||||
bind '"\e\C-l": "\C-e | less"'
|
||||
|
||||
# Readline macro Ctrl-Alt-B: Append ">/dev/null 2>&1 &" to current command
|
||||
bind '"\e\C-b": "\C-e >/dev/null 2>&1 &"'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
[core]
|
||||
eol = lf
|
||||
# Normalize line endings
|
||||
autocrlf = input
|
||||
|
||||
[advice]
|
||||
detachedHead = false
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
|
@ -36,6 +40,12 @@
|
|||
[credential]
|
||||
helper = /usr/lib/git-core/git-credential-libsecret
|
||||
|
||||
[filter "lfs"]
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
|
||||
[pretty]
|
||||
ls = tformat:%C(yellow)%h %Cgreen%ad %Creset%s %Cblue[%an]%C(auto)%d
|
||||
lsd = tformat:%>|(13)%C(yellow)%h %Cgreen%ad %Creset%s %Cblue[%an]%C(auto)%d
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
# Include system defaults
|
||||
$include /etc/inputrc
|
||||
|
||||
# Disable terminal bell
|
||||
set bell-style none
|
||||
|
||||
# Enable colors for completion listings
|
||||
set colored-completion-prefix on
|
||||
set colored-stats on
|
||||
|
||||
# Enable case-insensitive completion
|
||||
set completion-ignore-case on
|
||||
|
||||
# Show completion listing without double-Tab
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Don't keep changes to history lines
|
||||
set revert-all-at-newline on
|
||||
|
||||
# Keybinding Alt-W: Like Ctrl-w but allowing slashes as word boundaries
|
||||
"\ew": unix-filename-rubout
|
||||
|
||||
# Keybinding Alt-Tab: Cycle through completions
|
||||
"\e\C-i": menu-complete
|
||||
5
.profile
5
.profile
|
|
@ -2,8 +2,8 @@
|
|||
# ~/.profile -- Included by .bash_profile; includes ~/.profile.local
|
||||
#
|
||||
|
||||
# SSH key agent is started by systemd user
|
||||
#export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.sock"
|
||||
# SSH key agent
|
||||
[[ -e "$XDG_RUNTIME_DIR/gcr/ssh" ]] && export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
|
||||
# GPG key stuff
|
||||
export GPG_TTY=$(tty)
|
||||
|
|
@ -17,6 +17,7 @@ export BC_ENV_ARGS="-lq"
|
|||
[[ -f "$HOME/.bcrc" ]] && export BC_ENV_ARGS="$BC_ENV_ARGS $HOME/.bcrc"
|
||||
|
||||
# PATH
|
||||
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
|
||||
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"
|
||||
|
||||
# Wine: do not change filetype associations
|
||||
|
|
|
|||
19
.ssh/config
19
.ssh/config
|
|
@ -1,13 +1,10 @@
|
|||
# Include drop-in configurations
|
||||
Include ~/.ssh/config.d/*.conf
|
||||
|
||||
# Global configuration
|
||||
AddKeysToAgent yes
|
||||
|
||||
Host afra-door
|
||||
HostName 172.23.42.69
|
||||
ProxyJump afra.fe80.eu
|
||||
User pi
|
||||
|
||||
Host toriel-dropbear
|
||||
HostName 192.168.16.4
|
||||
User root
|
||||
RemoteCommand cryptroot-unlock
|
||||
RequestTTY yes
|
||||
|
||||
# Host defaults
|
||||
Host *
|
||||
IdentitiesOnly yes
|
||||
SendEnv LANG LC_*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
Host toriel
|
||||
ForwardAgent yes
|
||||
|
||||
Host toriel-dropbear
|
||||
HostName 192.168.16.4
|
||||
User root
|
||||
RemoteCommand cryptroot-unlock
|
||||
RequestTTY yes
|
||||
|
||||
Host tanuki-dropbear
|
||||
Hostname tanuki
|
||||
User root
|
||||
RemoteCommand cryptroot-unlock
|
||||
RequestTTY yes
|
||||
3
.vimrc
3
.vimrc
|
|
@ -139,6 +139,9 @@ inoremap <A-j> <C-o>j
|
|||
inoremap <A-k> <C-o>k
|
||||
inoremap <A-l> <C-o>l
|
||||
|
||||
" Unindent with Shift-Tab
|
||||
inoremap <S-Tab> <C-o><<
|
||||
|
||||
" Copy and to X clipboard (Ctrl-C in visual mode and Ctrl-V in insert mode)
|
||||
vmap <C-C> "+y
|
||||
imap <C-V> <C-\><C-O>"+P
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
xdpyinfo | grep -B 2 resolution
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NEW_VALUE="$1"
|
||||
|
||||
xrandr --dpi "$NEW_VALUE"
|
||||
echo "Xft.dpi: $NEW_VALUE" | xrdb -merge
|
||||
|
||||
# Restart i3
|
||||
i3-msg restart >/dev/null
|
||||
|
||||
Loading…
Reference in New Issue