diff options
-rw-r--r-- | .bashrc | 3 | ||||
-rw-r--r-- | .etc/X11/xorg.conf.d/amd.conf | 6 | ||||
-rw-r--r-- | .etc/X11/xorg.conf.d/intel.conf | 5 | ||||
-rw-r--r-- | .etc/logid.cfg | 81 | ||||
-rw-r--r-- | .repos/dwm/config.h | 2 | ||||
-rw-r--r-- | README.md | 16 | ||||
-rwxr-xr-x | backup | 20 | ||||
-rw-r--r-- | packages.txt | 2 | ||||
-rwxr-xr-x | sync | 37 |
9 files changed, 159 insertions, 13 deletions
@@ -21,6 +21,8 @@ alias ..='cd ..' alias ...='cd ...' alias -- -='cd -' alias c='cd' +alias mv='mv -v' +alias cp='cp -v' alias cls='clear; ls' alias vim='nvim' alias v='nvim' @@ -30,6 +32,7 @@ alias pdf='zathura' alias clip='xclip -selection c' alias scrot='maim -us | clip -t image/png' alias py='python3' +alias js='node' alias script='script -q' alias sudo='sudo ' alias please='sudo $(fc -ln -1)' diff --git a/.etc/X11/xorg.conf.d/amd.conf b/.etc/X11/xorg.conf.d/amd.conf new file mode 100644 index 0000000..0401175 --- /dev/null +++ b/.etc/X11/xorg.conf.d/amd.conf @@ -0,0 +1,6 @@ +Section "Device" + Identifier "AMD" + Driver "amdgpu" + Option "DRI" "3" + Option "TearFree" "true" +EndSection diff --git a/.etc/X11/xorg.conf.d/intel.conf b/.etc/X11/xorg.conf.d/intel.conf new file mode 100644 index 0000000..0746897 --- /dev/null +++ b/.etc/X11/xorg.conf.d/intel.conf @@ -0,0 +1,5 @@ +Section "Device" + Identifier "Intel Graphics" + Driver "intel" + Option "TearFree" "true" +EndSection diff --git a/.etc/logid.cfg b/.etc/logid.cfg new file mode 100644 index 0000000..9d83a4b --- /dev/null +++ b/.etc/logid.cfg @@ -0,0 +1,81 @@ +devices: ( +{ + name: "MX Master 2S"; + smartshift: + { + on: true; + threshold: 13; + }; + hiresscroll: + { + hires: true; + invert: false; + target: false; + }; + dpi: 1200; + + buttons: ( + { + cid: 0xc3; + action = + { + type: "Gestures"; + gestures: ( + { + direction: "Up"; + mode: "OnRelease"; + action = + { + type: "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_J"]; + }; + }, + { + direction: "Down"; + mode: "OnRelease"; + action = + { + type: "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_K"]; + }; + }, + { + direction: "Left"; + mode: "OnRelease"; + action = + { + type: "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_G"]; + }; + }, + { + direction: "Right"; + mode: "OnRelease"; + action = + { + type: "Keypress" + keys: ["KEY_LEFTMETA", "KEY_SEMICOLON"]; + }; + }, + { + direction: "None" + mode: "OnRelease"; + action = + { + type: "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_TAB"]; + } + } + ); + }; + }, + { + cid: 0xc4; + action = + { + type = "ToggleSmartshift"; + }; + }, + ); +} +); diff --git a/.repos/dwm/config.h b/.repos/dwm/config.h index bd684a2..a22059a 100644 --- a/.repos/dwm/config.h +++ b/.repos/dwm/config.h @@ -67,7 +67,7 @@ static const Rule rules[] = { { "St", NULL, NULL, 0, 0, 1, 0, -1 }, { NULL, "spterm", NULL, SPTAG(0), 1, 1, 0, -1 }, { NULL, "spcalc", NULL, SPTAG(1), 1, 1, 0, -1 }, - { NULL, NULL, "DISPATCH", 1 << 2, 0, 1, 0, -1 }, + //{ NULL, NULL, "REPL", 1 << 2, 0, 1, 0, -1 }, { NULL, NULL, "WhatsApp", 1 << 7, 0, 0, 0, -1 }, }; @@ -1,14 +1,17 @@ # .files + These are my personal dotfiles of my main PC and all my other devices. You probably shouldn't use these, as the configs are **very** specific to my PC usage. ## Features -* System-wide dark color scheme (e.g. Vim, DWM, ST, qutebrowser, Spotify, notifications, ...) -* System-wide Vim-key navigation -* Automatic environment setup on boot (personal preference) -* Simple and effecient backup and sync scripts -* Scripts for faster bootstrapping of projects and better development experience + +- System-wide dark color scheme (e.g. Vim, DWM, ST, qutebrowser, Spotify, notifications, ...) +- System-wide Vim-key navigation +- Automatic environment setup on boot (personal preference) +- Simple and effecient backup and sync scripts +- Scripts for faster bootstrapping of projects and better development experience ## Screenshots + qutebrowser and Neovim  @@ -18,6 +21,7 @@ Spotify and Zathura  ## My routine for new machines -1. Clone this repository and move all its files into your `$HOME` (including `.git`) + +1. Clone this repository into any directory 2. Execute `./sync` 3. Repeat step 2 every once in a while @@ -1,10 +1,17 @@ #!/usr/bin/env bash +printf "\033[0;31m" +if [ -z "$HOME" ] || ! [ -x "$(command -v pacman)" ]; then + echo "Something went wrong!" + printf "\033[0m" + exit 1 +fi + printf "\033[0;34m" echo "Cleaning previous configs" -rm -rf .config/ .repos/ .scripts/ .boilerplates/ -mkdir -p .config/{dunst,qutebrowser,gtk-2.0,gtk-3.0,nvim,zathura,mpv,spicetify} .repos +rm -rf .config/ .repos/ .scripts/ .boilerplates/ .etc/ +mkdir -p .config/{dunst,qutebrowser,gtk-2.0,gtk-3.0,nvim,zathura,mpv,spicetify}/ .etc/X11/xorg.conf.d/ .repos/ echo "Copying configs" @@ -22,6 +29,10 @@ cp "$HOME"/.config/mpv/mpv.conf .config/mpv/ cp "$HOME"/.config/uncrustify.cfg .config/ cp -r "$HOME"/.config/spicetify/{config.ini,Themes/} .config/spicetify/ +# Root configs +cp /etc/logid.cfg .etc/ +cp /etc/X11/xorg.conf.d/* .etc/X11/xorg.conf.d/ + # Inits cp "$HOME"/.bash_profile "$HOME"/.bashrc "$HOME"/.xinitrc "$HOME"/.Xresources . cp -r "$HOME"/.lein . @@ -30,6 +41,7 @@ cp -r "$HOME"/.lein . cp -r "$HOME"/.boilerplates . # Crypto keys etc. +printf "\033[0;34m" echo "Uploading keys" scp -rq "$HOME"/.crypto/ root@10.0.0.33:/mnt/ssd/ @@ -40,9 +52,11 @@ find .repos/ -type d -name ".git" -exec rm -rf {} + find .repos/ -type f -exec sh -c "file -i '{}' | grep -q 'charset=binary'" \; -delete # Installed programs +printf "\033[0;34m" echo "Getting package list" -pacman -Qqe > packages.txt +pacman -Qqe >packages.txt +printf "\033[0;34m" printf "\nChanged files:\n" printf "\033[0;32m" git status -s | cut -c4- diff --git a/packages.txt b/packages.txt index 8270300..81862da 100644 --- a/packages.txt +++ b/packages.txt @@ -60,6 +60,7 @@ dunst dvgrab efibootmgr entr +evtest exercism-bin fd file-roller @@ -118,6 +119,7 @@ linux-zen linux-zen-docs linux-zen-headers llvm +logiops-git lowdown lshw lsscsi @@ -1,5 +1,26 @@ #!/usr/bin/env bash # The most awesome sync script! :) +# This shouldn't be used anywhere else than on my PCs! + +printf "\033[0;31m" + +if [ -z "$HOME" ] || ! [ -x "$(command -v pacman)" ]; then + echo "Something went wrong!" + printf "\033[0m" + exit 1 +fi + +echo "WARNING: This will replace all your existing configs!" +read -p "Are you sure you want to do this? [yn] " -n 1 -r +if [[ ! $REPLY =~ ^[Yy]$ ]]; then + printf "\033[0m" + echo + exit 1 +fi +echo + +printf "\033[0;32m" +echo "Okay, syncing..." printf "\033[0;34m" echo "Pulling newest configs" @@ -7,7 +28,7 @@ git pull --quiet || exit 1 printf "\033[0;34m" echo "Syncing packages" -sudo pacman -Syq &> /dev/null +sudo pacman -Syq &>/dev/null printf "\033[0;34m" echo "Comparing installed packages" @@ -15,10 +36,20 @@ comm -23 <(sort packages.txt) <(pacman -Qqe | sort) | yay -Sq --needed - printf "\033[0;34m" echo "Compiling local repos" -for d in ./.repos/*/ ; do (cd "$d" && sudo make clean install &> /dev/null); done || exit 1 +for d in ./.repos/*/; do (cd "$d" && sudo make clean install &>/dev/null); done || exit 1 + +printf "\033[0;34m" +echo "Copying configs" +printf "\033[0;37m" +cp -rv .config/ .lein/ .scripts/ .bash_profile .bashrc .xinitrc .Xresources "$HOME"/ +sudo cp -rv .etc/* /etc/ printf "\033[0;34m" echo "Syncing crypto files from server" -scp -rq root@10.0.0.33:/mnt/ssd/.crypto "$HOME"/ +ping -q -w1 -c1 10.0.0.33 &>/dev/null && + scp -rq root@10.0.0.33:/mnt/ssd/.crypto "$HOME"/ || + echo "Server connection failed" + +echo "Finished!" printf "\033[0m" |