Compare commits

..

9 commits

Author SHA1 Message Date
dabruh
8c36bcaf79 Set Flutter and Android SDK vars 2023-09-15 14:19:58 +02:00
dabruh
acbea9fd89 Remove invalid TERM env var override 2023-09-15 13:51:15 +02:00
dabruh
28a0d18539 Add Flutter PATH entry 2023-09-15 13:49:08 +02:00
dabruh
17c46442bd Adjust Krew installation function 2023-09-15 13:42:07 +02:00
dabruh
e1a1c49770 Adjust Krew installation dir 2023-09-15 13:41:56 +02:00
dabruh
cf9771c572 Remove PATH entry 2023-09-15 13:30:40 +02:00
dabruh
0f8555f99d Add ls alias 2023-09-15 13:26:39 +02:00
dabruh
571c8e8d10 Adjust font size 2023-09-15 12:58:18 +02:00
dabruh
ba88be96c7 Install Python packages into virtualenv 2023-09-15 12:53:23 +02:00
7 changed files with 34 additions and 12 deletions

View file

@ -2,7 +2,7 @@
exec_always --no-startup-id pidof -s picom || picom exec_always --no-startup-id pidof -s picom || picom
# Run flashfocus # Run flashfocus
exec_always --no-startup-id flashfocus --config ~/.config/flashfocus/flashfocus.yml exec_always --no-startup-id $flashfocus_bin --config ~/.config/flashfocus/flashfocus.yml
bindsym Alt+section exec --no-startup-id flash_window bindsym Alt+section exec --no-startup-id flash_window
# Set wallpaper # Set wallpaper

View file

@ -13,3 +13,5 @@ set $calc_cmd kitty --title calculator bc -l
set $browser firefox set $browser firefox
set $terminal kitty set $terminal kitty
set $flashfocus_bin /opt/dotfiles/pyenv/bin/flashfocus

View file

@ -1,4 +1,4 @@
font_size 12.0 font_size 10.0
hide_window_decorations yes hide_window_decorations yes
window_padding_width 5 window_padding_width 5

View file

@ -3,6 +3,7 @@
# shellcheck disable=SC2139 # shellcheck disable=SC2139
# Verbosity and settings that you pretty much just always are going to want. # Verbosity and settings that you pretty much just always are going to want.
alias \ alias \
ls="ls --color=auto" \
bc="bc -ql" \ bc="bc -ql" \
cp="cp -iv" \ cp="cp -iv" \
df='df -h' \ df='df -h' \

View file

@ -9,11 +9,17 @@ export PAGER=less
export TERMINAL=kitty export TERMINAL=kitty
export VISUAL=code export VISUAL=code
# Misc vars
export CHROME_EXECUTABLE=chromium # For Flutter
# Clean home: # Clean home:
export XDG_CACHE_HOME="$HOME/.cache" export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config" export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share" export XDG_DATA_HOME="$HOME/.local/share"
export ANDROID_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/Android/Sdk"
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
export KREW_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/krew"
export FLUTTER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/flutter"
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history" export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc" export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
@ -88,10 +94,10 @@ append_path_with_entries() {
} }
prepend_paths=( prepend_paths=(
"$HOME/bin"
"$HOME/.local/bin" "$HOME/.local/bin"
"$HOME/.cargo/bin" "$HOME/.cargo/bin"
"${KREW_ROOT:-$HOME/.krew}/bin" "$FLUTTER_HOME/bin"
"$KREW_ROOT/bin"
) )
append_paths=() append_paths=()

View file

@ -16,7 +16,6 @@ set-window-option -g automatic-rename on
set-option -g set-titles on set-option -g set-titles on
# True Colors # True Colors
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc" set -ga terminal-overrides ",*256col*:Tc"
set -g status-keys vi set -g status-keys vi

View file

@ -11,6 +11,8 @@ script_dir="$(
cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit 1 cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit 1
pwd -P pwd -P
)" )"
opt_dir=/opt/dotfiles
python_venv=$opt_dir/pyenv
# #
# Argument parsing and help # Argument parsing and help
@ -79,8 +81,18 @@ function construct_target_list() {
} }
function setup_pip_packages() { function setup_pip_packages() {
echo "Installing Python packages into virtualenv $python_venv"
! [ -d "$opt_dir" ] && sudo mkdir "$opt_dir"
sudo python -m venv "$python_venv"
# shellcheck disable=SC1091
source "$python_venv/bin/activate"
# shellcheck disable=SC2046 # shellcheck disable=SC2046
sudo pip3 install $(get_packages $(construct_target_list pip)) --no-input || return 1 sudo pip3 install $(get_packages $(construct_target_list pip)) --no-input || return 1
deactivate
} }
function install_sddm_aerial_theme() { function install_sddm_aerial_theme() {
@ -185,14 +197,16 @@ function setup_brew_formulas() {
} }
function setup_krew() { function setup_krew() {
cd "$(mktemp -d)" && set -e
OS="$(uname | tr '[:upper:]' '[:lower:]')" && cd "$(mktemp -d)"
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && OS="$(uname | tr '[:upper:]' '[:lower:]')"
KREW="krew-${OS}_${ARCH}" && ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && KREW="krew-${OS}_${ARCH}"
tar zxvf "${KREW}.tar.gz" && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz"
tar zxvf "${KREW}.tar.gz"
./"${KREW}" install krew ./"${KREW}" install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
set +e
} }
function setup_krew_plugins() { function setup_krew_plugins() {