mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
Compare commits
18 Commits
0d916fe960
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
0a59fef11c
|
|||
|
fdf1ba6fb0
|
|||
|
17d83c347d
|
|||
|
c4faef634a
|
|||
|
2795a86441
|
|||
|
03244bd272
|
|||
|
37b97b00f5
|
|||
|
5d6cb3a843
|
|||
|
5561f3ccaf
|
|||
|
3a82ae15df
|
|||
|
d26ca008c0
|
|||
|
d29876b367
|
|||
|
24440f845b
|
|||
|
4a08de9573
|
|||
|
b1c3b16cc6
|
|||
|
b159565288
|
|||
|
df876d2cac
|
|||
|
e052f0c394
|
1
TODO.md
1
TODO.md
@@ -27,6 +27,7 @@ A list of in-progress and completed todo's.
|
|||||||
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
|
||||||
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
|
||||||
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
- [ ] Setup a new machine / virtual machine to test, as it's hard to test the scripts once a machine is setup.
|
||||||
|
- [ ] Need to add `repos` script when bootstrapping.
|
||||||
|
|
||||||
### Keyboard / kanata
|
### Keyboard / kanata
|
||||||
|
|
||||||
|
|||||||
76
devcontainer-env
Executable file
76
devcontainer-env
Executable file
@@ -0,0 +1,76 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Intsalls appropriate dotfiles inside a devcontainer context.
|
||||||
|
|
||||||
|
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||||
|
DEV_ENV=${DEV_ENV:-$(dirname "${BASH_SOURCE[0]}")}
|
||||||
|
|
||||||
|
if [ ! -d "$DEV_ENV" ]; then
|
||||||
|
echo "[ERROR]: DEV_ENV variable does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log() {
|
||||||
|
echo "$*"
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_dir() {
|
||||||
|
local dir=${1:-""}
|
||||||
|
local path="${DEV_ENV}/${dir}"
|
||||||
|
|
||||||
|
if [ -z "$dir" ] || [ ! -d "$path" ]; then
|
||||||
|
log "[ERROR]: Directory does not exist: $dir"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
log "Copying dir: $dir"
|
||||||
|
cp -R "$path" "$XDG_CONFIG_HOME"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
copy_file() {
|
||||||
|
local file=${1:-""}
|
||||||
|
|
||||||
|
if [[ -z "$file" ]] || [[ ! -f "$file" ]]; then
|
||||||
|
log "[ERROR]: file does not exist: $file"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
log "Copying file: $file"
|
||||||
|
cp "$DEV_ENV/$file" "$HOME"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# MAIN
|
||||||
|
dirs=(
|
||||||
|
env/.config/eza
|
||||||
|
env/.config/git
|
||||||
|
env/.config/ripgrep
|
||||||
|
env/.config/starship
|
||||||
|
env/.config/yazi
|
||||||
|
env/.config/zsh
|
||||||
|
)
|
||||||
|
|
||||||
|
files=(
|
||||||
|
env/.markdownlint.jsonc
|
||||||
|
env/.prettierrc
|
||||||
|
env/.tmux.conf
|
||||||
|
env/.zshenv
|
||||||
|
)
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"; do
|
||||||
|
copy_dir "$dir"
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in "${files[@]}"; do
|
||||||
|
copy_file "$file"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Install neovim config
|
||||||
|
git submodule update --init --remote env/.config/nvim
|
||||||
|
source env/.config/nvim/install.sh
|
||||||
|
|
||||||
|
# Install my scripts
|
||||||
|
cp -R env/.local/scripts "$HOME/.local"
|
||||||
2
env/.config/hypr/hyprautostart.conf
vendored
2
env/.config/hypr/hyprautostart.conf
vendored
@@ -6,7 +6,7 @@
|
|||||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||||
# Or execute your favorite apps at launch like this:
|
# Or execute your favorite apps at launch like this:
|
||||||
|
|
||||||
exec-once = pidof hyprpaper | uwsm app -- hyprpaper
|
exec-once = uwsm app -- hyprpaper
|
||||||
exec-once = pidof hypridle | uwsm app -- hypridle
|
exec-once = pidof hypridle | uwsm app -- hypridle
|
||||||
exec-once = pidof hyprlauncher | uwsm app -- hyprlauncher -d
|
exec-once = pidof hyprlauncher | uwsm app -- hyprlauncher -d
|
||||||
exec-once = pidof swaync | uwsm app -- swaync
|
exec-once = pidof swaync | uwsm app -- swaync
|
||||||
|
|||||||
2
env/.config/hypr/hyprmonitors.conf
vendored
2
env/.config/hypr/hyprmonitors.conf
vendored
@@ -4,7 +4,5 @@
|
|||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
monitor= ,preferred,auto,auto
|
monitor= ,preferred,auto,auto
|
||||||
#monitor = HDMI-A-1, preferred, 0x0, auto
|
|
||||||
#monitor = HDMI-A-1, preferred, 0x0, 1.66667
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
env/.config/hypr/hyprpaper.conf
vendored
9
env/.config/hypr/hyprpaper.conf
vendored
@@ -1,3 +1,6 @@
|
|||||||
preload = /home/michael/wallpapers/wall1.png
|
wallpaper {
|
||||||
wallpaper = ,/home/michael/wallpapers/wall1.png
|
monitor =
|
||||||
splash = true
|
path = /home/michael/wallpapers/wall1.png
|
||||||
|
fit_mode = cover
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
2
env/.config/hypr/hyprtoolkit.conf
vendored
2
env/.config/hypr/hyprtoolkit.conf
vendored
@@ -1,6 +1,6 @@
|
|||||||
background = rgb(1e1e2e)
|
background = rgb(1e1e2e)
|
||||||
base = rgb(b4befe)
|
base = rgb(b4befe)
|
||||||
alternate_base = rgb(cdd6f4))
|
alternate_base = rgb(cdd6f4)
|
||||||
text = rgb(cdd6f4)
|
text = rgb(cdd6f4)
|
||||||
bright_text = rgb(89b4fa)
|
bright_text = rgb(89b4fa)
|
||||||
accent = rgb(b4befe)
|
accent = rgb(b4befe)
|
||||||
|
|||||||
82
env/.config/hypr/hyprwindows.conf
vendored
82
env/.config/hypr/hyprwindows.conf
vendored
@@ -4,44 +4,44 @@
|
|||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
|
|
||||||
windowrule = float, tag:floating-window
|
# windowrule = float, tag:floating-window
|
||||||
windowrule = center, tag:floating-window
|
# windowrule = center, tag:floating-window
|
||||||
windowrule = size 60% 60%, tag:floating-window
|
# windowrule = size 60% 60%, tag:floating-window
|
||||||
|
#
|
||||||
# Weather tui
|
# # Weather tui
|
||||||
windowrule = float, class:^(com.ghostty.weather)$
|
# windowrule = float, class:^(com.ghostty.weather)$
|
||||||
windowrule = center, class:^(com.ghostty.weather)$
|
# windowrule = center, class:^(com.ghostty.weather)$
|
||||||
windowrule = size 90% 80%, class:^(com.ghostty.weather)$
|
# windowrule = size 90% 80%, class:^(com.ghostty.weather)$
|
||||||
|
#
|
||||||
# Force windows to be a floating window
|
# # Force windows to be a floating window
|
||||||
windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
|
# windowrule = tag +floating-window, class:^(blueberry.py|org.gnome.Nautilus|com.ghostty.float)$
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.windowctl)$
|
# windowrule = tag +floating-window, class:^(com.ghostty.windowctl)$
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.utils-launcher)$
|
# windowrule = tag +floating-window, class:^(com.ghostty.utils-launcher)$
|
||||||
windowrule = tag +floating-window, class:^(com.ghostty.homelab-launcher)$
|
# windowrule = tag +floating-window, class:^(com.ghostty.homelab-launcher)$
|
||||||
|
#
|
||||||
# Force to stay focused when visible.
|
# # Force to stay focused when visible.
|
||||||
windowrule = stayfocused, class:(blueberry.py)
|
# windowrule = stayfocused, class:(blueberry.py)
|
||||||
windowrule = stayfocused, class:Pinentry.gtk
|
# windowrule = stayfocused, class:Pinentry.gtk
|
||||||
windowrule = stayfocused, class:com.ghostty.float
|
# windowrule = stayfocused, class:com.ghostty.float
|
||||||
windowrule = stayfocused, class:com.ghostty.windowctl
|
# windowrule = stayfocused, class:com.ghostty.windowctl
|
||||||
windowrule = stayfocused, class:^(com.ghostty.utils-launcher)$
|
# windowrule = stayfocused, class:^(com.ghostty.utils-launcher)$
|
||||||
|
#
|
||||||
# Clipboard history tui in floating window.
|
# # Clipboard history tui in floating window.
|
||||||
windowrule = tag +floating-window, class:.*clipse.*
|
# windowrule = tag +floating-window, class:.*clipse.*
|
||||||
windowrule = stayfocused, class:.*clipse.*
|
# windowrule = stayfocused, class:.*clipse.*
|
||||||
|
#
|
||||||
# Ignore maximize requests from apps. You'll probably like this.
|
# # Ignore maximize requests from apps. You'll probably like this.
|
||||||
windowrule = suppressevent maximize, class:.*
|
# windowrule = suppressevent maximize, class:.*
|
||||||
|
#
|
||||||
# Just a dash of opacity by default.
|
# # Just a dash of opacity by default.
|
||||||
windowrule = opacity 0.97 0.92, class:.*
|
# windowrule = opacity 0.97 0.92, class:.*
|
||||||
# No opacity on youtube.
|
# # No opacity on youtube.
|
||||||
windowrule = opacity 1.0, class:.*youtube.com.*
|
# windowrule = opacity 1.0, class:.*youtube.com.*
|
||||||
|
#
|
||||||
# Fix some dragging issues with XWayland
|
# # Fix some dragging issues with XWayland
|
||||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
# windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||||
|
#
|
||||||
# To get more information about a window’s class, title, XWayland status or its size, you can use `hyprctl clients`. (From Hyprland Wiki)
|
# # To get more information about a window’s class, title, XWayland status or its size, you can use `hyprctl clients`. (From Hyprland Wiki)
|
||||||
windowrulev2 = float,class:^(one.alynx.showmethekey)$
|
# windowrulev2 = float,class:^(one.alynx.showmethekey)$
|
||||||
windowrulev2 = float,class:^(showmethekey-gtk)$ # make window floating
|
# windowrulev2 = float,class:^(showmethekey-gtk)$ # make window floating
|
||||||
windowrulev2 = pin,class:^(showmethekey-gtk)$ # pin window
|
# windowrulev2 = pin,class:^(showmethekey-gtk)$ # pin window
|
||||||
|
|||||||
2
env/.config/kanata/voyager.kbd
vendored
2
env/.config/kanata/voyager.kbd
vendored
@@ -27,7 +27,7 @@
|
|||||||
;; Variables
|
;; Variables
|
||||||
(defvar
|
(defvar
|
||||||
tap-higher 400
|
tap-higher 400
|
||||||
tap-time 200
|
tap-time 150
|
||||||
tap-time-plus 300
|
tap-time-plus 300
|
||||||
hold-time-plus 300
|
hold-time-plus 300
|
||||||
hold-time 200
|
hold-time 200
|
||||||
|
|||||||
2
env/.config/nvim
vendored
2
env/.config/nvim
vendored
Submodule env/.config/nvim updated: d1d13fcc8f...da24092050
12
env/.config/starship/starship.toml
vendored
12
env/.config/starship/starship.toml
vendored
@@ -7,7 +7,9 @@ format = """
|
|||||||
$os\
|
$os\
|
||||||
$username\
|
$username\
|
||||||
$hostname\
|
$hostname\
|
||||||
[](bg:color_pink fg:color_orange)\
|
[](bg:color_lavender fg:color_orange)\
|
||||||
|
${custom.devpod}\
|
||||||
|
[](bg:color_pink fg:color_lavender)\
|
||||||
$directory\
|
$directory\
|
||||||
[](fg:color_pink bg:color_bg1)\
|
[](fg:color_pink bg:color_bg1)\
|
||||||
$git_branch\
|
$git_branch\
|
||||||
@@ -33,6 +35,14 @@ color_maroon = '#eba0ac'
|
|||||||
color_pink = '#f5c2e7'
|
color_pink = '#f5c2e7'
|
||||||
color_text = '#585b70'
|
color_text = '#585b70'
|
||||||
|
|
||||||
|
[custom.devpod]
|
||||||
|
description = "Displays the active Devpod workspace"
|
||||||
|
command = "echo $(echo $DEVPOD_WORKSPACE_ID | sed 's/.*://')"
|
||||||
|
when = "[[ -n $DEVPOD_WORKSPACE_ID ]]"
|
||||||
|
style = "bold bg:color_lavender fg:color_text"
|
||||||
|
format = "[ 📦 $output ]($style)"
|
||||||
|
disabled = false
|
||||||
|
|
||||||
[os]
|
[os]
|
||||||
disabled = false
|
disabled = false
|
||||||
style = "bold bg:color_orange fg:color_fg0"
|
style = "bold bg:color_orange fg:color_fg0"
|
||||||
|
|||||||
8
env/.config/zsh/.zshrc
vendored
8
env/.config/zsh/.zshrc
vendored
@@ -175,7 +175,8 @@ alias pass='PASSWORD_STORE_DIR=/home/michael/.local/share/gopass/stores/root gop
|
|||||||
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
||||||
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
||||||
alias s='swift' # shorthand to access swift commands
|
alias s='swift' # shorthand to access swift commands
|
||||||
alias st='swift test' # swift test
|
alias st='swift test' # swift test
|
||||||
|
alias ste='swift test --enable-code-coverage' # swift test with code coverage enabled.
|
||||||
alias sb='swift build' # swift build
|
alias sb='swift build' # swift build
|
||||||
alias syu='yay -Syu' # Update packages.
|
alias syu='yay -Syu' # Update packages.
|
||||||
alias t='tmux' # access tmux quickly
|
alias t='tmux' # access tmux quickly
|
||||||
@@ -207,6 +208,7 @@ source <(fzf --zsh)
|
|||||||
_source_if "$ZDOTDIR/.zshrc-local"
|
_source_if "$ZDOTDIR/.zshrc-local"
|
||||||
_source_if "$LOCAL_ENV"
|
_source_if "$LOCAL_ENV"
|
||||||
_source_if "$SCRIPTS/catppuccin-colors"
|
_source_if "$SCRIPTS/catppuccin-colors"
|
||||||
|
_source_if "$XDG_DATA_HOME/swiftly/env.sh"
|
||||||
|
|
||||||
# pnpm
|
# pnpm
|
||||||
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
|
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
|
||||||
@@ -237,3 +239,7 @@ use-gpg-agent-for-ssh
|
|||||||
|
|
||||||
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
|
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
|
||||||
command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)"
|
command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)"
|
||||||
|
|
||||||
|
if [[ -n "$DEVPOD_WORKSPACE_ID" ]]; then
|
||||||
|
export TERM=xterm-256color
|
||||||
|
fi
|
||||||
|
|||||||
10
env/.config/zsh/functions/dp
vendored
10
env/.config/zsh/functions/dp
vendored
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
function dp() {
|
function dp() {
|
||||||
[ -z "$1" ] && echo "Must supply temperature" && return 1
|
[ -z "$1" ] && echo "Must supply temperature" && return 1
|
||||||
[ -z "$2" ] && echo "Must supply relative humidity" && return 1
|
[ -z "$2" ] && echo "Must supply relative humidity" && return 1
|
||||||
|
|
||||||
local temperature=$1
|
local temperature=$1
|
||||||
local humidity=$2
|
local humidity=$2
|
||||||
|
|
||||||
/opt/homebrew/bin/psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
3
env/.zshenv
vendored
3
env/.zshenv
vendored
@@ -87,5 +87,8 @@ export STARSHIP_CONFIG="$XDG_CONFIG_HOME/starship/starship.toml"
|
|||||||
export _ZO_DATA_DIR="$XDG_DATA_HOME"
|
export _ZO_DATA_DIR="$XDG_DATA_HOME"
|
||||||
unset _ZO_ECHO
|
unset _ZO_ECHO
|
||||||
|
|
||||||
|
# Suppress swift backtrace warnings.
|
||||||
|
export SWIFT_BACTRACE=enable=no
|
||||||
|
|
||||||
[ -f "$LOCAL_ENV" ] && source "$LOCAL_ENV"
|
[ -f "$LOCAL_ENV" ] && source "$LOCAL_ENV"
|
||||||
[ -f "$ZDOTDIR/personal.env" ] && source "$ZDOTDIR/personal.env"
|
[ -f "$ZDOTDIR/personal.env" ] && source "$ZDOTDIR/personal.env"
|
||||||
|
|||||||
56
repos
Executable file
56
repos
Executable file
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
DEST="$HOME/dev"
|
||||||
|
dry_run_flag="0"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
if [[ $dry_run_flag == "1" ]]; then
|
||||||
|
echo "[DRY RUN]: $*"
|
||||||
|
else
|
||||||
|
echo "$*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
clone() {
|
||||||
|
local src=${1:-""}
|
||||||
|
local dest=${2:-$DEST}
|
||||||
|
log "Cloning '$src' in '$dest'"
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
pushd "$dest" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
git clone "$src"
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install-psychrometrics() {
|
||||||
|
log "Installing psychrometrics cli."
|
||||||
|
if [[ $dry_run_flag == "0" ]]; then
|
||||||
|
local src="$DEST/psychrometrics-cli"
|
||||||
|
pushd "$src" || exit 1 &>/dev/null
|
||||||
|
(
|
||||||
|
./install-linux.sh
|
||||||
|
)
|
||||||
|
popd &>/dev/null
|
||||||
|
rm -rf "$src"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
##### MAIN #####
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
if [[ $1 =~ ^-d ]] || [[ $1 =~ ^--dry ]]; then
|
||||||
|
dry_run_flag="1"
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p "$DEST/sites" &>/dev/null
|
||||||
|
clone "git@github.com:m-housh/mhoush.com.git" "$DEST/sites"
|
||||||
|
clone "git@github.com:swift-psychrometrics/psychrometrics-cli.git" && install-psychrometrics
|
||||||
Reference in New Issue
Block a user