lots of smaller updates

This commit is contained in:
Steffen Vogel 2021-08-26 10:35:41 +02:00
parent d976312155
commit 5b87003bf2
8 changed files with 110 additions and 51 deletions

View file

@ -20,14 +20,8 @@ alias k=kubectl
alias a=ansible
alias c=code
alias e=$EDITOR
# Completion for aliases
# See: https://github.com/cykerway/complete-alias
complete -F _complete_alias g
complete -F _complete_alias k
complete -F _complete_alias a
complete -F _complete_alias c
complete -F _complete_alias e
alias h=helm
alias d=docker
# Some shortcuts for me
function moby() {
@ -107,12 +101,24 @@ function restic() {
local RESTIC=$(which restic)
# Start original restic executable with short-lived keys
RESTIC_PASSWORD="$(pass restic/macbook)" \
AWS_ACCESS_KEY_ID=restic \
AWS_SECRET_ACCESS_KEY=$(pass s3/minio-restic | head -n1) \
RESTIC_PASSWORD="$(pass restic/macbook | head -n1)" \
$RESTIC $@
}
function oath() {
ykman oath accounts code -s $1 | wl-copy
}
alias acs-pass='PASSWORD_STORE_DIR=~/workspace/rwth/acs/lab/passwords pass'
alias chaos-family-invite='ssh -t ssb.vm.0l.de sudo /root/sbot invite.create 1 | jq -r . | pbcopy'
alias new-mac=$'openssl rand -hex 6 | sed \'s/\(..\)/\1:/g; s/.$//\' | xargs sudo ifconfig en0 ether'
if type xdg-open > /dev/null 2>&1; then
alias open=xdg-open
fi
alias chrome="chromium-browser --enable-features=UseOzonePlatform --ozone-platform=wayland"

View file

@ -1,9 +1,5 @@
if [ -r /etc/bash_completion ]; then
source /etc/bash_completion;
fi
if [ -d /usr/local/share/bash-completion/completions ]; then
source /usr/local/share/bash-completion/completions/*
if [ -f /usr/share/bash-completion/bash_completion ]; then
source /usr/share/bash-completion/bash_completion
fi
if type ykman > /dev/null 2>&1; then
@ -38,6 +34,14 @@ if type doctl > /dev/null 2>&1; then
source <(doctl completion bash)
fi
if type helm > /dev/null 2>&1; then
source <(helm completion bash)
fi
if type mc > /dev/null 2>&1; then
complete -C mc mc
fi
# Homebrew completions
if command -v brew > /dev/null; then
HOMEBREW_PREFIX=$(brew --prefix)
@ -51,16 +55,6 @@ if command -v brew > /dev/null; then
fi
fi
if type brew > /dev/null 2>&1; then
HOMEBREW_PREFIX=$(brew --prefix)
for COMPLETION in "$HOMEBREW_PREFIX"/etc/bash_completion.d/*; do
[[ -f $COMPLETION ]] && source "$COMPLETION"
done
if [[ -f ${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh ]]; then
source "${HOMEBREW_PREFIX}/etc/profile.d/bash_completion.sh"
fi
fi
# Docker completions
for COMPLETION in /Applications/Docker.app/Contents/Resources/etc/*.bash-completion; do
[ -f ${COMPLETION} ] && source ${COMPLETION}
@ -68,8 +62,5 @@ done
# Add completion to aliases
# See: https://github.com/cykerway/complete-alias
source ~/.homesick/repos/complete-alias/bash_completion.sh
if type mc > /dev/null 2>&1; then
complete -C mc mc
fi
source ~/.homesick/repos/complete-alias/complete_alias
complete -F _complete_alias "${!BASH_ALIASES[@]}"

View file

@ -6,7 +6,7 @@ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
fi
export GOPATH=~/build/go
export PATH=~/bin/scripts:~/bin:/usr/local/bin:${PATH}
export PATH=~/bin/scripts:~/bin:/usr/local/bin:~/.krew/bin:${PATH}
if [ -d /var/lib/snapd/snap/bin/code ]; then
export PATH="/var/lib/snapd/snap/bin/code:${PATH}"
@ -52,14 +52,13 @@ if [ -d /opt/man-pages ]; then
export MANPATH=/opt/man-pages:${MANPATH}
fi
if [ type code > /dev/null 2>&1 ]; then
if type code > /dev/null 2>&1; then
export EDITOR="code -w"
else
export EDITOR=vim
fi
#export RESTIC_REPOSITORY="sftp://172.23.157.2//srv/Data/Backup/Restic/Macbook"
export RESTIC_REPOSITORY="s3:http://172.23.157.2:9000/restic"
export RESTIC_REPOSITORY="s3:http://moon.0l.de:9002/cam"
export AWS_ACCESS_KEY_ID=stv0g
export AWS_SECRET_ACCESS_KEY=m1n10Password

View file

@ -12,7 +12,9 @@ if [ -r ~/.bash_git ]; then
fi
# iTerm shell integration
source ~/.homesick/repos/dotfiles/iterm2/iterm2_integration.sh
if [ "${TERM_PROGRAM}" = "iTerm.app" ]; then
source ~/.homesick/repos/dotfiles/iterm2/iterm2_integration.sh
fi
function show_prompt {
local EXIT="$?"

View file

@ -14,7 +14,7 @@ shopt -s histappend
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
HISTCONTROL=ignorespace:ignoredups:erasedups
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=99999999
@ -27,11 +27,6 @@ if [ -x /usr/bin/lesspipe ]; then eval "$(lesspipe)"; fi
source ~/.homesick/repos/homeshick/homeshick.sh
source ~/.homesick/repos/homeshick/completions/homeshick-completion.bash
source ~/.bash_env
source ~/.bash_prompt
source ~/.bash_completion
source ~/.bash_aliases
# enable color support of ls and also add handy aliases
if hash dircolors 2>/dev/null; then
if [ -r ~/.dircolors ]; then
@ -45,3 +40,11 @@ if hash dircolors 2>/dev/null; then
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
source ~/.bash_env
source ~/.bash_prompt
source ~/.bash_aliases
source ~/.bash_complete
# Run after .bash_prompt
PROMPT_COMMAND="${PROMPT_COMMAND}; history -a; history -c; history -r"

View file

@ -15,12 +15,13 @@ set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu dmenu_path | dmenu | xargs swaymsg exec --
for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 40 ppt
set $menu exec $term --class=launcher --command /bin/sh -c "compgen -c | sort -u | fzf --history ~/.launcher_history"
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg /usr/share/backgrounds/default.png fill
output * bg ~/.config/sway/bg.jpg fill
#
# Example configuration:
@ -33,8 +34,11 @@ output * bg /usr/share/backgrounds/default.png fill
#
# Example configuration:
#
bindswitch lid:toggle exec swaylock
bindsym $mod+p exec
exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \
timeout 300 'swaylock' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c 000000'
@ -42,6 +46,10 @@ exec swayidle -w \
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Tray
exec_always nm-applet --indicator
### Input configuration
#
# Example configuration:
@ -56,6 +64,10 @@ exec swayidle -w \
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input "76:613:Apple_Inc._Magic_Trackpad_2" {
natural_scroll enabled
}
### Key bindings
#
# Basics:
@ -67,7 +79,7 @@ exec swayidle -w \
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
bindsym $mod+Space exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
@ -156,7 +168,7 @@ exec swayidle -w \
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
bindsym $mod+t focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
@ -202,7 +214,9 @@ bindsym $mod+r mode "resize"
#
# Read `man 5 sway-bar` for more information about this section.
bar {
position bottom
swaybar_command waybar
position top
# When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time.
@ -215,4 +229,41 @@ bar {
}
}
## Styling
default_border pixel 1
hide_edge_borders smart
set $base00 #181818
set $base01 #282828
set $base02 #383838
set $base03 #585858
set $base04 #b8b8b8
set $base05 #d8d8d8
set $base06 #e8e8e8
set $base07 #f8f8f8
set $base08 #ab4642
set $base09 #dc9656
set $base0A #f7ca88
set $base0B #a1b56c
set $base0C #86c1b9
set $base0D #7cafc2
set $base0E #ba8baf
set $base0F #a16946
# Border BG Text Ind Child Border
client.focused $base05 $base0D $base00 $base0D $base0D
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused $base01 $base00 $base05 $base01 $base01
client.urgent $base08 $base08 $base00 $base08 $base08
include /etc/sway/config.d/*
# Take a screenshot with all output
bindsym Print exec grim -t png ~/screenshots/$(date +%Y-%m-%d_%H-%m-%s).png
# Take a screenshot with the region select
bindsym $mod+Print exec grim -t png -g "$(slurp)" ~/screenshots/$(date +%Y-%m-%d_%H-%m-%s).png
# Take a screenshot of a selected window
bindsym $mod+Home exec grim -t png -g $(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp) ~/screenshots/$(date +%Y-%m-%d_%H-%m-%s).png

View file

@ -1,4 +1,3 @@
write-env-file
enable-ssh-support
default-cache-ttl 30
max-cache-ttl 180

View file

@ -4,9 +4,6 @@ CanonicalDomains 0l.de rwth-aachen.de eonerc.rwth-aachen.de acs-lab.eonerc.rwth-
# PKCS11Provider /usr/lib/ssh-keychain.dylib
# Uni
Host *.rwth-aachen.de
ForwardAgent yes
User sv111090
# ACS
# Autocompletion
@ -17,6 +14,9 @@ Host stargate.acs-lab.eonerc.rwth-aachen.de
Host ernie.acs-lab.eonerc.rwth-aachen.de
Host buildbot.acs-lab.eonerc.rwth-aachen.de
Host ubuntu-svg-xilinx.acs-lab.eonerc.rwth-aachen.de
User xilinx
Host *.acs-lab.eonerc.rwth-aachen.de
User vogel
@ -99,6 +99,10 @@ Host villas-hub
HostName hub.villas.fein-aachen.org
ForwardAgent yes
Host *.rwth-aachen.de
ForwardAgent yes
User sv111090
#
# Private
#
@ -122,3 +126,7 @@ Host hex.0l.de
User root
VerifyHostKeyDNS yes
Host fry.acs-lab.eonerc.rwth-aachen.de
HostName fry.acs-lab.eonerc.rwth-aachen.de
User usr