From 873bfc08bee07c067542f11a09128e27c4de85bf Mon Sep 17 00:00:00 2001 From: janolehuebner Date: Sat, 5 Apr 2025 02:52:47 +0200 Subject: [PATCH] Backed up pre-existing configs to local branch --- .bash_functions/bool_eval.sh | 28 --- .bash_profile | 29 --- .bashrc | 51 ----- .bashrc.d/aws-azure-login.sh | 15 -- .bashrc.d/brew_caveats.sh | 17 -- .bashrc.d/diff.sh | 1 - .bashrc.d/dotfiles_command.sh | 39 ---- .bashrc.d/dotfiles_install.sh | 64 ------ .bashrc.d/fuck.sh | 12 -- .bashrc.d/ls.sh | 12 -- .bashrc.d/neovim.sh | 6 - .bashrc.d/open.sh | 6 - .config/git/config | 28 --- .config/i3/config | 190 ------------------ .config/npm/npmrc | 1 - .config/nvim/init.vim | 9 +- .dotfiles/bash_functions/autosource.sh | 30 --- .dotfiles/bash_functions/dot_utility.sh | 3 - .dotfiles/dotgit_config | 2 - .environment.d/.gitinclude | 0 .environment.d/aws.env | 5 - .environment.d/aws_secrets.env.skel | 2 - .environment.d/dotfiles.env | 4 - .environment.d/firefox.env | 7 - .environment.d/git_secrets.env.skel | 5 - .environment.d/history.env | 2 - .environment.d/neovim.env | 6 - .environment.d/npm.env | 1 - .environment.d/ssh_agent.env | 4 - .environment.d/wsl.env | 6 - .github/README.md | 47 ----- .local/bin/aws-config-gen | 103 ---------- .local/bin/aws-config-refresh | 15 -- .local/share/bash-completion/completions/aws | 1 - .../bash-completion/completions/aws-auth | 10 - .screenlayout/januar.sh | 4 - .ssh/config | 12 +- .ssh/config.d/github | 4 - .xprofile | 15 -- 39 files changed, 15 insertions(+), 781 deletions(-) delete mode 100644 .bash_functions/bool_eval.sh delete mode 100644 .bash_profile delete mode 100644 .bashrc delete mode 100644 .bashrc.d/aws-azure-login.sh delete mode 100644 .bashrc.d/brew_caveats.sh delete mode 100644 .bashrc.d/diff.sh delete mode 100644 .bashrc.d/dotfiles_command.sh delete mode 100644 .bashrc.d/dotfiles_install.sh delete mode 100644 .bashrc.d/fuck.sh delete mode 100644 .bashrc.d/ls.sh delete mode 100644 .bashrc.d/neovim.sh delete mode 100644 .bashrc.d/open.sh delete mode 100644 .config/git/config delete mode 100644 .config/i3/config delete mode 100644 .config/npm/npmrc mode change 100644 => 100755 .config/nvim/init.vim delete mode 100644 .dotfiles/bash_functions/autosource.sh delete mode 100644 .dotfiles/bash_functions/dot_utility.sh delete mode 100644 .dotfiles/dotgit_config delete mode 100644 .environment.d/.gitinclude delete mode 100644 .environment.d/aws.env delete mode 100644 .environment.d/aws_secrets.env.skel delete mode 100644 .environment.d/dotfiles.env delete mode 100644 .environment.d/firefox.env delete mode 100644 .environment.d/git_secrets.env.skel delete mode 100644 .environment.d/history.env delete mode 100644 .environment.d/neovim.env delete mode 100644 .environment.d/npm.env delete mode 100644 .environment.d/ssh_agent.env delete mode 100644 .environment.d/wsl.env delete mode 100644 .github/README.md delete mode 100755 .local/bin/aws-config-gen delete mode 100755 .local/bin/aws-config-refresh delete mode 100644 .local/share/bash-completion/completions/aws delete mode 100755 .local/share/bash-completion/completions/aws-auth delete mode 100755 .screenlayout/januar.sh delete mode 100644 .ssh/config.d/github delete mode 100644 .xprofile diff --git a/.bash_functions/bool_eval.sh b/.bash_functions/bool_eval.sh deleted file mode 100644 index 411bf8e..0000000 --- a/.bash_functions/bool_eval.sh +++ /dev/null @@ -1,28 +0,0 @@ -# Basic safe boolean evaluation. See this Gist for details: -# https://gist.github.com/gliech/184dc7566821442202f21dfe15e2b7ff -function truthy { - if [[ "${1,,}" == @(y|yes|on|true|1) ]]; then - return 0 - fi - return 1 -} - -function falsy { - if [[ "${1,,}" == @(n|no|off|false|0) ]]; then - return 0 - fi - return 1 -} - -function true_false_default { - case "${1,,}" in - y | yes | on | true | 1) - return 0 ;; - n | no | off | false | 0) - return 1 ;; - esac - shift - eval "$@" - return 1 -} - diff --git a/.bash_profile b/.bash_profile deleted file mode 100644 index 39d5eff..0000000 --- a/.bash_profile +++ /dev/null @@ -1,29 +0,0 @@ -# .bash_profile - -# User specific environment and startup programs -PATH=$PATH:$HOME/.local/bin:$HOME/bin -export PATH - -# Export environment variables found in ~/.environment.d/ . Adding files in a -# directory makes it easier to supply environment variables that are either -# specific to a machine or can not be included in the dotfiles repository for -# security or privacy reasons. -set -a -for file in ~/.environment.d/*.env; do - . "$file" -done -set +a - -unset -v file - -# Source the .bashrc if the file descriptor for stdin is opened. This is a very -# simple test to determine if the .bash_profile was sourced from VT or SSH-login -# where the .bashrc has to be sourced to provide a similar environment to a -# terminal emulator. Found here: -# https://eklitzke.org/effectively-using-bash-profile -# I had to move the actual test '-t 0' over to the bashrc. More information as -# to why can be found there. -if [[ -r ~/.bashrc ]]; then - . ~/.bashrc -fi - diff --git a/.bashrc b/.bashrc deleted file mode 100644 index 3340b9c..0000000 --- a/.bashrc +++ /dev/null @@ -1,51 +0,0 @@ -# .bashrc -# Don't load the bashrc if the terminal is not interactive. More information -# on how this test works can be found at the end of the bash_profile. I had to -# move this test here, because in remote shells the bashrc is sourced directly, -# wether the shell is really interactive or not. A brief explanation of this -# behaviour can be found here: -# https://unix.stackexchange.com/questions/257571 -if ! [[ -t 0 ]]; then - return 0 -fi - -# Source global definitions -if [[ -r /etc/bashrc ]]; then - . /etc/bashrc -fi - -# Bash 4 or bust -if (( BASH_VERSINFO[0] < 4 )); then - echo "Please get a newer version of Bash." >&2 - echo "Your bashrc won't work otherwise." >&2 - return 1 -fi - -# Determine if the rest of the configuration should be loaded. DOTFILES_ACTIVE -# is a environment variable that can be set in ~/.environment.d/dotfiles.env -if [[ "${DOTFILES_ACTIVE,,}" == @(y|yes|on|true|1) ]]; then - - # Load a function that allows us to import other function definitions from - # the BASH_FUNC_PATH without providing their exact location and export it - . "$DOTFILES_DIR/bash_functions/autosource.sh" - export -f autosource - - # Load utilty functions that may be used by other configurations - autosource bool_eval - autosource dot_utility - - # Load the rest of the bash configs in ~/.basrc.d - for file in ~/.bashrc.d/*.sh; do - . "$file" - done - - unset -v file - -# If the DOTFILES_ACTIVE is not set at all, assume that the dotfiles repo was -# cloned very recently and print a friendly reminder. -elif [[ ! -v DOTFILES_ACTIVE ]]; then - echo "Dotfiles environment not found." >&2 - echo "You should probably reload your login session before proceeding." >&2 - return 1 -fi - diff --git a/.bashrc.d/aws-azure-login.sh b/.bashrc.d/aws-azure-login.sh deleted file mode 100644 index 59df007..0000000 --- a/.bashrc.d/aws-azure-login.sh +++ /dev/null @@ -1,15 +0,0 @@ -# If aws-azure-login is not installed do nothing -if ! command -v aws-azure-login >/dev/null 2>&1; then - return -fi - -# In WSL the no-sandbox parameter is mandatory for aws-azure-login to function -# correctly -if truthy $DOTFILES_WSL; then - alias aws-azure-login="aws-azure-login --no-sandbox" -fi - -# Make it so I just have to type a command and the (optionally) a profile -function aws-auth { - aws-azure-login --no-prompt ${1:+--profile $1} -} diff --git a/.bashrc.d/brew_caveats.sh b/.bashrc.d/brew_caveats.sh deleted file mode 100644 index 1c890a6..0000000 --- a/.bashrc.d/brew_caveats.sh +++ /dev/null @@ -1,17 +0,0 @@ -# Save other operating systems some work -if [[ $OSTYPE != darwin* ]] || ! command -v brew >/dev/null 2>&1; then - return -fi - -BREW_DIR=$(brew --prefix) - -# for brew formula bash-completion@2 -if [[ -r ${BREW_DIR}/etc/profile.d/bash_completion.sh ]]; then - export BASH_COMPLETION_COMPAT_DIR=${BREW_DIR}/etc/bash_completion.d - . ${BREW_DIR}/etc/profile.d/bash_completion.sh -fi - -# for brew formula python -if [[ -d ${BREW_DIR}/opt/python/libexec/bin ]]; then - export PATH=${BREW_DIR}/opt/python/libexec/bin:$PATH -fi diff --git a/.bashrc.d/diff.sh b/.bashrc.d/diff.sh deleted file mode 100644 index 1f5f61f..0000000 --- a/.bashrc.d/diff.sh +++ /dev/null @@ -1 +0,0 @@ -alias diff="diff --color=auto --unified" diff --git a/.bashrc.d/dotfiles_command.sh b/.bashrc.d/dotfiles_command.sh deleted file mode 100644 index b4f3c69..0000000 --- a/.bashrc.d/dotfiles_command.sh +++ /dev/null @@ -1,39 +0,0 @@ -# Alias dotfiles to the custom git command required for the functioning of the -# dotfiles utility -alias dotfiles="git \ - -c include.path=$DOTFILES_DIR/dotgit_config \ - --git-dir=$DOTFILES_GITDIR \ - --work-tree=$HOME" - -# Shorten the dotfiles command to dot if possible -if ! command -v dot >/dev/null 2>&1 -then - alias dot="dotfiles" - dot_aliased="yes" -fi - -# Add bash completion to the aliases if possible -possible_locations=( - "/usr/share/doc/git/contrib/completion/git-completion.bash" - "/usr/share/git/completion/git-completion.bash" - "/usr/share/bash-completion/completions/git" - "/usr/local/etc/bash_completion.d/git-completion.bash" - "/opt/homebrew/etc/bash_completion.d/git-completion.bash" -) - -for completion_file in "${possible_locations[@]}" -do - if [[ -r "$completion_file" ]] - then - . $completion_file - __git_complete dotfiles __git_main - if [[ $dot_aliased == yes ]] - then - __git_complete dot __git_main - fi - break - fi -done - -unset -v dot_aliased possible_locations completion_file - diff --git a/.bashrc.d/dotfiles_install.sh b/.bashrc.d/dotfiles_install.sh deleted file mode 100644 index 9258d2b..0000000 --- a/.bashrc.d/dotfiles_install.sh +++ /dev/null @@ -1,64 +0,0 @@ -# This is the first-run installation of the dotfiles utility. Although I have -# been trying to avoid the need of executing additional code to put my config -# files into place, that is not always possible or practical. The following -# script is my attempt to make this as painless as possible. - -# Get the checksum of this very file. -read -r checksum _ <<< $(sha256sum "${BASH_SOURCE[0]}") - -# Compare the computed checksum to a cached version from the environment. This -# is done instead of a boolean token, so that the installation will run again -# automatically, should this file change after an update. -if [[ $checksum != $DOTFILES_INSTALL_CHECKSUM ]]; then - - # If the checksum differed, source the file that contains the cached checksum - # and compare again to make sure that an update has not occured and already - # been processed since the environment has last been sourced at the beginning - # of the login session. Testing twice is a trade-off because most of the time - # the first test will fail and no file has to be sourced. - if [[ -r ~/.environment.d/dotfiles_install.env ]]; then - . ~/.environment.d/dotfiles_install.env - fi - if [[ $checksum != $DOTFILES_INSTALL_CHECKSUM ]]; then - # Installation starts here. Sections should still be designed in a way that - # they won't run twice if possible. - ############################################################################ - echo "Dotfiles: Starting automatic installation routines" - dotfiles_install_error="no" - - - # vim-plug - if ! [[ -f ~/.local/share/nvim/site/autoload/plug.vim ]]; then - echo "Dotfiles: Downloading vim-plug..." - if curl \ - --fail \ - --location \ - --retry 5 \ - --retry-delay 1 \ - --create-dirs \ - --progress-bar \ - --output ~/.local/share/nvim/site/autoload/plug.vim \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - then - echo "Dotfiles: Done" - else - echo "Dotfiles: Error downloading vim-plug" - dotfiles_install_error="yes" - fi - fi - - - ############################################################################ - # Installation ends here. If we have come this far the installation should - # have been successful. Write the current checksum of this file to - # dotfiles_install.env and export the variable for good measure. - if [[ $dotfiles_install_error == "no" ]]; then - echo "Dotfiles: Automatic installation successful. Setting new checksum..." - echo "DOTFILES_INSTALL_CHECKSUM=$checksum" > ~/.environment.d/dotfiles_install.env - export DOTFILES_INSTALL_CHECKSUM=$checksum - else - echo "Dotfiles: Errors were encountered during automatic installation" - echo "Dotfiles: Installation can be re-run by opening a new shell" - fi - fi -fi diff --git a/.bashrc.d/fuck.sh b/.bashrc.d/fuck.sh deleted file mode 100644 index 14082a0..0000000 --- a/.bashrc.d/fuck.sh +++ /dev/null @@ -1,12 +0,0 @@ -# https://twitter.com/liamosaur/status/506975850596536320 -function fuck { - local nth_last=${1:-1} - if [[ "$nth_last" =~ ^[0-9]+$ ]]; then - sudo $(fc -ln -$nth_last -$nth_last) - else - echo "Usage: fuck [offset]" - return 1 - fi -} - -alias please='fuck' diff --git a/.bashrc.d/ls.sh b/.bashrc.d/ls.sh deleted file mode 100644 index 6be4aa0..0000000 --- a/.bashrc.d/ls.sh +++ /dev/null @@ -1,12 +0,0 @@ -# On BSD-based operating systems the GNU coreutils version of ls may be -# installed as gls. I prefer a consistent ls to one that actually integrates -# well with MacOS, so here we are. -if command -v gls >/dev/null 2>&1; then - alias ls="gls --color=auto" -else - alias ls="ls --color=auto" -fi - -alias ll="ls --human-readable --color=auto -l" -alias la="ls --human-readable --all --color=auto -l" -alias lA="ls --human-readable --almost-all --color=auto -l" diff --git a/.bashrc.d/neovim.sh b/.bashrc.d/neovim.sh deleted file mode 100644 index 0b1838b..0000000 --- a/.bashrc.d/neovim.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Use neovim instead of vim if it is present - -if command -v nvim >/dev/null 2>&1; then - alias vim="nvim" -fi - diff --git a/.bashrc.d/open.sh b/.bashrc.d/open.sh deleted file mode 100644 index 0b939f5..0000000 --- a/.bashrc.d/open.sh +++ /dev/null @@ -1,6 +0,0 @@ -if ! command -v open >/dev/null 2>&1 -then - function open { - gio open ${@:-.} - } -fi diff --git a/.config/git/config b/.config/git/config deleted file mode 100644 index 256bed3..0000000 --- a/.config/git/config +++ /dev/null @@ -1,28 +0,0 @@ -[color] - diff = auto - status = auto - branch = auto - interactive = auto - ui = true - pager = true - submodule = true - fetch = true - pull = true -[push] - default = simple -[pull] - ff = only -[core] - excludesfile = ~/.gitignore - autocrlf = input -[status] - submoduleSummary = true -[pager] - log = less --chop-long-lines --shift 3 -[alias] - graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all - chronograph = graph --date-order - ff = merge --ff-only - amend = commit --amend --reuse-message=HEAD -[init] - defaultBranch = main diff --git a/.config/i3/config b/.config/i3/config deleted file mode 100644 index 10ed9cb..0000000 --- a/.config/i3/config +++ /dev/null @@ -1,190 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 8 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Start XDG autostart .desktop files using dex. See also -# https://wiki.archlinux.org/index.php/XDG_Autostart -exec --no-startup-id dex --autostart --environment i3 - -# The combination of xss-lock, nm-applet and pactl is a popular choice, so -# they are included here as an example. Modify as you see fit. - -# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the -# screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork - -# NetworkManager is the most popular way to manage wireless networks on Linux, -# and nm-applet is a desktop environment-independent system tray GUI for it. -exec --no-startup-id nm-applet - -# Use pactl to adjust volume in PulseAudio. -set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status -bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -bindsym $mod+Return exec i3-sensible-terminal - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -bindsym $mod+space exec --no-startup-id dmenu_run -# A more modern dmenu replacement is rofi: -# bindcode $mod+40 exec "rofi -modi drun,run -show drun" -# There also is i3-dmenu-desktop which only displays applications shipping a -# .desktop file. It is a wrapper around dmenu, so you need that installed. -# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+h split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+d floating toggle - -# change focus between tiling / floating windows -bindsym $mod+d focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" -set $ws10 "10" - -# switch to workspace -bindsym $mod+1 workspace number $ws1 -bindsym $mod+2 workspace number $ws2 -bindsym $mod+3 workspace number $ws3 -bindsym $mod+4 workspace number $ws4 -bindsym $mod+5 workspace number $ws5 -bindsym $mod+6 workspace number $ws6 -bindsym $mod+7 workspace number $ws7 -bindsym $mod+8 workspace number $ws8 -bindsym $mod+9 workspace number $ws9 -bindsym $mod+0 workspace number $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace number $ws1 -bindsym $mod+Shift+2 move container to workspace number $ws2 -bindsym $mod+Shift+3 move container to workspace number $ws3 -bindsym $mod+Shift+4 move container to workspace number $ws4 -bindsym $mod+Shift+5 move container to workspace number $ws5 -bindsym $mod+Shift+6 move container to workspace number $ws6 -bindsym $mod+Shift+7 move container to workspace number $ws7 -bindsym $mod+Shift+8 move container to workspace number $ws8 -bindsym $mod+Shift+9 move container to workspace number $ws9 -bindsym $mod+Shift+0 move container to workspace number $ws10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -for_window [class="steam_app_40800" instance="steam_app_40800"] floating enable - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - position top - status_command i3status - tray_output primary -} diff --git a/.config/npm/npmrc b/.config/npm/npmrc deleted file mode 100644 index a268646..0000000 --- a/.config/npm/npmrc +++ /dev/null @@ -1 +0,0 @@ -prefix=${HOME}/.local diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim old mode 100644 new mode 100755 index 7b8a323..a6c79bd --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,18 +1,23 @@ call plug#begin() -" Display if updates for plugins are available + Plug 'semanser/vim-outdated-plugins' + " Show trailing whitespaces (this could also easily be achieved by settings, " but the plugin is very neat) Plug 'ntpeters/vim-better-whitespace' Plug 'vim-airline/vim-airline' Plug 'w0rp/ale' -Plug 'sirtaj/vim-openscad' Plug 'AndrewRadev/bufferize.vim' Plug 'airblade/vim-gitgutter' Plug 'hashivim/vim-terraform' Plug 'tpope/vim-fugitive' Plug 'tpope/vim-rhubarb' +Plug 'neoclide/coc.nvim', {'branch': 'release'} + + +"Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} call plug#end() +"lua require'nvim-treesitter.configs'.setup{highlight={enable=true}} " Explicitely set legacy colorscheme to overwrite the new neovim default " colorscheme until I find the time to configure colors properly diff --git a/.dotfiles/bash_functions/autosource.sh b/.dotfiles/bash_functions/autosource.sh deleted file mode 100644 index 1851338..0000000 --- a/.dotfiles/bash_functions/autosource.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -function autosource { - local bash_function_dirs bash_function_dir - - # Test if 1 argument was given - if (( $# == 0 )); then - echo "autosource: basename of a file in BASH_FUNC_PATH required" - echo "autosource: usage: autosource basename [arguments]" - return 1 - fi - - # Split the BASH_FUNC_PATH into an array of directory names - IFS=: read -ra bash_function_dirs <<< "${BASH_FUNC_PATH}" - - # Look for a .sh file with the basename given as first argument in each direc- - # tory in each directory in turn - for bash_function_dir in "${bash_function_dirs[@]}"; do - if [[ -r "${bash_function_dir}/${1}.sh" ]]; then - - # If we find a matching file, source it and skip the rest of this function - . "${bash_function_dir}/${1}.sh" ${@:2} - return - fi - done - - # If the loop completes no matching file is in BASH_FUNC_PATH - echo "autosource: no ${1} in (${BASH_FUNC_PATH})" - return 1 -} diff --git a/.dotfiles/bash_functions/dot_utility.sh b/.dotfiles/bash_functions/dot_utility.sh deleted file mode 100644 index c121a0f..0000000 --- a/.dotfiles/bash_functions/dot_utility.sh +++ /dev/null @@ -1,3 +0,0 @@ -function dot_msg { - echo "$@" -} diff --git a/.dotfiles/dotgit_config b/.dotfiles/dotgit_config deleted file mode 100644 index 5b270a7..0000000 --- a/.dotfiles/dotgit_config +++ /dev/null @@ -1,2 +0,0 @@ -[status] - showUntrackedFiles = no diff --git a/.environment.d/.gitinclude b/.environment.d/.gitinclude deleted file mode 100644 index e69de29..0000000 diff --git a/.environment.d/aws.env b/.environment.d/aws.env deleted file mode 100644 index 1d6f6ec..0000000 --- a/.environment.d/aws.env +++ /dev/null @@ -1,5 +0,0 @@ -AWS_DEFAULT_REGION=eu-central-1 -AWS_DEFAULT_OUTPUT=yaml - -AZURE_APP_ID_URI=https://signin.aws.amazon.com/saml -AZURE_DEFAULT_DURATION_HOURS=12 diff --git a/.environment.d/aws_secrets.env.skel b/.environment.d/aws_secrets.env.skel deleted file mode 100644 index c78635f..0000000 --- a/.environment.d/aws_secrets.env.skel +++ /dev/null @@ -1,2 +0,0 @@ -AZURE_TENANT_ID= -AZURE_DEFAULT_USERNAME= diff --git a/.environment.d/dotfiles.env b/.environment.d/dotfiles.env deleted file mode 100644 index 9d16607..0000000 --- a/.environment.d/dotfiles.env +++ /dev/null @@ -1,4 +0,0 @@ -DOTFILES_ACTIVE=true -DOTFILES_DIR="${HOME}/.dotfiles" -DOTFILES_GITDIR="${HOME}/.dotgit" -BASH_FUNC_PATH="${HOME}/.bash_functions:${DOTFILES_DIR}/bash_functions" diff --git a/.environment.d/firefox.env b/.environment.d/firefox.env deleted file mode 100644 index 35a1eea..0000000 --- a/.environment.d/firefox.env +++ /dev/null @@ -1,7 +0,0 @@ -# Fixes scrolling bug for G502 mice, where the first scroll step after a -# direction change is not registered sometimes. Also enables gestures and -# pixel-perfect trackpad scrolling apperantly: -# https://wiki.archlinux.org/title/Firefox#Touchscreen_gestures_and_pixel-perfect_trackpad_scrolling -if [ "$XDG_SESSION_TYPE" == "x11" ]; then - MOZ_USE_XINPUT2=1 -fi diff --git a/.environment.d/git_secrets.env.skel b/.environment.d/git_secrets.env.skel deleted file mode 100644 index aecd8ce..0000000 --- a/.environment.d/git_secrets.env.skel +++ /dev/null @@ -1,5 +0,0 @@ -GIT_AUTHOR_NAME="" -GIT_AUTHOR_EMAIL="" -GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME -GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL - diff --git a/.environment.d/history.env b/.environment.d/history.env deleted file mode 100644 index 1d624a1..0000000 --- a/.environment.d/history.env +++ /dev/null @@ -1,2 +0,0 @@ -HISTSIZE=-1 -HISTFILESIZE=-1 diff --git a/.environment.d/neovim.env b/.environment.d/neovim.env deleted file mode 100644 index 28e768a..0000000 --- a/.environment.d/neovim.env +++ /dev/null @@ -1,6 +0,0 @@ -# Set neovim as default editor if it is installed - -if command -v nvim >/dev/null 2>&1; then - EDITOR=nvim -fi - diff --git a/.environment.d/npm.env b/.environment.d/npm.env deleted file mode 100644 index 67615cb..0000000 --- a/.environment.d/npm.env +++ /dev/null @@ -1 +0,0 @@ -NPM_CONFIG_USERCONFIG=$HOME/.config/npm/npmrc diff --git a/.environment.d/ssh_agent.env b/.environment.d/ssh_agent.env deleted file mode 100644 index bfd9fbf..0000000 --- a/.environment.d/ssh_agent.env +++ /dev/null @@ -1,4 +0,0 @@ -if [[ -e ${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user/default.target.wants/ssh-agent.service ]] -then - SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket -fi diff --git a/.environment.d/wsl.env b/.environment.d/wsl.env deleted file mode 100644 index 73d2a29..0000000 --- a/.environment.d/wsl.env +++ /dev/null @@ -1,6 +0,0 @@ -if [[ $OSTYPE == linux-gnu && $(< /proc/sys/kernel/osrelease) == *Microsoft ]] -then - DOTFILES_WSL=true -else - DOTFILES_WSL=false -fi diff --git a/.github/README.md b/.github/README.md deleted file mode 100644 index 0e39b2d..0000000 --- a/.github/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Gliech Dotfiles - -## Replication -```bash -git clone -n --config core.bare=true --separate-git-dir=$HOME/.dotgit git@github.com:gliech/dotfiles.git $(mktemp -d) -git --work-tree=$HOME --git-dir=$HOME/.dotgit reset HEAD -git --work-tree=$HOME --git-dir=$HOME/.dotgit checkout -b $HOSTNAME -git --work-tree=$HOME --git-dir=$HOME/.dotgit -c user.name="$USER" -c user.email="${USER}@${HOSTNAME}" commit -am "Backed up pre-existing configs to local branch" -git --work-tree=$HOME --git-dir=$HOME/.dotgit checkout master -``` - -## Untracked Configurations (TODO) -- Firefox profile - - Addons (uBlockOrigin, PrivacyBadger) - - about:config keys (Turn off Pocket) - - Gnome3 integration (https://github.com/kurogetsusai/firefox-gnome-theme) - - userChrome.css - - control profiles.ini -- Gnome Extensions - - AWS EC2 SSH helper - - Battery Status - - Disable workspace switcher popup - - Gsconnect (Warning für die ganzen optionalen Pakete, die das braucht) - - Launch new instance - - No topleft hot corner - - Status area horizonzal spacing - - Vitals - -## Missing Features (TODO) -- Vim relative line numbering -- unset all variables -- Initial Setup - - do the eye candy messaging stuff - - restructure setup - - add proper status messages to vim-plug install - - install vim plugins - - missing executables warnings - - environment templates? (git.env!) -- fix the umask -- Vim put the Yaml indent Stuff in a proper filetype detection script (ftplugin?) -- Vim also add cfn filetype for cfn-lint -- enable user systemd units during install (for example the sysd ssh-agent) - -## Echos to be replaced by msg() -- fuck error msg -- initial setup - diff --git a/.local/bin/aws-config-gen b/.local/bin/aws-config-gen deleted file mode 100755 index 9135e18..0000000 --- a/.local/bin/aws-config-gen +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python3 - -""" -Parse the HTML of https://signin.aws.amazon.com/saml to extract all assumable -roles for use in .aws/config - -Usage: - aws-config-gen [--print-default-profile] [--default-role=] - [--region=] [--suffix=] - aws-config-gen -h | --help - aws-config-gen --version - -Arguments: - file Downloaded HTML File of the AWS SAML login page - -Options: - -d, --print-default-profile Begin output with an empty [default] profile. - --default-role= If more than one role can be assumed in the - same account, this option determines which one - will get the shorthand profile name without an - additional suffix. [default: developer-admin] - -r, --region= Add the specified aws region to each profile's - properties. - -s, --suffix= Append a suffix to each profile name. - --version Show version info. - -h --help Show this help screen. - -Examples: - aws-config-gen -d aws-signin.html > ~/.aws/config - aws-config-gen -r eu-central-1 -s -fra aws-signin.html >> ~/.aws/config -""" - -import sys -import re - -from docopt import docopt -from bs4 import BeautifulSoup -from pathlib import Path -from configparser import ConfigParser -from itertools import starmap, chain -from functools import partial - - - -def get_account_roles (soup): - for saml_account in soup.fieldset(class_='saml-account', recursive=False): - account_title = saml_account.find(class_='saml-account-name').string - account_alias = account_title.split()[1] - account_roles = map(get_saml_role_arn, saml_account(class_='saml-role')) - yield account_alias, list(account_roles) - -def get_saml_role_arn (saml_role_tag): - saml_radio_tag = saml_role_tag.find(class_='saml-radio') - saml_role_arn = saml_radio_tag['value'] - return saml_role_arn - -def seperate_account_roles (alias, roles, role_type_pattern): - if len(roles) == 1: - yield alias, roles[0] - else: - for role in roles: - role_type = role_type_pattern.fullmatch(role).group('type') - role_alias = f'{alias}{"-" if role_type else ""}{role_type or ""}' - yield role_alias, role - -def assemble_profile(name, role_arn, suffix=None, region=None): - section = f'profile {name}{suffix or ""}' - properties = {'azure_default_role_arn': role_arn} - if region is not None: - properties['region'] = region - return section, properties - -def print_config(profiles, print_default=False): - config = ConfigParser() - if print_default: - config.add_section('default') - config.read_dict(dict(profiles)) - config.write(sys.stdout) - -if __name__ == '__main__': - # Parse CLI arguments - arguments = docopt(__doc__, version='AWS Config Generator 1.0') - # Prepare some objects for later use - baked_profile = partial(assemble_profile, suffix=arguments['--suffix'], - region=arguments['--region']) - default_role_type=arguments['--default-role'] - role_type_pattern = re.compile( - r'(?:arn\:aws\:iam\:\:\d+\:role/)' - r'(?:netrtl\.com-)?' - f'((?:{default_role_type})|(?P.*?))' - r'(?:-access-role)?') - baked_role_seperator = partial(seperate_account_roles, - role_type_pattern=role_type_pattern) - # Read the document - html_location = Path(arguments['']).resolve() - with open(html_location) as document: - page = BeautifulSoup(document, 'html.parser') - # Mangle the data - accounts = get_account_roles(page) - roles = chain.from_iterable( starmap( baked_role_seperator, accounts ) ) - profiles = starmap(baked_profile, roles) - # Output the config - print_config(profiles, arguments['--print-default-profile']) diff --git a/.local/bin/aws-config-refresh b/.local/bin/aws-config-refresh deleted file mode 100755 index 396d85e..0000000 --- a/.local/bin/aws-config-refresh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# This should have been a make script. But apperantly the linux shebang is -# defeated by commands with more than 1 argument (#!/usr/bin/env make -f). -# ^^ -# Soo... -make -f - <<'EOF' -SHELL=/usr/bin/env bash - -~/.aws/config: ~/.aws/profiles.html - aws-config-gen -d --default-role admin $< > $@ -# aws-config-gen -r eu-central-1 --suffix -🍺 --default-role admin $< >> $@ -# aws-config-gen -r eu-west-1 --suffix -🍀 --default-role admin $< >> $@ -# aws-config-gen -r us-east-1 --suffix -🍔 --default-role admin $< >> $@ - -EOF diff --git a/.local/share/bash-completion/completions/aws b/.local/share/bash-completion/completions/aws deleted file mode 100644 index 6a18c75..0000000 --- a/.local/share/bash-completion/completions/aws +++ /dev/null @@ -1 +0,0 @@ -complete -C aws_completer aws diff --git a/.local/share/bash-completion/completions/aws-auth b/.local/share/bash-completion/completions/aws-auth deleted file mode 100755 index eba07cd..0000000 --- a/.local/share/bash-completion/completions/aws-auth +++ /dev/null @@ -1,10 +0,0 @@ -function _aws-auth { - if [ "${#COMP_WORDS[@]}" != "2" ]; then - return - fi - local aws_profiles - aws_profiles="$(pcre2grep -O '$1' '(?>\[\s*profile )(\S+)(?>\s*\])' ~/.aws/config)" - COMPREPLY=($(compgen -W "$aws_profiles" "${COMP_WORDS[$COMP_CWORD]}" )) -} - -complete -F _aws-auth aws-auth diff --git a/.screenlayout/januar.sh b/.screenlayout/januar.sh deleted file mode 100755 index 8711169..0000000 --- a/.screenlayout/januar.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -xrandr --newmode "3840x1440_120.00" 993.50 3840 4176 4600 5360 1440 1443 1453 1545 -hsync +vsync -xrandr --addmode DisplayPort-2 3840x1440_120.00 -xrandr --output DisplayPort-0 --mode 2560x1440 --pos 0x0 --rotate left --output DisplayPort-1 --off --output DisplayPort-2 --primary --mode 5120x1440 --pos 1440x227 --rotate normal --output HDMI-A-0 --off diff --git a/.ssh/config b/.ssh/config index 65af864..2b4def5 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,4 +1,8 @@ -AddKeysToAgent yes -ForwardAgent no -IdentitiesOnly yes -Include ~/.ssh/config.d/* +Host mi.lan + HostName 192.168.178.115 + User jhuebner + ProxyJump 192.168.84.2 + +Host 192.168.84.2 + HostName 192.168.84.2 + User janolehuebner diff --git a/.ssh/config.d/github b/.ssh/config.d/github deleted file mode 100644 index 8ce6115..0000000 --- a/.ssh/config.d/github +++ /dev/null @@ -1,4 +0,0 @@ -Host github.com - HostName ssh.github.com - User git - Port 443 diff --git a/.xprofile b/.xprofile deleted file mode 100644 index 889015e..0000000 --- a/.xprofile +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -udiskie & -xscreensaver --no-splash & -blueman-applet & - -if [ -f ~/.screenlayout/${HOSTNAME}.sh ]; then - . ~/.screenlayout/${HOSTNAME}.sh -fi - -# Some distros (like archlinux) link /bin/sh to bash. It is safe to load the -# .bash_profile in that case. -if [ $BASH_VERSION ]; then - . ~/.bash_profile -fi