This commit is contained in:
Brad Anderson
2026-07-01 15:55:48 -07:00
15 changed files with 342 additions and 57 deletions
+1
View File
@@ -9,5 +9,6 @@ config/xfce4/xfconf/xfce-perchannel-xml
config/xfce4/terminal
config/themes
config/icons
config/VSCodium
dependencies/dotfiles-local
packages/*.local
+64
View File
@@ -0,0 +1,64 @@
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Update all locally existing PGP keys in pacman's gnupg keyring, that are
# relevant for Arch Linux packaging using the distribution's Web Key Directory
# (WKD).
# This ensures, that new signatures on already existing keys are fetched before
# a new version of archlinux-keyring is installed. Fetching signatures early
# prevents marginal trust issues with packages that are signed by keys which
# only gain full trust when updating to a new version of archlinux-keyring in
# that same system upgrade action.
set -eu
readonly main_key_domain_match="@master-key.archlinux.org$"
readonly packager_domain_match="@archlinux.org$"
readonly homedir="$(pacman-conf GPGDir)"
domain_match=""
uid=""
gpg_locate_external=(
# force update a key using WKD
gpg
--homedir
"$homedir"
--quiet
--no-permission-warning
--auto-key-locate
"clear,nodefault,wkd"
--locate-external-keys
)
# a list of <fingerprint> <mbox> tuples of all keys in the keyring
# e.g.:
# C7E7849466FE2358343588377258734B41C31549 dvzrv@archlinux.org
# 8FC15A064950A99DD1BD14DD39E4B877E62EB915 svenstaro@gmail.com
fingerprint_mboxes="$(
gpg --homedir "$homedir" --no-permission-warning --list-keys --list-options show-only-fpr-mbox
)"
# a list of <fingerprints> of all revoked keys and keys that have no valid main
# key signatures
old_fingerprints="$(
gpg --homedir "$homedir" --no-permission-warning --list-keys --with-colons |
awk -F: '$1 == "pub" && $2 ~ /-|q|r/ { getline; print $10 }'
)"
if (( EUID != 0 )); then
printf "This script must be run as root.\n" >&2
exit 1
fi
# first update the main signing keys, then the packager keys
for domain_match in "$main_key_domain_match" "$packager_domain_match"; do
while read -ra fpr_email; do
if [[ ${fpr_email[1]} =~ $domain_match && ! "$old_fingerprints" =~ ${fpr_email[0]} ]]; then
printf "Refreshing key %s with UID %s...\n" "${fpr_email[0]}" "${fpr_email[1]}"
"${gpg_locate_external[@]}" "${fpr_email[1]}"
else
printf "Skipping key %s with UID %s...\n" "${fpr_email[0]}" "${fpr_email[1]}"
fi
done <<< "$fingerprint_mboxes"
done
+9 -7
View File
@@ -30,16 +30,18 @@ fi
if program_installed xrandr; then
display_count="$(xrandr | grep ' connected ' | wc -l)"
# Get the selected resolution for each display
display_resolutions="$(xrandr | grep '*' | awk '{ print $1}')"
# Get the rotation for each display, need verbose to return rotation if normal
# and remove 'primary' for consistent column placement
display_rotations="$(xrandr --query --verbose | grep ' connected ' | sed 's/primary //' | awk '{print $5}')"
display_order="$(xrandr --listmonitors | tail -n +2 | sed 's/[\+\*]//g' | awk '{ print $2}')"
# Build feh command
feh_args=("--bg-fill")
for i in $(seq 1 "$display_count"); do
resolution="$(echo "$display_resolutions" | sed "${i}q;d")"
rotation="$(echo "$display_rotations" | sed "${i}q;d")"
display_name="$(echo "$display_order" | sed "${i}q;d")"
# Get information about the current display, need verbose to always return rotation
# and remove 'primary' for consistent column placement
display_info="$(xrandr --query --verbose | grep "$display_name" | sed 's/primary //')"
# Get the selected resolution for the display
resolution="$(echo "$display_info" | awk '{ print $3 }' | sed 's/\+.*//')"
# Get the rotation for each display
rotation="$(echo "$display_info" | awk '{ print $5 }')"
path="$wallpapers_path"
resolution_segment=""
if [ "$rotation" != "normal" ] && [ "$rotation" != "inverted" ]; then
+57
View File
@@ -0,0 +1,57 @@
{
"workbench.colorTheme": "Gruvbox Dark Medium",
"vim.camelCaseMotion.enable": true,
"vim.easymotion": true,
"vim.enableNeovim": true,
"vim.handleKeys": {
"<C-a>": false,
"<C-d>": true,
"<C-f>": false,
"<C-s>": false,
"<C-z>": false
},
"vim.insertModeKeyBindingsNonRecursive": [
{
"before": [",", ","],
"after": ["<Esc>"]
}
],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "d"],
"after": ["d", "d"]
},
{
"before": ["<leader>", "d"],
"after": ["d", "d"]
},
{
"before": [",", ",", "<Esc>"],
"commands": [":nohl"]
},
{
"before": ["<leader>", "q"],
"commands": [":bp"]
},
{
"before": ["<leader>", "w"],
"commands": [":bn"]
},
{
"before": ["<leader>", "r", "r"],
"commands": [":action "]
},
{
"before": ["<leader>", "<leader>", "c"],
"commands": [":Blose"],
"silent": true
}
],
"vim.leader": ",",
// To improve performance
"extensions.experimental.affinity": {
"vscodevim.vim": 1
},
"vim.neovimUseConfigFile": true,
"editor.fontFamily": "'Source Code Pro', regular"
}
+5 -5
View File
@@ -1,4 +1,4 @@
@define-color borders_breeze #57595c;
@define-color borders_breeze #4c4e51;
@define-color content_view_bg_breeze #141618;
@define-color error_color_backdrop_breeze #da4453;
@define-color error_color_breeze #da4453;
@@ -7,7 +7,7 @@
@define-color insensitive_base_color_breeze #131517;
@define-color insensitive_base_fg_color_breeze #606263;
@define-color insensitive_bg_color_breeze #1f2124;
@define-color insensitive_borders_breeze #313336;
@define-color insensitive_borders_breeze #2d3033;
@define-color insensitive_fg_color_breeze #686a6c;
@define-color insensitive_selected_bg_color_breeze #1f2124;
@define-color insensitive_selected_fg_color_breeze #686a6c;
@@ -74,10 +74,10 @@
@define-color theme_view_active_decoration_color_breeze #926ee4;
@define-color theme_view_hover_decoration_color_breeze #926ee4;
@define-color tooltip_background_breeze #292c30;
@define-color tooltip_border_breeze #5e6063;
@define-color tooltip_border_breeze #535659;
@define-color tooltip_text_breeze #fcfcfc;
@define-color unfocused_borders_breeze #57595c;
@define-color unfocused_insensitive_borders_breeze #313336;
@define-color unfocused_borders_breeze #4c4e51;
@define-color unfocused_insensitive_borders_breeze #2d3033;
@define-color warning_color_backdrop_breeze #f67400;
@define-color warning_color_breeze #f67400;
@define-color warning_color_insensitive_backdrop_breeze #5e340f;
+5 -5
View File
@@ -1,23 +1,23 @@
[Settings]
gtk-application-prefer-dark-theme=true
gtk-button-images=1
gtk-button-images=true
gtk-cursor-blink=true
gtk-cursor-blink-time=1000
gtk-cursor-theme-name=Qogir-dark
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-font-name=Noto Sans, 10
gtk-icon-theme-name=Gruvbox_Dark
gtk-menu-images=1
gtk-icon-theme-name=breeze-dark
gtk-menu-images=true
gtk-modules=colorreload-gtk-module
gtk-primary-button-warps-slider=true
gtk-sound-theme-name=ocean
gtk-theme-name=Gruvbox-Dark-BL
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-style=3
gtk-xft-antialias=1
gtk-xft-dpi=122880
gtk-xft-hinting=1
+63
View File
@@ -0,0 +1,63 @@
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
" the same commands as the original .vimrc configuration.
" You can find a list of commands here: https://jb.gg/h38q75
" Find more examples here: https://jb.gg/share-ideavimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
" Don't use Ex mode, use Q for formatting.
map Q gq
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
" Highlight copied text
Plug 'machakann/vim-highlightedyank'
" Commentary plugin
Plug 'tpope/vim-commentary'
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
inoremap ,, <ESC>
cnoremap ,, <ESC><ESC>
nmap j gj
nmap k gk
" Only set on first run or it overwrites YCM behavior
" if has('vim_starting')
" imap <tab> <C-X><C-O>
" endif
let mapleader=","
let maplocalleader="\\"
" Close buffer
map <leader><leader>c :Bclose<CR>
" Prev/next buffer
map <leader>q :bp<CR>
map <leader>w :bn<CR>
" System clipboard cut copy paste
map <leader>y "+y
map <leader>Y "+Y
map <leader>p "+p
map <leader>P "+P
map <leader>x "+x
map <leader>dd "+dd
" Update ideavimrc
nnoremap <leader>v :e ~/.ideavimrc<CR>;
nnoremap <leader>rr :action IdeaVim.ReloadVimRc.reload<CR>;
+1
View File
@@ -1,3 +1,4 @@
NO_NEOFETCH=1
NO_GIT_CHECK=1
NO_ZSH_COWSAY=1
LOAD_SSH_KEYS=0
+4 -3
View File
@@ -22,7 +22,6 @@ shadow-exclude = [
"class_g = 'lattedock'",
"_GTK_FRAME_EXTENTS@:c"
]
xinerama-shadow-crop = true;
### Blur
blur:{
@@ -52,8 +51,6 @@ backend = "glx";
#backend = "xrender";
vsync = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
xrender-sync-fence = true;
dbus=true;
@@ -74,3 +71,7 @@ mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-client-leader = true;
## Fixes graphical issues (jitter/flickering) in Jetbrains IDEs
## TODO: This doesn't fully fix the issue
unredir-if-possible = false;
+18 -16
View File
@@ -96,22 +96,24 @@ export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
# Make sure ssh-agent is available
if program_installed ssh-add && [ ! -z "$SSH_AUTH_SOCK" ] && [ -d "$SSH_AUTH_SOCK" ] > /dev/null 2>&1 ; then
# Add SSH keys to agent if not already added
## Find existing keys, supporting one layer of folder organization
public_keys=($(find "$HOME/.ssh/" -maxdepth 2 -name "*.pub"))
if [ ${#public_keys[@]} -gt 0 ]; then
for public_key in "${public_keys[@]}"; do
if [[ $(uname -s) == Linux* ]]; then
# Add SSH keys only if not already present
ssh-add -l | grep -q `ssh-keygen -lf "$public_key" | awk '{print $2}'` || ssh-add -k
break
elif [[ $(uname -s) == Darwin* ]]; then
# Add SSH keys only if not already present
ssh-add -l | grep -q `ssh-keygen -lf "$public_key" | awk '{print $2}'` || ssh-add --apple-use-keychain
break
fi
done
if [ -n "$LOAD_SSH_KEYS" ] && [ "$LOAD_SSH_KEYS" -eq 1 ]; then
if program_installed ssh-add && [ ! -z "$SSH_AUTH_SOCK" ] && [ -d "$SSH_AUTH_SOCK" ] > /dev/null 2>&1 ; then
# Add SSH keys to agent if not already added
## Find existing keys, supporting one layer of folder organization
public_keys=($(find "$HOME/.ssh/" -maxdepth 2 -name "*.pub"))
if [ ${#public_keys[@]} -gt 0 ]; then
for public_key in "${public_keys[@]}"; do
if [[ $(uname -s) == Linux* ]]; then
# Add SSH keys only if not already present
ssh-add -l | grep -q `ssh-keygen -lf "$public_key" | awk '{print $2}'` || ssh-add -k
break
elif [[ $(uname -s) == Darwin* ]]; then
# Add SSH keys only if not already present
ssh-add -l | grep -q `ssh-keygen -lf "$public_key" | awk '{print $2}'` || ssh-add --apple-use-keychain
break
fi
done
fi
fi
fi
@@ -0,0 +1,37 @@
[Unit]
After=network-online.target nss-lookup.target
ConditionPathIsDirectory=/etc/pacman.d/gnupg/
ConditionPathIsReadWrite=/etc/pacman.d/gnupg/
ConditionFileIsExecutable=/usr/bin/archlinux-keyring-wkd-sync
Description=Refresh existing keys of archlinux-keyring
Wants=network-online.target
[Service]
ExecStart=/usr/bin/archlinux-keyring-wkd-sync
CapabilityBoundingSet=
DeviceAllow=
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
PrivateDevices=true
PrivateTmp=true
ProtectClock=true
ProtectControlGroups=true
ProtectHome=true
ProtectHostname=true
ProtectKernelLogs=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectProc=noaccess
ProtectSystem=strict
ReadWritePaths=/etc/pacman.d/gnupg
RemoveIPC=true
RestrictAddressFamilies=~AF_PACKET AF_NETLINK
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@resources
@@ -0,0 +1,11 @@
[Unit]
Description=Refresh existing PGP keys of archlinux-keyring regularly
[Timer]
OnCalendar=weekly
Persistent=true
RandomizedDelaySec=12h
[Install]
WantedBy=timers.target
+1 -1
View File
@@ -212,7 +212,7 @@ if program_installed pyenv; then
fi
# oh-my-zsh plugins (must come after all initialization above)
plugins=(archlinux colored-man-pages colorize command-not-found cp docker docker-compose fzf git history history-substring-search nmap npm pip poetry pyenv macos rsync snap ssh ssh-agent sudo systemd terraform thefuck tmux tmuxinator vi-mode virtualenv yarn zsh-interactive-cd zsh-navigation-tools)
plugins=(archlinux colored-man-pages colorize command-not-found cp docker docker-compose fzf git history history-substring-search nmap npm pip poetry pyenv macos rsync snap ssh sudo systemd terraform thefuck tmux tmuxinator vi-mode virtualenv yarn zsh-interactive-cd zsh-navigation-tools)
# Local overrides
if [ -f $HOME/.zshrc_local ]; then
+65 -19
View File
@@ -115,6 +115,7 @@ tmux
gtkrc-2.0.mine
themes
icons
ideavimrc
"
# Files and directories under ~/.config
configs="
@@ -127,6 +128,7 @@ rofi
gtk-3.0
qt5ct
powerline
VSCodium
xfce4
picom.conf
picom-extended.conf
@@ -136,7 +138,11 @@ local_home_templates="
zshrc_local
profile.local
"
systemd_services="
user_systemd_services="
"
system_systemd_services="
archlinux-keyring-wkd-sync.service
archlinux-keyring-wkd-sync.timer
"
xsessions="
plasma-i3.desktop
@@ -215,10 +221,14 @@ function link_dotfiles {
if [[ -f $file || -d $file ]]; then
if [[ -L $HOME/.$file ]]; then
echo "Skipping: $file because ~/.$file already linked"
# Don't skip if not interactive as initial files often exist that should be replaced
elif [[ (-f $HOME/.$file || -d $HOME/.$file) && $interactive -eq 1 ]]; then
echo "Skipping: $file because ~/.$file already exists"
else
if [[ -f "$HOME/.$file" || -d "$HOME/.$file" ]]; then
echo "Moving: existing ~/.$file to ~/.dotfiles-backup/$file"
if [ ! -d $HOME/.dotfiles-backup ]; then
mkdir -p $HOME/.dotfiles-backup
fi
mv "$HOME/.$file" "$HOME/.dotfiles-backup/$file"
fi
echo "Linking: $file ($config_dir/$file -> ~/.$file)"
ln -s $config_dir/$file $HOME/.$file
fi
@@ -228,25 +238,32 @@ function link_dotfiles {
if [[ -f $file || -d $file ]]; then
if [[ -L "$HOME/.config/$file" ]]; then
echo "Skipping: $file because ~/.config/$file already linked"
elif [[ -f $HOME/.config/$file || -d $HOME/.config/$file ]]; then
echo "Skipping: $file because ~/.config/$file already exists"
else
if [[ -f "$HOME/.config/$file" || -d "$HOME/.config/$file" ]]; then
echo "Moving: existing ~/.config/$file to ~/.dotfiles-backup/config/$file"
if [ ! -d $HOME/.dotfiles-backup/config ]; then
mkdir -p $HOME/.dotfiles-backup/config
fi
mv "$HOME/.config/$file" "$HOME/.dotfiles-backup/config/$file"
fi
echo "Linking: $file ($config_dir/$file -> ~/.config/$file)"
ln -s $config_dir/$file $HOME/.config/$file
fi
fi
done
for file in $local_home_templates; do
if [[ -f ./local-templates/$file || -d ./local-templates/$file ]]; then
if [[ -f $HOME/.$file || -d $HOME/.$file ]]; then
echo "Skipping: $file because ~/.$file already exists"
else
echo "Copying: $file ($config_dir/local-templates/$file -> ~/.$file)"
cp $config_dir/local-templates/$file $HOME/.$file
fi
fi
done
for file in $systemd_services; do
# TODO: These are getting in the way of dotfiles-local install so disabling
# Refactor this
# for file in $local_home_templates; do
# if [[ -f ./local-templates/$file || -d ./local-templates/$file ]]; then
# if [[ -f $HOME/.$file || -d $HOME/.$file ]]; then
# echo "Skipping: $file because ~/.$file already exists"
# else
# echo "Copying: $file ($config_dir/local-templates/$file -> ~/.$file)"
# cp $config_dir/local-templates/$file $HOME/.$file
# fi
# fi
# done
for file in $user_systemd_services; do
if [[ -f systemd/user/$file || -d systemd/user/$file ]]; then
if [[ -L "$HOME/.config/systemd/user/$file" ]]; then
echo "Skipping: $file because ~/.config/systemd/user/$file already linked"
@@ -255,11 +272,39 @@ function link_dotfiles {
else
echo "Linking: $file ($config_dir/systemd/user/$file -> ~/.config/systemd/user/$file)"
ln -s $config_dir/systemd/user/$file $HOME/.config/systemd/user/$file
# TODO: Probably should also enable the service
#systemctl --user enable --now $file
echo -n "Would you like to enable $file user service? (y/N) "
read response
if [[ "$response" == 'y' ]] || [[ "$response" == 'Y' ]]; then
systemctl --user enable --now $file
fi
fi
fi
done
if [ "$interactive" == 1 ]; then
echo -n "Would you like to install systemd system services? (y/N) "
read response
if [[ "$response" == 'y' ]] || [[ "$response" == 'Y' ]]; then
for file in $system_systemd_services; do
if [[ -f systemd/$file || -d systemd/system/$file ]]; then
if [[ -L "/etc/systemd/system/$file" ]]; then
echo "Skipping: $file because /etc/systemd/system/$file already linked"
elif [[ -f /etc/systemd/system/$file || -d /etc/systemd/system/$file ]]; then
echo "Skipping: $file because /etc/systemd/system/$file already exists"
else
echo "Linking: $file ($config_dir/systemd/$file -> /etc/systemd/system/$file)"
sudo ln -s $config_dir/systemd/$file /etc/systemd/system/$file
echo -n "Would you like to enable $file systemd service? (y/N) "
read response
if [[ "$response" == 'y' ]] || [[ "$response" == 'Y' ]]; then
sudo systemctl enable --now $file
fi
fi
fi
done
fi
fi
cd - > /dev/null
}
@@ -323,6 +368,7 @@ function install_main() {
if program_installed pacman; then
echo ""
echo "Installing and updating pacman packages"
sudo pacman -Sy --needed archlinux-keyring
sudo pacman -Syu
while IFS= read -r program || [[ -n $program ]]; do
# Check for comment or whitespace
+1 -1
View File
@@ -30,7 +30,7 @@ zsh
zsh-syntax-highlighting
# credential management and git
github-cli
#github-cli
gnome-keyring
# needed for certain hardware support