commit 757ec9bab05f04d22694ab839e6a0395e5d1bf42 Author: Thilo Billerbeck Date: Mon May 1 00:26:39 2023 +0200 initial commit diff --git a/dotfiles/.gitmodules b/dotfiles/.gitmodules new file mode 100644 index 0000000..1af14d0 --- /dev/null +++ b/dotfiles/.gitmodules @@ -0,0 +1,4 @@ +[submodule "dotbot"] + path = dotbot + url = https://github.com/anishathalye/dotbot + ignore = dirty diff --git a/dotfiles/alacritty.yml b/dotfiles/alacritty.yml new file mode 100644 index 0000000..6f96f6e --- /dev/null +++ b/dotfiles/alacritty.yml @@ -0,0 +1,46 @@ +window: + decorations: full + dynamic_title: true + gtk_theme_variant: None +background_opacity: 1.0 +font: + normal: + family: FiraMono Nerd Font + bold: + family: FiraMono Nerd Font + style: Bold + size: 14 + offset: + y: 1 + +cursor: + style: + shape: Beam +# Colors (Snazzy) +colors: + # Default colors + primary: + background: "0x282a36" + foreground: "0xeff0eb" + + # Normal colors + normal: + black: "0x282a36" + red: "0xff5c57" + green: "0x5af78e" + yellow: "0xf3f99d" + blue: "0x57c7ff" + magenta: "0xff6ac1" + cyan: "0x9aedfe" + white: "0xf1f1f0" + + # Bright colors + bright: + black: "0x686868" + red: "0xff5c57" + green: "0x5af78e" + yellow: "0xf3f99d" + blue: "0x57c7ff" + magenta: "0xff6ac1" + cyan: "0x9aedfe" + white: "0xf1f1f0" diff --git a/dotfiles/aliases b/dotfiles/aliases new file mode 100644 index 0000000..9eb60af --- /dev/null +++ b/dotfiles/aliases @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +alias pub-ipv4="curl ip4.clerie.de" +alias serve="python -m SimpleHTTPServer 8080" +alias week='date +%V' +alias path='echo -e ${PATH//:/\\n}' +alias distro='cat /etc/*-release' +alias reload='source ~/.zshrc' +alias undo-git-reset-head="git reset 'HEAD@{1}'" +alias update-local="bash $HOME/.dotfiles/install" +alias fix-ssh-key-permissions="bash $HOME/.dotfiles/scripts/fix-ssh-key-permissions.sh" diff --git a/dotfiles/bash_logout b/dotfiles/bash_logout new file mode 100644 index 0000000..0e4e4f1 --- /dev/null +++ b/dotfiles/bash_logout @@ -0,0 +1,3 @@ +# +# ~/.bash_logout +# diff --git a/dotfiles/bash_profile b/dotfiles/bash_profile new file mode 100644 index 0000000..10d3203 --- /dev/null +++ b/dotfiles/bash_profile @@ -0,0 +1,7 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc +if [ -e /home/thilo/.nix-profile/etc/profile.d/nix.sh ]; then . /home/thilo/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer +. "$HOME/.cargo/env" diff --git a/dotfiles/bashrc b/dotfiles/bashrc new file mode 100644 index 0000000..c8e9495 --- /dev/null +++ b/dotfiles/bashrc @@ -0,0 +1,175 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +[[ -f ~/.welcome_screen ]] && . ~/.welcome_screen + +_set_my_PS1() { + PS1='[\u@\h \W]\$ ' + if [ "$(whoami)" = "liveuser" ] ; then + local iso_version="$(grep ^VERSION= /usr/lib/endeavouros-release 2>/dev/null | cut -d '=' -f 2)" + if [ -n "$iso_version" ] ; then + local prefix="eos-" + local iso_info="$prefix$iso_version" + PS1="[\u@$iso_info \W]\$ " + fi + fi +} +_set_my_PS1 +unset -f _set_my_PS1 + +ShowInstallerIsoInfo() { + local file=/usr/lib/endeavouros-release + if [ -r $file ] ; then + cat $file + else + echo "Sorry, installer ISO info is not available." >&2 + fi +} + + +alias ls='ls --color=auto' +alias ll='ls -lav --ignore=..' # show long listing of all except ".." +alias l='ls -lav --ignore=.?*' # show long listing but no hidden dotfiles except "." + +[[ "$(whoami)" = "root" ]] && return + +[[ -z "$FUNCNEST" ]] && export FUNCNEST=100 # limits recursive functions, see 'man bash' + +## Use the up and down arrow keys for finding a command in history +## (you can write some initial letters of the command first). +bind '"\e[A":history-search-backward' +bind '"\e[B":history-search-forward' + +################################################################################ +## Some generally useful functions. +## Consider uncommenting aliases below to start using these functions. + + +_GeneralCmdCheck() { + # A helper for functions UpdateArchPackages and UpdateAURPackages. + + echo "$@" >&2 + "$@" || { + echo "Error: '$*' failed." >&2 + exit 1 + } +} + +_CheckInternetConnection() { + # curl --silent --connect-timeout 8 https://8.8.8.8 >/dev/null + eos-connection-checker + local result=$? + test $result -eq 0 || echo "No internet connection!" >&2 + return $result +} + +_CheckArchNews() { + local conf=/etc/eos-update-notifier.conf + + if [ -z "$CheckArchNewsForYou" ] && [ -r $conf ] ; then + source $conf + fi + + if [ "$CheckArchNewsForYou" = "yes" ] ; then + local news="$(yay -Pw)" + if [ -n "$news" ] ; then + echo "Arch news:" >&2 + echo "$news" >&2 + echo "" >&2 + # read -p "Press ENTER to continue (or Ctrl-C to stop): " + else + echo "No Arch news." >&2 + fi + fi +} + +UpdateArchPackages() { + # Updates Arch packages. + + _CheckInternetConnection || return 1 + + _CheckArchNews + + #local updates="$(yay -Qu --repo)" + local updates="$(checkupdates)" + if [ -n "$updates" ] ; then + echo "Updates from upstream:" >&2 + echo "$updates" | sed 's|^| |' >&2 + _GeneralCmdCheck sudo pacman -Syu "$@" + return 0 + else + echo "No upstream updates." >&2 + return 1 + fi +} + +UpdateAURPackages() { + # Updates AUR packages. + + _CheckInternetConnection || return 1 + + local updates + if [ -x /usr/bin/yay ] ; then + updates="$(yay -Qua)" + if [ -n "$updates" ] ; then + echo "Updates from AUR:" >&2 + echo "$updates" | sed 's|^| |' >&2 + _GeneralCmdCheck yay -Syua "$@" + else + echo "No AUR updates." >&2 + fi + else + echo "Warning: /usr/bin/yay does not exist." >&2 + fi +} + +UpdateAllPackages() { + # Updates all packages in the system. + # Upstream (i.e. Arch) packages are updated first. + # If there are Arch updates, you should run + # this function a second time to update + # the AUR packages too. + + UpdateArchPackages || UpdateAURPackages +} + + +_open_files_for_editing() { + # Open any given document file(s) for editing (or just viewing). + # Note1: Do not use for executable files! + # Note2: uses mime bindings, so you may need to use + # e.g. a file manager to make some file bindings. + + local progs="xdg-open exo-open" # One of these programs is used. + local prog + for prog in $progs ; do + if [ -x /usr/bin/$xx ] ; then + $prog "$@" >& /dev/null & + return + fi + done + echo "Sorry, none of programs [$progs] is found." >&2 + echo "Tip: install one of packages" >&2 + for prog in $progs ; do + echo " $(pacman -Qqo "$prog")" >&2 + done +} + +#------------------------------------------------------------ + +## Aliases for the functions above. +## Uncomment an alias if you want to use it. +## + +# alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing +################################################################################ +source "$HOME/.cargo/env" + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +. "$HOME/.cargo/env" diff --git a/dotfiles/beets.yaml b/dotfiles/beets.yaml new file mode 100644 index 0000000..8ca29ad --- /dev/null +++ b/dotfiles/beets.yaml @@ -0,0 +1,16 @@ +directory: ~/Music/dj/Library +library: ~/Music/dj/library.db +plugins: spotify acousticbrainz badfiles duplicates fetchart +import: + write: yes + copy: yes + resume: no + duplicate_action: ask + default_action: apply +badfiles: + check_on_import: yes +match: + max_rec: + track_length: strong + track_title: strong + track_artist: strong diff --git a/dotfiles/chromium-flags.conf b/dotfiles/chromium-flags.conf new file mode 100644 index 0000000..2bd4dc1 --- /dev/null +++ b/dotfiles/chromium-flags.conf @@ -0,0 +1,7 @@ +--force-dark-mode +--enable-features=WebUIDarkMode +--enable-smooth-scrolling +--ozone-platform-hint=auto +--ignore-gpu-blocklist +--enable-gpu-rasterization +--enable-zero-copy \ No newline at end of file diff --git a/dotfiles/gitconfig b/dotfiles/gitconfig new file mode 100644 index 0000000..f1949b9 --- /dev/null +++ b/dotfiles/gitconfig @@ -0,0 +1,28 @@ +[user] + name = Thilo Billerbeck + email = thilo.billerbeck@officerent.de + +[color] + diff = auto + status = auto + branch = auto + interactive = auto + ui = true + pager = true +[log] + date = short +[rerere] + enabled = 1 +[core] + whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol + excludesfile = ~/.gitignore-rab + autocrlf = input +[apply] + whitespace = nowarn +[branch] + autosetuprebase = always +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/dotfiles/gtk-3.ini b/dotfiles/gtk-3.ini new file mode 100644 index 0000000..5dbd750 --- /dev/null +++ b/dotfiles/gtk-3.ini @@ -0,0 +1,2 @@ +[Settings] +gtk-application-prefer-dark-theme=true diff --git a/dotfiles/htoprc b/dotfiles/htoprc new file mode 100644 index 0000000..41597a3 --- /dev/null +++ b/dotfiles/htoprc @@ -0,0 +1,39 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +fields=0 48 17 18 38 39 40 2 46 47 49 1 +sort_key=46 +sort_direction=1 +tree_sort_key=0 +tree_sort_direction=1 +hide_kernel_threads=1 +hide_userland_threads=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +tree_view=1 +tree_view_always_by_pid=0 +header_margin=1 +detailed_cpu_time=0 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=0 +show_cpu_temperature=0 +degree_fahrenheit=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +enable_mouse=1 +delay=15 +left_meters=LeftCPUs2 CPU Memory DiskIO NetworkIO +left_meter_modes=1 1 1 2 2 +right_meters=RightCPUs2 Tasks LoadAverage Uptime Battery +right_meter_modes=1 2 2 2 2 +hide_function_bar=0 \ No newline at end of file diff --git a/dotfiles/init.vim b/dotfiles/init.vim new file mode 100644 index 0000000..a3223c7 --- /dev/null +++ b/dotfiles/init.vim @@ -0,0 +1,43 @@ +call plug#begin('~/.vim/plugged') + +" FILE VIEW +Plug 'scrooloose/nerdtree' +Plug 'ryanoasis/vim-devicons' + +" COC +Plug 'neoclide/coc.nvim', {'branch': 'release'} +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } + +Plug 'dense-analysis/ale' + +call plug#end() + +" GENERAL + +set title +set number +set relativenumber +set cursorline + +" + +set mouse=a + +" THEMES +syntax enable + +" FILE VIEW + +let g:NERDTreeShowHidden = 1 +let g:NERDTreeMinimalUI = 1 +let g:NERDTreeIgnore = [ '.git/' ] +let g:NERDTreeStatusline = '' +let g:NERDTreeMouseMode = 2 +" Automaticaly close nvim if NERDTree is only thing left open +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +" Toggle +nnoremap :NERDTreeToggle + +" COC +let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver'] + diff --git a/dotfiles/install b/dotfiles/install new file mode 100755 index 0000000..c13a2ff --- /dev/null +++ b/dotfiles/install @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +script_location=$(dirname $(realpath $0)) + +bash $script_location/scripts/bootstrap-local-env.sh +bash $script_location/scripts/update-dotfiles.sh \ No newline at end of file diff --git a/dotfiles/install.conf.yaml b/dotfiles/install.conf.yaml new file mode 100644 index 0000000..66770b5 --- /dev/null +++ b/dotfiles/install.conf.yaml @@ -0,0 +1,75 @@ +- defaults: + link: + relink: true + +- clean: + ~/: + force: true + +- link: + ~/.bash_profile: + path: bash_profile + force: true + ~/.bashrc: + path: bashrc + force: true + ~/.bash_logout: + path: bash_logout + force: true + ~/.zshrc: + path: zshrc + force: true + ~/.zshenv: + path: zshenv + force: true + ~/.gitconfig: + path: gitconfig + force: true + # ~/.config/gtk-3.0/settings.ini: + # path: gtk-3.ini + # force: true + ~/.config/nano/nanorc: + path: nanorc + force: true + ~/.config/locale.conf: + path: locale.conf + force: true + ~/.aliases: + path: aliases + force: true + ~/.alacritty.yml: + path: alacritty.yml + force: true + ~/.config/htop/htoprc: + path: htoprc + force: true + ~/.config/starship.toml: + path: starship.toml + force: true + ~/.config/nvim/init.vim: + path: init.vim + force: true + ~/.config/chromium-flags.conf: + path: chromium-flags.conf + force: true + ~/.config/chrome-flags.conf: + path: chromium-flags.conf + force: true + ~/.config/vivaldi-stable.conf: + path: chromium-flags.conf + force: true + ~/.var/app/com.google.Chrome/config/chrome-flags.conf: + path: chromium-flags.conf + force: true + ~/.ssh/config: + path: ssh-config + force: true + ~/.config/beets/config.yaml: + path: beets.yaml + force: true + ~/.config/pipewire/pipewire.conf: + path: pipewire.conf + force: true + ~/.config/topgrade.toml: + path: topgrade.toml + force: true diff --git a/dotfiles/locale.conf b/dotfiles/locale.conf new file mode 100644 index 0000000..671b6a7 --- /dev/null +++ b/dotfiles/locale.conf @@ -0,0 +1,10 @@ +LANG=de_DE.UTF-8 +LC_ADDRESS=de_DE.UTF-8 +LC_IDENTIFICATION=de_DE.UTF-8 +LC_MEASUREMENT=de_DE.UTF-8 +LC_MONETARY=de_DE.UTF-8 +LC_NAME=de_DE.UTF-8 +LC_NUMERIC=de_DE.UTF-8 +LC_PAPER=de_DE.UTF-8 +LC_TELEPHONE=de_DE.UTF-8 +LC_TIME=de_DE.UTF-8 \ No newline at end of file diff --git a/dotfiles/nanorc b/dotfiles/nanorc new file mode 100644 index 0000000..0fce9c8 --- /dev/null +++ b/dotfiles/nanorc @@ -0,0 +1,305 @@ +## Test comment + +## Sample initialization file for GNU nano. +## +## For the options that take parameters, the default value is shown. +## Other options are unset by default. To make sure that an option +## is disabled, you can use "unset