feat(system): comprehensive branding, styling, and system feature update
- Relocate themes to assets/themes/ and update all references. - Implement custom SDDM theme and Plymouth theme enhancements. - Add themed templates for Alacritty, Hyprland, Waybar, and other apps. - Introduce Makima key remapper module and configuration. - Add Voxtype and Walker configurations. - Implement systemd power management and timeout optimizations. - Add Nautilus-python extensions for LocalSend. - Update branding assets and ASCII art integration.
This commit is contained in:
57
config/nomarchy/default/bash/aliases
Normal file
57
config/nomarchy/default/bash/aliases
Normal file
@@ -0,0 +1,57 @@
|
||||
# File system
|
||||
if command -v eza &> /dev/null; then
|
||||
alias ls='eza -lh --group-directories-first --icons=auto'
|
||||
alias lsa='ls -a'
|
||||
alias lt='eza --tree --level=2 --long --icons --git'
|
||||
alias lta='lt -a'
|
||||
fi
|
||||
|
||||
if [[ "$TERM" == "xterm-kitty" ]]; then
|
||||
alias ff="fzf --preview 'case \$(file --mime-type -b {}) in image/*) kitty icat --clear --transfer-mode=memory --stdin=no --place=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES}@0x0 {} ;; *) bat --style=numbers --color=always {} ;; esac'"
|
||||
else
|
||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||
fi
|
||||
alias eff='$EDITOR "$(ff)"'
|
||||
sff() { if [ $# -eq 0 ]; then echo "Usage: sff <destination> (e.g. sff host:/tmp/)"; return 1; fi; local file; file=$(find . -type f -printf '%T@\t%p\n' | sort -rn | cut -f2- | ff) && [ -n "$file" ] && scp "$file" "$1"; }
|
||||
|
||||
if command -v zoxide &> /dev/null; then
|
||||
alias cd="zd"
|
||||
zd() {
|
||||
if (( $# == 0 )); then
|
||||
builtin cd ~ || return
|
||||
elif [[ -d $1 ]]; then
|
||||
builtin cd "$1" || return
|
||||
else
|
||||
if ! z "$@"; then
|
||||
echo "Error: Directory not found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
printf "\U000F17A9 "
|
||||
pwd
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
open() (
|
||||
xdg-open "$@" >/dev/null 2>&1 &
|
||||
)
|
||||
|
||||
# Directories
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
|
||||
# Tools
|
||||
alias c='opencode'
|
||||
alias cx='printf "\033[2J\033[3J\033[H" && claude --allow-dangerously-skip-permissions'
|
||||
alias d='docker'
|
||||
alias r='rails'
|
||||
alias t='tmux attach || tmux new -s Work'
|
||||
n() { if [ "$#" -eq 0 ]; then command nvim . ; else command nvim "$@"; fi; }
|
||||
|
||||
# Git
|
||||
alias g='git'
|
||||
alias gcm='git commit -m'
|
||||
alias gcam='git commit -a -m'
|
||||
alias gcad='git commit -a --amend'
|
||||
7
config/nomarchy/default/bash/envs
Normal file
7
config/nomarchy/default/bash/envs
Normal file
@@ -0,0 +1,7 @@
|
||||
# Editor used by CLI
|
||||
export SUDO_EDITOR="$EDITOR"
|
||||
export BAT_THEME=ansi
|
||||
|
||||
# Duplicated from .config/uwsm/env so SSH works too
|
||||
export NOMARCHY_PATH=$HOME/.local/share/nomarchy
|
||||
export PATH=$NOMARCHY_PATH/bin:$PATH:$HOME/.local/bin
|
||||
3
config/nomarchy/default/bash/fns/compression
Normal file
3
config/nomarchy/default/bash/fns/compression
Normal file
@@ -0,0 +1,3 @@
|
||||
# Compression
|
||||
compress() { tar -czf "${1%/}.tar.gz" "${1%/}"; }
|
||||
alias decompress="tar -xzf"
|
||||
59
config/nomarchy/default/bash/fns/drives
Normal file
59
config/nomarchy/default/bash/fns/drives
Normal file
@@ -0,0 +1,59 @@
|
||||
# Write iso file to sd card
|
||||
iso2sd() {
|
||||
if (( $# < 1 )); then
|
||||
echo "Usage: iso2sd <input_file> [output_device]"
|
||||
echo "Example: iso2sd ~/Downloads/ubuntu-25.04-desktop-amd64.iso /dev/sda"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local iso="$1"
|
||||
local drive="$2"
|
||||
|
||||
if [[ -z $drive ]]; then
|
||||
local available_sds=$(lsblk -dpno NAME | grep -E '/dev/sd')
|
||||
|
||||
if [[ -z $available_sds ]]; then
|
||||
echo "No SD drives found and no drive specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
drive=$(nomarchy-drive-select "$available_sds")
|
||||
|
||||
if [[ -z $drive ]]; then
|
||||
echo "No drive selected"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo dd bs=4M status=progress oflag=sync if="$iso" of="$drive"
|
||||
sudo eject "$drive"
|
||||
}
|
||||
|
||||
# Format an entire drive for a single partition using exFAT
|
||||
format-drive() {
|
||||
if (( $# != 2 )); then
|
||||
echo "Usage: format-drive <device> <name>"
|
||||
echo "Example: format-drive /dev/sda 'My Stuff'"
|
||||
echo -e "\nAvailable drives:"
|
||||
lsblk -d -o NAME -n | awk '{print "/dev/"$1}'
|
||||
else
|
||||
echo "WARNING: This will completely erase all data on $1 and label it '$2'."
|
||||
read -rp "Are you sure you want to continue? (y/N): " confirm
|
||||
|
||||
if [[ $confirm =~ ^[Yy]$ ]]; then
|
||||
sudo wipefs -a "$1"
|
||||
sudo dd if=/dev/zero of="$1" bs=1M count=100 status=progress
|
||||
sudo parted -s "$1" mklabel gpt
|
||||
sudo parted -s "$1" mkpart primary 1MiB 100%
|
||||
sudo parted -s "$1" set 1 msftdata on
|
||||
|
||||
partition="$([[ $1 == *"nvme"* ]] && echo "${1}p1" || echo "${1}1")"
|
||||
sudo partprobe "$1" || true
|
||||
sudo udevadm settle || true
|
||||
|
||||
sudo mkfs.exfat -n "$2" "$partition"
|
||||
|
||||
echo "Drive $1 formatted as exFAT and labeled '$2'."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
20
config/nomarchy/default/bash/fns/ssh-port-forwarding
Normal file
20
config/nomarchy/default/bash/fns/ssh-port-forwarding
Normal file
@@ -0,0 +1,20 @@
|
||||
# SSH Port Forwarding Functions
|
||||
fip() {
|
||||
(( $# < 2 )) && echo "Usage: fip <host> <port1> [port2] ..." && return 1
|
||||
local host="$1"
|
||||
shift
|
||||
for port in "$@"; do
|
||||
ssh -f -N -L "$port:localhost:$port" "$host" && echo "Forwarding localhost:$port -> $host:$port"
|
||||
done
|
||||
}
|
||||
|
||||
dip() {
|
||||
(( $# == 0 )) && echo "Usage: dip <port1> [port2] ..." && return 1
|
||||
for port in "$@"; do
|
||||
pkill -f "ssh.*-L $port:localhost:$port" && echo "Stopped forwarding port $port" || echo "No forwarding on port $port"
|
||||
done
|
||||
}
|
||||
|
||||
lip() {
|
||||
pgrep -af "ssh.*-L [0-9]+:localhost:[0-9]+" || echo "No active forwards"
|
||||
}
|
||||
97
config/nomarchy/default/bash/fns/tmux
Normal file
97
config/nomarchy/default/bash/fns/tmux
Normal file
@@ -0,0 +1,97 @@
|
||||
# Create a Tmux Dev Layout with editor, ai, and terminal
|
||||
# Usage: tdl <c|cx|codex|other_ai> [<second_ai>]
|
||||
tdl() {
|
||||
[[ -z $1 ]] && { echo "Usage: tdl <c|cx|codex|other_ai> [<second_ai>]"; return 1; }
|
||||
[[ -z $TMUX ]] && { echo "You must start tmux to use tdl."; return 1; }
|
||||
|
||||
local current_dir="${PWD}"
|
||||
local editor_pane ai_pane ai2_pane
|
||||
local ai="$1"
|
||||
local ai2="$2"
|
||||
|
||||
# Use TMUX_PANE for the pane we're running in (stable even if active window changes)
|
||||
editor_pane="$TMUX_PANE"
|
||||
|
||||
# Name the current window after the base directory name
|
||||
tmux rename-window -t "$editor_pane" "$(basename "$current_dir")"
|
||||
|
||||
# Split window vertically - top 85%, bottom 15% (target editor pane explicitly)
|
||||
tmux split-window -v -p 15 -t "$editor_pane" -c "$current_dir"
|
||||
|
||||
# Split editor pane horizontally - AI on right 30% (capture new pane ID directly)
|
||||
ai_pane=$(tmux split-window -h -p 30 -t "$editor_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||
|
||||
# If second AI provided, split the AI pane vertically
|
||||
if [[ -n $ai2 ]]; then
|
||||
ai2_pane=$(tmux split-window -v -t "$ai_pane" -c "$current_dir" -P -F '#{pane_id}')
|
||||
tmux send-keys -t "$ai2_pane" "$ai2" C-m
|
||||
fi
|
||||
|
||||
# Run ai in the right pane
|
||||
tmux send-keys -t "$ai_pane" "$ai" C-m
|
||||
|
||||
# Run nvim in the left pane
|
||||
tmux send-keys -t "$editor_pane" "$EDITOR ." C-m
|
||||
|
||||
# Select the nvim pane for focus
|
||||
tmux select-pane -t "$editor_pane"
|
||||
}
|
||||
|
||||
# Create multiple tdl windows with one per subdirectory in the current directory
|
||||
# Usage: tdlm <c|cx|codex|other_ai> [<second_ai>]
|
||||
tdlm() {
|
||||
[[ -z $1 ]] && { echo "Usage: tdlm <c|cx|codex|other_ai> [<second_ai>]"; return 1; }
|
||||
[[ -z $TMUX ]] && { echo "You must start tmux to use tdlm."; return 1; }
|
||||
|
||||
local ai="$1"
|
||||
local ai2="$2"
|
||||
local base_dir="$PWD"
|
||||
local first=true
|
||||
|
||||
# Rename the session to the current directory name (replace dots/colons which tmux disallows)
|
||||
tmux rename-session "$(basename "$base_dir" | tr '.:' '--')"
|
||||
|
||||
for dir in "$base_dir"/*/; do
|
||||
[[ -d $dir ]] || continue
|
||||
local dirpath="${dir%/}"
|
||||
|
||||
if $first; then
|
||||
# Reuse the current window for the first project
|
||||
tmux send-keys -t "$TMUX_PANE" "cd '$dirpath' && tdl $ai $ai2" C-m
|
||||
first=false
|
||||
else
|
||||
local pane_id=$(tmux new-window -c "$dirpath" -P -F '#{pane_id}')
|
||||
tmux send-keys -t "$pane_id" "tdl $ai $ai2" C-m
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Create a multi-pane swarm layout with the same command started in each pane (great for AI)
|
||||
# Usage: tsl <pane_count> <command>
|
||||
tsl() {
|
||||
[[ -z $1 || -z $2 ]] && { echo "Usage: tsl <pane_count> <command>"; return 1; }
|
||||
[[ -z $TMUX ]] && { echo "You must start tmux to use tsl."; return 1; }
|
||||
|
||||
local count="$1"
|
||||
local cmd="$2"
|
||||
local current_dir="${PWD}"
|
||||
local -a panes
|
||||
|
||||
tmux rename-window -t "$TMUX_PANE" "$(basename "$current_dir")"
|
||||
|
||||
panes+=("$TMUX_PANE")
|
||||
|
||||
while (( ${#panes[@]} < count )); do
|
||||
local new_pane
|
||||
local split_target="${panes[-1]}"
|
||||
new_pane=$(tmux split-window -h -t "$split_target" -c "$current_dir" -P -F '#{pane_id}')
|
||||
panes+=("$new_pane")
|
||||
tmux select-layout -t "${panes[0]}" tiled
|
||||
done
|
||||
|
||||
for pane in "${panes[@]}"; do
|
||||
tmux send-keys -t "$pane" "$cmd" C-m
|
||||
done
|
||||
|
||||
tmux select-pane -t "${panes[0]}"
|
||||
}
|
||||
53
config/nomarchy/default/bash/fns/transcoding
Normal file
53
config/nomarchy/default/bash/fns/transcoding
Normal file
@@ -0,0 +1,53 @@
|
||||
# Transcode a video to a good-balance 1080p that's great for sharing online
|
||||
transcode-video-1080p() {
|
||||
ffmpeg -i "$1" -vf scale=1920:1080 -c:v libx264 -preset fast -crf 23 -c:a copy "${1%.*}-1080p.mp4"
|
||||
}
|
||||
|
||||
# Transcode a video to a good-balance 4K that's great for sharing online
|
||||
transcode-video-4K() {
|
||||
ffmpeg -i "$1" -c:v libx265 -preset slow -crf 24 -c:a aac -b:a 192k "${1%.*}-optimized.mp4"
|
||||
}
|
||||
|
||||
# Transcode any image to JPG image that's great for shrinking wallpapers
|
||||
img2jpg() {
|
||||
img="$1"
|
||||
shift
|
||||
|
||||
magick "$img" "$@" -quality 85 -strip "${img%.*}-converted.jpg"
|
||||
}
|
||||
|
||||
# Transcode any image to a small JPG (max 1080px wide)
|
||||
img2jpg-small() {
|
||||
img="$1"
|
||||
shift
|
||||
|
||||
magick "$img" "$@" -resize 1080x\> -quality 85 -strip "${img%.*}-small.jpg"
|
||||
}
|
||||
|
||||
# Transcode any image to a 4K JPG (max 2160px wide)
|
||||
img2jpg-medium() {
|
||||
img="$1"
|
||||
shift
|
||||
|
||||
magick "$img" "$@" -resize 2160x\> -quality 85 -strip "${img%.*}-medium.jpg"
|
||||
}
|
||||
|
||||
# Transcode any image to a 6K JPG (max 3160px wide)
|
||||
img2jpg-large() {
|
||||
img="$1"
|
||||
shift
|
||||
|
||||
magick "$img" "$@" -resize 3160x\> -quality 85 -strip "${img%.*}-large.jpg"
|
||||
}
|
||||
|
||||
# Transcode any image to compressed-but-lossless PNG
|
||||
img2png() {
|
||||
img="$1"
|
||||
shift
|
||||
|
||||
magick "$img" "$@" -strip -define png:compression-filter=5 \
|
||||
-define png:compression-level=9 \
|
||||
-define png:compression-strategy=1 \
|
||||
-define png:exclude-chunk=all \
|
||||
"${img%.*}-optimized.png"
|
||||
}
|
||||
36
config/nomarchy/default/bash/fns/worktrees
Normal file
36
config/nomarchy/default/bash/fns/worktrees
Normal file
@@ -0,0 +1,36 @@
|
||||
# Create a new worktree and branch from within current git directory.
|
||||
ga() {
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: ga [branch name]"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local branch="$1"
|
||||
local base="$(basename "$PWD")"
|
||||
local wt_path="../${base}--${branch}"
|
||||
|
||||
git worktree add -b "$branch" "$wt_path"
|
||||
mise trust "$wt_path"
|
||||
cd "$wt_path"
|
||||
}
|
||||
|
||||
# Remove worktree and branch from within active worktree directory.
|
||||
gd() {
|
||||
if gum confirm "Remove worktree and branch?"; then
|
||||
local cwd base branch root worktree
|
||||
|
||||
cwd="$(pwd)"
|
||||
worktree="$(basename "$cwd")"
|
||||
|
||||
# split on first `--`
|
||||
root="${worktree%%--*}"
|
||||
branch="${worktree#*--}"
|
||||
|
||||
# Protect against accidentally nuking a non-worktree directory
|
||||
if [[ "$root" != "$worktree" ]]; then
|
||||
cd "../$root"
|
||||
git worktree remove "$cwd" --force || return 1
|
||||
git branch -D "$branch"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
1
config/nomarchy/default/bash/functions
Normal file
1
config/nomarchy/default/bash/functions
Normal file
@@ -0,0 +1 @@
|
||||
for f in $HOME/.config/nomarchy/default/bash/fns/*; do source "$f"; done
|
||||
24
config/nomarchy/default/bash/init
Normal file
24
config/nomarchy/default/bash/init
Normal file
@@ -0,0 +1,24 @@
|
||||
if command -v mise &> /dev/null; then
|
||||
eval "$(mise activate bash)"
|
||||
fi
|
||||
|
||||
if command -v starship &> /dev/null; then
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
|
||||
if command -v zoxide &> /dev/null; then
|
||||
eval "$(zoxide init bash)"
|
||||
fi
|
||||
|
||||
if command -v try &> /dev/null; then
|
||||
eval "$(SHELL=/bin/bash command try init ~/Work/tries)"
|
||||
fi
|
||||
|
||||
if command -v fzf &> /dev/null; then
|
||||
if [[ -f /usr/share/fzf/completion.bash ]]; then
|
||||
source /usr/share/fzf/completion.bash
|
||||
fi
|
||||
if [[ -f /usr/share/fzf/key-bindings.bash ]]; then
|
||||
source /usr/share/fzf/key-bindings.bash
|
||||
fi
|
||||
fi
|
||||
47
config/nomarchy/default/bash/inputrc
Normal file
47
config/nomarchy/default/bash/inputrc
Normal file
@@ -0,0 +1,47 @@
|
||||
set meta-flag on
|
||||
set input-meta on
|
||||
set output-meta on
|
||||
set convert-meta off
|
||||
set completion-ignore-case on
|
||||
set completion-prefix-display-length 2
|
||||
set show-all-if-ambiguous on
|
||||
set show-all-if-unmodified on
|
||||
|
||||
# Arrow keys match what you've typed so far against your command history
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
"\e[C": forward-char
|
||||
"\e[D": backward-char
|
||||
|
||||
# Immediately add a trailing slash when autocompleting symlinks to directories
|
||||
set mark-symlinked-directories on
|
||||
|
||||
# Do not autocomplete hidden files unless the pattern explicitly begins with a dot
|
||||
set match-hidden-files off
|
||||
|
||||
# Show all autocomplete results at once
|
||||
set page-completions off
|
||||
|
||||
# If there are more than 200 possible completions for a word, ask to show them all
|
||||
set completion-query-items 200
|
||||
|
||||
# Show extra file information when completing, like `ls -F` does
|
||||
set visible-stats on
|
||||
|
||||
# Be more intelligent when autocompleting by also looking at the text after
|
||||
# the cursor. For example, when the current line is "cd ~/src/mozil", and
|
||||
# the cursor is on the "z", pressing Tab will not autocomplete it to "cd
|
||||
# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the
|
||||
# Readline used by Bash 4.)
|
||||
set skip-completed-text on
|
||||
|
||||
# Coloring for Bash 4 tab completions.
|
||||
set colored-stats on
|
||||
|
||||
# Cycle forward and backward through completion candidates (tab/shift+tab)
|
||||
# (completion listing and display behavior configured above)
|
||||
TAB: menu-complete
|
||||
"\e[Z": menu-complete-backward
|
||||
|
||||
# On first Tab, complete the common prefix before cycling candidates
|
||||
set menu-complete-display-prefix on
|
||||
6
config/nomarchy/default/bash/rc
Normal file
6
config/nomarchy/default/bash/rc
Normal file
@@ -0,0 +1,6 @@
|
||||
source ~/.config/nomarchy/default/bash/envs
|
||||
source ~/.config/nomarchy/default/bash/shell
|
||||
source ~/.config/nomarchy/default/bash/aliases
|
||||
source ~/.config/nomarchy/default/bash/functions
|
||||
source ~/.config/nomarchy/default/bash/init
|
||||
[[ $- == *i* ]] && bind -f ~/.config/nomarchy/default/bash/inputrc
|
||||
13
config/nomarchy/default/bash/shell
Normal file
13
config/nomarchy/default/bash/shell
Normal file
@@ -0,0 +1,13 @@
|
||||
# History control
|
||||
shopt -s histappend
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTSIZE=32768
|
||||
HISTFILESIZE="${HISTSIZE}"
|
||||
|
||||
# Autocompletion
|
||||
if [[ ! -v BASH_COMPLETION_VERSINFO && -f /usr/share/bash-completion/bash_completion ]]; then
|
||||
source /usr/share/bash-completion/bash_completion
|
||||
fi
|
||||
|
||||
# Ensure command hashing is off for mise
|
||||
set +h
|
||||
Reference in New Issue
Block a user